See the WebSphere eXtreme Scale Wiki for links to eXtreme Scale Version 7.0 documentation.
If you log in
with your developerWorks ID, you can leave comments and feedback for the development team.
An application stores Java objects in ObjectGrid Maps. These objects need to be serialized and inflated between the client and server or for replication. These objects also might need to be copied. The default Java serialization and copy routines are very slow and can consume 60-70% of the processor in a typical setup. You have the following choices for improving the performance of the serialization:
Write an ObjectTransformer for each BackingMap
An ObjectTransformer can be associated with a BackingMap. Your application can have a class that implements the ObjectTransformer interface and provides implementations for the following operations:
- Copying values
- Serializing and inflating keys to and from streams
- Serializing and inflating values to and from streams
The application does not need to copy keys because keys are considered immutable.
Note: The ObjectTransformer is only invoked when the ObjectGrid knows about the data that is being transformed. For example, when DataGrid API agents are used, the agents themselves as well as the agent instance data or data returned from the agent must be optimized using custom serialization techniques. The ObjectTransformer is not invoked for DataGrid API agents.
Use entities
When using the EntityManager API with entities, the ObjectGrid does not store the entity objects directly into the BackingMaps. The EntityManager API converts the entity object to Tuple objects (see the topic: Using a Loader with entity maps and tuples for details on Tuples). Entity maps are automatically associated with a highly optimized ObjectTransformer. Whenever the ObjectMap API or EntityManager API is used to interact with entity maps, the entity ObjectTransformer will be invoked.
Custom serialization
There are some cases when objects must be modified to use custom serialization, such as implementing the java.io.Externalizable interface or by implementing the writeObject and readObject methods for classes implementing the {[java.io.Serializable}} interface. Custom serialization techniques should be employed when the objects are serialized using mechanisms other than the ObjectGrid API or EntityManager API methods.
For example, when objects or entities are stored as instance data in a DataGrid API agent or the agent returns objects or entities, those objects are not transformed using an ObjectTransformer. The agent, will however, automatically use the ObjectTransformer when using EntityMixin interface. See DataGrid agents and entity based Maps for further details.
Additional information
© Copyright IBM Corporation 2007,2009. All Rights Reserved.