The jPOS Space is a general-purpose coordination component inspired 
after *The Linda Coordination Language.* footnote:[ See http://www.cs.yale.edu/Linda/linda-lang.html ] 

While jPOS's Space *is not* a Linda implementation, we highly recommend learning about 
*Linda* in order to better understand our Space component and motivation.

You can think about jPOS's Space component as being like a Map where its
entries are lists of objects and its operations are fully synchronized. 

There are three basic operations: 

* +void out (Object key, Object value)+ Puts an object into the space. If an
 object under the given key already exists, the object is queued at the end of
 a list under that name.

* +Object rd (Object key)+
  Reads an object from the space under the given key. Blocks until an entry is present.

* +Object in (Object key)+
  Take the object off the queue. Block until the object under the given key is present.

[TIP]
=====
We picked those cryptic operation names after the Linda Coordination Language
basic operations, but could have used easier to remember names such as:

* **write** instead of 'out'
* **read** instead of just 'rd'
* **take** instead of 'in'
=====

After two consecutive 'out' operations using the same 'key' value, the
Space would look like this (first entry is printed as a blue circle while
the second one is red):

image:images/space-out.jpg[width="500px",alt="SpaceOut"]

Then an 'rd' operation would return the first entry (the blue one), without
removing it from the space. The space remains with two entries for that particular
key.
image:images/space-rd.jpg[width="400px",alt="SpaceOut"]

The 'in' operation on the other hand, takes the first entry (the blue one) off the
Space, leaving the red one.

image:images/space-in.jpg[width="400px",alt="SpaceOut"]

At this point, a new 'rd' operation will return the second entry (the red one)
and an 'in' operation would return the red one as well, leaving the space empty
(further 'rd' or 'in' operations on that particular key will block.

