JavaSpaces Bulk Operations
Posted by: Dan Creswell in Blitz JavaSpaces, JavaSpaces, JiniFor a number of applications, the standard JavaSpace interface’s single Entry operations are sufficient to construct a scalable and simple solution.
However, there are certain cases where perhaps we’d like to write or take a large batch of Entry’s. With the existing interface this is possible but would incur a significant number of network round trips which can hurt performance. Fortunately, with the release of JINI 2.1 we gained an additional interface JavaSpace05 which provides bulk write/take and some other goodies (which I’ll mention later).
Not only do these bulk operations permit transfer of multiple Entry’s but they also have a provision for the use of multiple templates using an OR-based matching strategy. i.e. take an entry if it matches template A or template B or template C. As with the original operations you get timeouts, leasing and transactions.
Other additions include a second notify method (registerForAvailabilityEvent) which provides more detail concerning the lifetime of an Entry. For example, one can now receive an event to indicate the availability of an Entry as the result of an aborted take.
Lastly we have contents which allows for a form of multiple read against multiple templates. This is treated slightly differently from multiple take in recognition of it’s non-destructive nature. Some developers like to view this feature as an iterator but there are some key differences such as the ability for iteration to never end (due to a constant stream of new writes) and remoteness.
Currently Outrigger (the example JavaSpaces implementation in the Jini Starter Kit) and Blitz provide complete implementations of JavaSpace05. GigaSpaces provide their own equivalents but as yet haven’t announced compatible support for this new standard extension.
Entries (RSS)