VMware GemFire PDX Serialization
VMware GemFire’s Portable Data eXchange (PDX) is a cross-language data format that can reduce the cost of distributing and serializing your objects. PDX stores data in named fields that you can access individually, to avoid the cost of deserializing the entire data object. PDX also allows you to mix versions of objects where you have added or removed fields.
VMware GemFire PDX serialization offers several advantages in terms of functionality.
To use PDX serialization, you can configure and use VMware GemFire’s reflection-based autoserializer, or you can program the serialization of your objects by using the PDX interfaces and classes.
You can configure your cache to automatically serialize and deserialize domain objects without having to add any extra code to them.
For a domain object that you cannot or do not want to modify, use the
PdxSerializerclass to serialize and deserialize the object’s fields. You use one
PdxSerializerimplementation for the entire cache, programming it for all of the domain objects that you handle in this way.
For a domain object with source that you can modify, implement the
PdxSerializableinterface in the object and use its methods to serialize and deserialize the object’s fields.
PdxInstanceis a light-weight wrapper around PDX serialized bytes. It provides applications with run-time access to fields of a PDX serialized object.
JSONFormatterAPI allows you to put JSON formatted documents into regions and retrieve them later by storing the documents internally as PdxInstances.
You can use the
PdxInstanceFactoryinterface to create a
PdxInstancefrom raw data when the domain class is not available on the server.
VMware GemFire allows you to persist PDX metadata to disk and specify the disk store to use.
Using PDX objects as region entry keys is highly discouraged.