Quickstart

[back]

This might be enough for a first glance for those, who don't like reading manuals ... First download the simple server bundle, extract it and start the startServer.bat (Windows) or startServer.sh (Linux/Mac).

After that create a Java file and paste the following code fragment into it. It shows how to start a server, establish a connection, write a tuple to the space, and take it out.

import info.collide.sqlspaces.client.TupleSpace;
import info.collide.sqlspaces.commons.Tuple;

public class SQLSpacesTest {

    public static void main(String[] args) {
        TupleSpace ts = new TupleSpace();

        Tuple t1 = new Tuple("MyFirstTuple", 1);
        ts.write(t1);

        Tuple templateTuple = new Tuple(String.class, Integer.class);
        Tuple returnTuple = ts.take(templateTuple);
    }

}