I have been using JavaSpacesTM Technology in
conjunction with Lutris EAS4 for presentation services and I wanted to understand
what was involved in integrating JavaSpaces as an EAS4 service and what benefits
would result.
The following describes my experiences.
JavaSpacesTM is a powerful JiniTM service from Sun Microsystems that facilitates building distributed applications. The JavaSpaces model provides persistent object exchange "spaces"in which remote Java processes can coordinate their actions and exchange data.
In order to use JavaSpaces, it is necessary to run the following:
To get started I used the appwizard to create a service called "JavaSpaces". I then modified the TAP to override the run() method to invoke the JavaSpaces main() entry point. In the TAP MBean, I added a method to return the total number of objects in the space, using the JavaSpaceAdmin object which I obtained from the Jini Lookup Service. In the TAP shutdown() method, I called the destroy() method on the JavaSpaceAdmin object. I then modified the ant buildfile to include the appropriate JavaSpace JARs in my new service JAR and prepared to deploy.
I manually started the RMI codebase server and Lookup Service (I'll integrate
these later, if all goes well). I then used LMC to deploy my new JavaSpaces
service. It started cleanly and worked as expected. Just for fun, I used
LMC to graph the number of object in the space over time, from the value
exposed in the TAP MBean. Very impressive, yet amazlingly simple to implement.
Integrating a JavaSpace as an EAS4 service is simple, once you have decided which approach to follow. It can be started and stopped by simply deploying and undeploying the JavaSpace service and can thus be easily configured to start automatically when EAS4 is launched. Additional management information is very easy to add to the TAP MBean, and the LMC makes it very easy to monitor and/or graph such information.
JavaSpaces technology: http://java.sun.com/products/javaspaces/