How to implement a simple tuple space

Oliver Plohmann <[email protected]> Thu, 20 Nov 2008 19:27:21 +0100
Newsgroups gmane.comp.java.sun.javaspaces
Message-ID <[email protected]>
Hello,

lately I asked myself how to implement a tuple space. Couldn't resist 
and had to sit down and do some prototyping. The idea is that nodes are 
added to java.util.CuncurrentHashMaps to which locking is delegated. All 
other synchronization takes place inside special tree iterators and not 
in the nodes. As it turned out the problem was then how to remove empty 
nodes to reclaim memory while allowing for a high degree of concurrent 
accesses to the tree and carrying out the node removal process with 
little lock contention. And I learned that writeSingleton is hard to 
implement in a thread-safe way with little lock contention...

I put a sketch with a short explanation onto my homepage: 
www.objectscape.org/tstree.pdf. Maybe somebody would have a little time 
to peruse it somewhat and tell me whether the approach IHHO makes 
somewhat sense or not. I have some suspicion that while what I came up 
with is not bad, there might be something I missed. If my little tuple 
space prototype basically works, I have some idea what to do next... ;-).

Regards, Oliver Plohmann

===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff JAVASPACES-USERS".  For general help, send email to
[email protected] and include in the body of the message "help".

To view past JAVASPACES-USERS postings, please see:
http://archives.java.sun.com/archives/javaspaces-users.html