LinuxTuples is an open-source tuple space server, with associated code for writing clients, designed to run on a networked cluster of Linux/Intel boxes. The tuple space is maintained on one machine on the the network.
Tuples offer a convenient and intuitive way to write parallel programs. A tuple space represents a shared communication channel allowing processes anywhere on the network to communicate with one another.
A tuple space is a database of ordered lists of typed values. For instance, the tuple (2, 5.439, "abc") is made of an integer, a float, and a string.
A tuple space functions like a community bulletin board. Anybody can post a message, or take a message away, or read a message and leave it for others to read. If somebody is waiting for a particular message and doesn t find it immediately, he can go do something else, or wait to see if the message arrives. If nobody removes a message, it will remain on the bulletin board indefinitely.
The meaning of a tuple's elements is a convention agreed upon by the client programs. Tuples will often represent requests for computations or the results of computations. They can also represent public knowledge shared by all the programs in the entire system, such as the values of physical constants, or the trading prices of commodities.
LinuxTuples is written in C, with a client API for Python. It should be fairly easy to write client APIs for other languages, as long as they have a representation for ordered lists of different-typed values.
Gelernter's insights were (1) that messages can be anonymous -- they often don t need to be addressed to a specific recipient, and the recipient often doesn t need to know who sent the message, and (2) that they should persist if not immediately picked up. He formalized his insights with the invention of a tuple space , which has since been adopted in the Java world as Javaspaces.
struct tuple *s, *t;
s = make_tuple("sid???", "will work for electrons",
1234, 2.71828);
t = get_tuple(s);
Python's tuples are naturally mapped to LinuxTuples tuples, using None as a wildcard.
import linuxtuples
conn = linuxtuples.connect()
t = conn.get( ("will work for electrons", 1234, 2.71828,
None, None, None) )