The document discusses Hazelcast architecture and configuration options. It provides an overview of Hazelcast data structures like maps, queues, locks and topics. It then details different serialization options in Hazelcast like Serializable, DataSerializable, Portable and pluggable serialization. It benchmarks the different serialization approaches by serializing a shopping cart object and finds that pluggable serialization using Kryo provides the best performance with read throughput of 60 ops/ms and size of 210 bytes. The presentation concludes with a Q&A session.
34. IdentifiedDataSerializable
34
Pros
Efficient than Serializable in terms of CPU and Memory
Doesn’t use Reflection while de-serializing
Cons
Hazelcast specific
Requires to implement the actual serialization
Requires to implement a Factory and configuration
39. Portable
39
Pros
Efficient than Serializable in terms of CPU and Memory
Doesn’t use Reflection while de-serializing
Supports versioning
Supports partial de-serialization during Queries
Cons
Hazelcast specific
Requires to implement the actual serialization
Requires to implement a Factory and Class Definition
Class definition is also sent together with Data but stored only
once per class
44. Pluggable – (ex: Kryo)
44
Pros
Doesn’t require class to implement an interface
Very convenient and flexible
Can be stream based or byte array based
Cons
Requires to implement the actual serialization
Requires to plug and configure
51. Compression
51
Compresses the data.
Can be applied to Serializable and Externalizable
only.
Very slow (~1000 times) and CPU consuming.
Can reduce 525 bytes to 26 bytes.
The programmatic configuration is the most important one; other mechanisms are built on top of it.
Fail-fast approach.
Fail-fast approach.
fluent interface
no static default hazelcastinstance
fluent interface
no static default hazelcastinstance
BINARY: the value is stored in binary format. Every time the value is needed, it will be deserialized.
OBJECT: the value is stored in object format. If a value is needed in a query/entry-processor, this value is used and no deserialization is needed.
queue
Serializing a Java object into binary
De-serializing a binary data into Java object
Serializing a Java object into binary
De-serializing a binary data into Java object
Serializing a Java object into binary
De-serializing a binary data into Java object