JavaOne Conference Trip Report

Java Spaces: A Service for Collaborative Distributed Applications

This was one of the hot sessions in a small room - I got in early and got a good seat, but people were sitting in the aisles (I guess the San Fran fire marshall didn't know about JavaOne).

Java Spaces provides a sort of object repository with persistence, template matching and transactions across multiple spaces. It stores tuples of entries and uses RMI for connection services. This is not an RDB or ODB.

There are four methods defined for a member of a Java Space:

You use these to build cooperative protocols that are loosely coupled, similar to Linda.

Simplicity is a major goal. The idea is to easily provide transactions that are scalable along with replication services. A demo using animation was provided - some of the source is in the slide set (see the sessions images in the navigation bar to see the slide show from the conference).

To build a Java Spaces class, you implement Entry:

You use JavaSpace.write to add a class to a Java Space.

You can access a Java Space class using a template. Each field is a value or a wildcard. Java Spaces assures that you will get back a class that is at least the value provided. This means you can match on the supertype of a class. A lease has been added for timed responses. Transactions that fail go back on the stack. The Java Ring demo was written using Java Spaces.

"If you can model your protocol as an exchange of objects, you can leverage the simplicity of the Java Space model."

The first beta is due out Q2, 1998, with FCS Q3, 1998. For more information you can go to the Java Space web site.