Book Image

Infinispan data grid platform definitive guide

Book Image

Infinispan data grid platform definitive guide

Overview of this book

Table of Contents (20 chapters)
Infinispan Data Grid Platform Definitive Guide
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Improving the serialization process using externalizers


If something is clear at this point of the book, it is that when you put some object in the cache, the object will be serialized into a stream of bytes to be sent across the network into the target node, and then replicated between peers of the grid. And when you get an object from the grid, the cache entry needs to be deserialized back into a live object.

The process of serializing and deserializing an object can be time consuming; in normal configurations, this process can take around 20 percent of the time (it's important to note that Infinispan doesn't use the standard serialization mechanism due to performance reasons). Throughout the default Java serialization process, several reflection calls must be made to discover all the information needed about the class, and along the description of the class itself.

All the class description information is included in the stream, such as the serializable superclasses, field values, and all...