The Artima Developer Community
Sponsored Link

Make Room for JavaSpaces, Part I
Ease the Development of Distributed Apps with JavaSpaces
by Eric Freeman and Susan Hupfer
First Published in JavaWorld, November 1999

<<  Page 2 of 9  >>


A New Distributed Computing Model

Building distributed applications with conventional network tools usually entails passing messages between processes or invoking methods on remote objects. In JavaSpaces applications, in contrast, processes don't communicate directly, but instead coordinate their activities by exchanging objects through a space, or shared memory. A process can write new objects into a space, take objects from a space, or read (make a copy of) objects in a space; Figure 1 depicts several processes (represented by Dukes) interacting with spaces using these operations. When taking or reading objects, processes use simple matching, based on the values of fields, to find the objects that matter to them. If a matching object isn't found immediately, then a process can wait until one arrives. In JavaSpaces, unlike conventional object stores, processes don't modify objects in the space or invoke their methods directly -- while there, objects are just passive data. To modify an object, a process must explicitly remove it, update it, and reinsert it into the space.

Figure 1. Processes use spaces and simple operations to coordinate activities
Copyright Sun Microsystems, Inc.

<<  Page 2 of 9  >>

Sponsored Links

Copyright © 1996-2018 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use