Java Programming/JavaSpaces

From Wikibooks, the open-content textbooks collection

Jump to: navigation, search
Navigate Concurrent Programming topic:

JavaSpaces can be viewed as an object repository that provides a distributed persistent object exchange mechanism (persistent can be in memory or disk) for Java objects. It can be used to store the system state and implement distributed algorithms. In a JavaSpace all communication partners (peers) communicate by sharing state. It is an implementation of the Tuple spaces idea.

JavaSpaces is used when someone wants to achieve scalability and availability and at the same time reducing the complexity of the overall system.

Processes perform simple operations to write new objects into a JavaSpace, take objects from a JavaSpace, or read (make a copy of) objects from the JavaSpace.

JavaSpaces technology is part of the Java Jini technology, which has not been a commercial success, although it has found and kept new users over the years. However some vendors are as of 2004 offering JavaSpaces-based products as a way to provide distributed reliable persistence for non-Jini environments.

In conventional applications, obects are assembled from the database before presenting to the end user. In JavaSpace applications, we keep the ready made "end user" objects and store them in the JavaSpace. In JavaSpace applications the services are decoupled from each other; they communicate throught objects that they write and read/take from the JavaSpace. Services search for objects that they want to take or read from the Space by using template object.

Personal tools