[Monetdb-developers] [Monetdb-checkins] MonetDB5/src/modules/mal/Tests remote04.mal, , NONE, 1.1 remote05.mal, , NONE, 1.1

Romulo Goncalves R.A.Goncalves at cwi.nl
Sun Jan 20 03:18:42 CET 2008


Martin Kersten wrote:
> Update of /cvsroot/monetdb/MonetDB5/src/modules/mal/Tests
> In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31308
> 
> Added Files:
> 	remote04.mal remote05.mal 
> Log Message:
> Examples of poor-mans bat transport.
> 
> 
> --- NEW FILE: remote04.mal ---
> #this example tests recieving tuple values as part of the
> #MAL interface.
> 
> b:bat[:oid,:int]:=mserver.receive();
> [ 0 at 0, 1]
> [ 0 at 1, 2]
> 
> c:bat[:oid,:str]:=mserver.receive();
> [ 0 at 0, "hello"]
> [ 0 at 1, "world"]
> 
> io.print(b);
> io.print(c);
> 
> --- NEW FILE: remote05.mal ---
> #this example tests recieving tuple values as part of the
> #MAL interface.
> # now in a remote setting
> 
> include remote;
> # for testweb, we need to ask the server itself how it is available, use
> # sabaoth for that
> include sabaoth;
> 
> h := sabaoth.getLocalConnectionHost();
> p := sabaoth.getLocalConnectionPort();
> 
> # create a connecton to ourself
> remote.create("test", h, p, nil:str, "monetdb", "monetdb");
> 
> b:= bat.new(:oid,:str);
> bat.insert( 0 at 0, "hello");
> bat.insert( 0 at 1, "world");
Shouldn't here be:
bat.insert( b, 0 at 0, 1);
bat.insert( b, 0 at 1, 2);

Because your remote site is expecting to receive
b:bat[:oid,:int]:=mserver.receive();

Romulo
> 
> # store the values
> remote.send("test",b);
> c:= remote.query("test","io.print(b);")
> io.print(c);
> # shutdown
> remote.destroy("test");
> 
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Monetdb-checkins mailing list
> Monetdb-checkins at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/monetdb-checkins





More information about the developers-list mailing list