[.net programming language only][Java programming language only]

Serialization overview

[Version 8.6 and later]Data is serialized to improve performance and reduce the memory footprint of the data grid. The serialization options that you choose depend on many factors, such as how your application interacts with the data grid, the programming language of your data grid applications, or how much data you are storing in the data grid.

When data is serialized, it is converted into a data stream for transmission over a network in the following situations:
  • When clients communicate with servers, and those servers send information back to the client
  • When servers replicate data from one server to another

Alternatively, you might decide to forgo the serialization process through WebSphere® eXtreme Scale and store raw data as byte arrays. Byte arrays are much cheaper to store in memory. The Java™ virtual machine (JVM) has fewer objects to search for during garbage collection. The objects can be deserialized only when they are needed. Use byte arrays only if access to the objects with queries or indexes is not required. Because the data is stored as bytes, eXtreme Scale has no metadata for describing attributes to query.

[Java programming language only]

Serialization for Java applications

To serialize data, you can use [Version 8.6 and later]eXtreme Data format (XDF), Java serialization, the ObjectTransformer plug-in, or the DataSerializer plug-ins. To optimize serialization with any of these options, you can use the COPY_TO_BYTES mode to improve performance up to 70 percent. With COPY_TO_BYTES mode, the data is serialized when transactions commit, which means that serialization happens only one time. The serialized data is sent unchanged from the client to the server or from the server to replicated server. By using the COPY_TO_BYTES mode, you can reduce the memory footprint that a large graph of objects can use.

Use the following figures to help you determine which type of serialization method is most appropriate for your development needs.

Figure 1. Serialization methods that are available when you are running logic that interacts with data objects directly in the data grid shard
Serialization for running logic that directly interacts with data objects that are in the grid shard.
Figure 2. Serialization methods when you are not directly interacting with the data grid shard.
Serialization for running logic that does not directly interact with data objects in the grid shard.
[Version 8.6 and later][.net programming language only]

Serialization for .NET applications

When your environment includes .NET applications, you must use XDF for your data serialization. With XDF, you can serialize and store keys and values in the data grid in a language-independent format. XDF is enabled when your environment has IBM® eXtremeIO (XIO) enabled and COPY_TO_BYTES mode on the map.

Because eXtremeMemory is configured on container servers only, you can use it in an environment that has .NET applications. eXtremeMemory leads to more consistent relative response times in the environment.

To learn more about the supported forms of serialization in the eXtreme Scale product, see the following topics: