JavaSpaces-The Big Picture
JavaSpaces
The big picture
The big picture
introduction
JavaSpaces is a technology that is mainly directed for parallel processing environments, although it is not a heavy used technology, it is very effective in terms of usage and performance.
you can think of JavaSpaces as a client/server map that contains data waiting for processing; these data have a set of defined rules that controls how these data can be accessed.
JavaSpaces has many usage scenarios, for example; a job producer program, that simply produce task list that needs to be handled by different processors in a parallel enviroment, JavaSpaces allows a high-powered CPU to grab a complex task and another Low-powered CPU to execute less complex tasks.
Getting into action
JavaSpaces is built on JINI, so the first approach to try JavaSpaces is to download JINI starter kit which contains sun's implementation of JavaSpaces called OuTrigger. Another better implementation of JavaSpaces is Blitz, which is much more effective and easy to use than Outrigger, however, blitz is an addition to JINI, that means it is downloaded separately.
Query by example (QBE)
JavaSpaces uses a simple but a smart way for data retrieval called Query By Example ( QBE ). QBE is another language for querying to create and modify relational data, it is different from other query languages in having a GUI that enables users to create example tables on screen.
we will not go much deeper in explaining QBE, but lets say it is a simple way of data access that adds a lot to JavaSpaces. for more information about QBE click here.
Using JavaSpaces
To use JavaSpaces you need first to have an instance of a JavaSpaces implementation to be running to provide a working JavaSpaces workspace to deal with.Once the JavaSpaces implementation is running it is very easy to add entries to it.
Entries in a JavaSpace are basically simple Java Objects that follow a few simple rules:
- All data persisted in the space must be exposed in public fields.
- The Entry interface must be implemented. This is a marker interface, requiring no methods to conform to the interface contract.
- Objects must be used for the properties (i.e., no primitive fields.).
- Implement a Command interface in an Entry, along with any data required to perform the command
- Store the Command into the JavaSpace
- Have a computing resource retrieve the Command and execute it, storing any results back into the JavaSpace for consumption if necessary
There are five basic operations associated with JavaSpaces. They are:
- Read an entry matching a template, leaving it in the JavaSpace
- Take an entry matching a template from the space, removing it from the JavaSpace
- Write an entry into the JavaSpace
- Register a callback for events in the JavaSpace
- Issue an event in the JavaSpace
References
TheServerSide
WikiPedia - the free encyclopedia
Links
You can Download Blitz here.
No comments:
Post a Comment