Space History
This section offers an in-depth discussion on our choice to utilize jPOS Spaces for internal communications. It's more of a detailed explanation than a required read, so feel free to skip it if you prefer.
The initial applications we've built with jPOS took advantage of an impressive technology based on Java called JINI (then migrated to Apache River, now retired). JINI had an also impressive and quite advanced technology called JavaSpaces, based on the Linda coordination language.
Regrettably, the initial versions of JavaSpaces faced several challenges when running on slow machines and over sluggish PPP (and even SLIP) 33600bps links. One significant issue was that the network overhead caused by RMI-IIOP was nearly as high as the bandwidth itself. This situation triggered an obscure memory leak in its proxy implementation, leading to considerable trouble in production environments. Sun Microsystems acknowledged this bug and listed it in their Bugzilla — a moment of pride for us — yet the urgency remained for us to find a swift solution to the problem.
JavaSpaces had a very simple interface that mimicked the Linda Coordination Language basic operations:
JavaSpaces | Linda | Comment |
---|---|---|
write | out | Places an entry in the space |
read | rd | Reads an entry from the space |
take | in | Reads, and takes the entry from the space |
with several timeout variations.
The Linda Coordination Language is very powerful, and it used the concept of templates
in read operations that we were not using, so, on a rush, we implemented, over a weekend, the bare minimum set of operations required by the jPOS application:
jPOS Space | Comment |
---|---|
void out(Object key, long timeout) | Places an entry in the space for a given period of time |
Object rd(Object key, long timeout) | Reads an entry from the space (null on timeout) |
Object rdp (Object key) | Reads an entry, if exists. 'p' stands for probe (see the -p convention in the Jargon File. |
Object in(Object key, long timeout) | Read, and take an entry from the space (null on timeout). |
Object inp (Object key) | As in rdp , this is the non blocking version of in |