digplanet beta 1: Athena
Share digplanet:


Applied sciences






















A tuple space is an implementation of the associative memory paradigm for parallel/distributed computing. It provides a repository of tuples that can be accessed concurrently. As an illustrative example, consider that there are a group of processors that produce pieces of data and a group of processors that use the data. Producers post their data as tuples in the space, and the consumers then retrieve data from the space that match a certain pattern. This is also known as the blackboard metaphor. Tuple space may be thought as a form of distributed shared memory.

Tuple spaces were the theoretical underpinning of the Linda language developed by David Gelernter and Nicholas Carriero at Yale University.

Implementations of tuple spaces have also been developed for Java (JavaSpaces), Lisp, Lua, Prolog, Python, Ruby, Smalltalk, Tcl, and the .NET framework.

Object Spaces[edit]

Object Spaces is a paradigm for development of distributed computing applications. It is characterized by the existence of logical entities, called Object Spaces. All the participants of the distributed application share an Object Space. A provider of a service encapsulates the service as an Object, and puts it in the Object Space. Clients of a service then access the Object Space, find out which object provides the needed service, and have the request serviced by the object.

Object Spaces, as a computing paradigm, was put forward in the 1980s by David Gelernter at Yale University. Gelernter developed a language called Linda to support the concept of global object coordination.

Object Space can be thought of as a virtual repository, shared amongst providers and accessors of network services, which are themselves abstracted as objects. Processes communicate among each other using these shared objects — by updating the state of the objects as and when needed.

An object, when deposited into a space, needs to be registered with an Object Directory in the Object Space. Any processes can then identify the object from the Object Directory, using properties lookup, where the property specifying the criteria for the lookup of the object is its name or some other property which uniquely identifies it. A process may choose to wait for an object to be placed in the Object Space, if the needed object is not already present.

Objects, when deposited in an Object Space are passive, i.e., their methods cannot be invoked while the objects are in the Object Space. Instead, the accessing process must retrieve it from the Object Space into its local memory, use the service provided by the object, update the state of the object and place it back into the Object Space.

This paradigm inherently provides mutual exclusion. Because once an object is accessed, it has to be removed from the Object Space, and is placed back only after it has been released. This means that no other process can access an object while it is being used by one process, thereby ensuring mutual exclusion.


JavaSpaces is a service specification providing a distributed object exchange and coordination mechanism (which may or may not be persistent) for Java objects. It is used to store the distributed system state and implement distributed algorithms. In a JavaSpace, all communication partners (peers) communicate and coordinate by sharing state.

JavaSpaces can be used to achieve scalability through parallel processing, it can also be used to provide reliable storage of objects through distributed replication, although this won't survive a total power failure like a disk; it is regarded by many to be reliable as long as the power is reliable. Distribution can also be to remote locations; however, this is rare as JavaSpaces are usually used for low-latency, high-performance applications rather than reliable object caching.

The most common software pattern used in JavaSpaces is the Master-Worker pattern. The Master hands out units of work to the "space", and these are read, processed and written back to the space by the workers. In a typical environment there are several "spaces", several masters and many workers; the workers are usually designed to be generic, i.e. they can take any unit of work from the space and process the task.

JavaSpaces is part of the Java Jini technology, which on its own has not been a commercial success.[1] The technology has found and kept new users over the years and some vendors are offering JavaSpaces-based products. JavaSpaces remains a niche technology mostly used in the financial services and telco industries where it continues to maintain a faithful following. The announcement of Jini/JavaSpaces created quite some hype although Sun co-founder and chief Jini architect Bill Joy put it straight that this distributed systems dream will take "a quantum leap in thinking".[2]

Example usage[edit]

The following example shows an application made using JavaSpaces. First, an object to be shared in the Object Space is made. Such an object is called an Entry in JavaSpace terminology. Here, the Entry is used to encapsulate a service which returns a Hello World! string, and keeps track of how many times it was used. The server which provides this service will create an Object Space, or JavaSpace. The Entry is then written into the JavaSpace. The client reads the entry from the JavaSpace and invokes its method to access the service, updating its usage count by doing so. The updated Entry is written back to the JavaSpace.

// An Entry class
public class SpaceEntry implements Entry {
     public final String message = "Hello World!";
     public Integer count = 0;
     public String service() {
         return message;
     public String toString() {
         return "Count: " + count;
// Hello World! server
public class Server {
     public static void main(String[] args) throws Exception {
         SpaceEntry entry = new SpaceEntry();            // Create the Entry object
         JavaSpace space = (JavaSpace)space();           // Create an Object Space
         // Register and write the Entry into the Space
         space.write(entry, null, Lease.FOREVER);        
         // Pause for 10 seconds and then retrieve the Entry and check its state.
         Thread.sleep(10 * 1000);
         SpaceEntry e = space.read(entry, null, Long.MAX_VALUE);
// Client
public class Client {
     public static void main(String[] args) throws Exception {
         JavaSpace space = (JavaSpace) space();
         SpaceEntry e = space.take(new SpaceEntry(), null, Long.MAX_VALUE);
         space.write(e, null, Lease.FOREVER);




Tuple Space Implementations[edit]

Project Supported Languages License used Notable features
Apache River Java Apache License Based on the Jini project that Sun contributed to Apache. See page.
The Blitz Project Java BSD License Single site server.
The Fly Object Space Java, Ruby, Scala Commercial.
Allows free non-commercial use.
GigaSpaces Java, .Net, C++ Commercial.
Offers free "community license" with a subset of features.
Clustered, fault-tolerant.
Heterocera Ruby BSD License Web server based.
LighTS Java LGPL lightweight
Linda in a Mobile Environment (LIME) Java LGPL Suited for pure mobile environments, no server (light house) to host tuple spaces required
LinuxTuples C, Python BSD License Clustered.
MozartSpaces Java AGPL Provides many features and extensibility options.
polyester Java GPL lightweight, extension of LighTS
PyLinda Python GPL See page.
Rinda Ruby Ruby License See page.
simple spaces Java GPL lightweight
SemiSpace Java Apache License
SQLSpaces Server: Java.
Clients: Java, C#, PHP, Prolog, Ruby.
AGPL (server) + LGPL (clients)
TIBCO ActiveSpaces Java, .Net, C/C++ Commercial Clustered, fault-tolerant.
Tuple Spaces Java LGPL In-process and remote options

Inactive Projects:

  • SlackSpaces, open-source, main website down, project source is downloadable
  • SmallSpaces, Open Source implementation of the Linda/Tuplespace programming model
  • TSpaces, by IBM for Java, project stalled since 2000

See also[edit]


  1. ^ Lee Gomes: "Sun Microsystems' Predictions For Jxta System Sound Familiar". The Wall Street Journal, June 4th 2001
  2. ^ Rob Guth: "More than just another pretty name: Sun's Jini opens up a new world of distributed computer systems". SunWorld, August 1998 [15 January 2006]


External links[edit]

Original courtesy of Wikipedia: http://en.wikipedia.org/wiki/Tuple_space — Please support Wikipedia.
This page uses Creative Commons Licensed content from Wikipedia. A portion of the proceeds from advertising on Digplanet goes to supporting Wikipedia.
275 videos foundNext > 

BISSA - A Scalabale Tuple Space

BISSA is a scalable and distributed Tuple Space implementation which can be used as a decoupled , easy to program distributed shared memory abstraction for distributed applications.We BISSA-team.

Tspaces demonstration - Tuple spaces

Small application showing the primitive functions of IBM TSpaces technology.

Chat utilizando Tuple Space em Java

Trabalho do Curso de Engenharia de Computação da cadeira de Programação Paralela de Distribuída. Chat desenvolvido utilizando Tuple Space em Java.

Pictionary game implemented with Tuple Space

flash tuple space

TeenyLIME with tuple spaces stored on the TMote flash.

Develop peer 2 peer java Applicaions using BISSA

BISSA is a Scalable and distributed tuple space implementation. In this screen cast Charith Wickramarachchi shows how to develop Peer to Peer java Applications using BISSA peer to peer ...


BISSA is a Highly scalable lightweight Tuple Space Implementation which is an ideal messaging framework for Distributed application development as well as gadget applications for gadget servers...

Unizor - Vectors - Tuple Representation

Consider a point moving along the straight line. We would like to use vectors to represent its velocity (that is, the speed and the direction of its movement along the straight line). Let's...

BISSA Publish Subscribe Simulation

BISSA is a Highly scalable lightweight Tuple Space Implementation.....This screen cast shows how BISSA-in browser Tuple space can be used to simulate publish-subscribe using it's javascript...

TIBCO Activespaces

This video consists of the following points i have covered 1. Create a Metaspace 2. Create a Space. 3. Add a tuple using Designer. 4. Add a tuple using Spacebar. 5. Also did alot of timepass...

275 videos foundNext > 

6 news items

Mon, 13 Jul 2009 17:31:30 -0700

A tuple space provides a repository of tuples that can be accessed concurrently. The tuples basically provide 3 access primitives: write (writes a tuple to the tuple space), read (reads a tuple from the tuple space), take (reads and removes a tuple ...
Mon, 11 Feb 2013 08:57:25 -0800

Both The New York Times and the Wall Street Journal just came out with stories claiming that “Apple is experimenting with wristwatch-like devices made of curved glass,” at its Cupertino HQ (NYT) and that, “the company has discussed such a device with ...
Sun, 11 Nov 2007 00:00:00 -0800

GigaSpaces is a tuple-space in the same way that Tibco is a pub-sub messaging system. That is to say, the foundation is a tuple-space, but they've added high-level capabilities based on their core transport mechanism. So, they now have a distributed ...


Tue, 17 Sep 2013 08:33:21 -0700

Die FAZ hat heute ihr Feuilleton durchkomponiert – zum Thema Fortschrittskritik. Den argumentativen Reigen eröffnet Evgeny Morozov mit einer ganzseitigen Hymne auf den neuen Roman von Thomas Pynchon „Bleeding Edge“, der gerade ausgeliefert wird.
InfoQ Japan
Mon, 20 Jul 2009 13:07:24 -0700

Ruby バージョン1.8 は,そのグリーンスレッドモデルの性能の低さが以前から批判されている。Luc Castera氏は RubyNation コンファレンスで,Ruby とタプルスペースによる並列プログラミングの発表を行った。コンピュータ世界のさまざまなスレッディングモデルについて Ruby ...
InfoQ: 时刻关注企业软件开发领域的变化与创新
Wed, 15 Jul 2009 19:26:23 -0700

Ruby因为其1.8版本的用户空间线程模型而饱受批评。Luc Castera在RubyNation会议上给出了通过Ruby和元组空间进行并行编程的演讲。在介绍了目前诸多应用(如Ruby 1.8、Ruby 1.9、JRuby和Erlang等)所实现的不同的线程模 ...

Oops, we seem to be having trouble contacting Twitter

Support Wikipedia

A portion of the proceeds from advertising on Digplanet goes to supporting Wikipedia. Please add your support for Wikipedia!

Searchlight Group

Digplanet also receives support from Searchlight Group. Visit Searchlight