Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

POF vs Java serialization for Oracle Coherence

I understand that POF is needed if you are using C++ and .Net clients. However, what are the factors that can help decide whether to use POF for Java clients using Oracle Coherence cache?

As per the Oracle documentation, POF gives performance benefit over default java serialization. So, why don't all applications using Coherence go for POF instead of Java serialization?

like image 810
kira Avatar asked Jun 23 '13 20:06

kira


People also ask

What is POF serialization?

Serialization is the process of encoding an object into a binary format. It is a critical component when working with Coherence as data must be moved around the network.

What is Oracle Coherence used for?

In-memory data grid enables application developers and managers fast access to key-value data. Coherence ensures for customers maximum scalability and performance in enterprise applications by providing clustered low-latency data storage, polyglot grid computing, and asynchronous event streaming.

What is Java serialization?

To serialize an object means to convert its state to a byte stream so that the byte stream can be reverted back into a copy of the object. A Java object is serializable if its class or any of its superclasses implements either the java. io. Serializable interface or its subinterface, java.


1 Answers

From my understanding:

Java serialisation

  • Advantages

    • (+) Java built-in.
    • (+) Does not require any coding.
  • Disadvantages

    • (-) May not be compatible between different versions of Java and can not be used in ther languages.
    • (-) Can be large.

POF serialisation

  • Advantages
    • (+) Can be smaller.
    • (+) Not reliant on Java, can be used in different versions of Java and other languages.
  • Disadvantages
    • (-) Extra methods must be coded: extra work and can lead to errors.
    • (-) Format and coding can get complicated for complex structures.

Also, you could look at the various serialisation schemas: JSON, XML, Protocol Buffers, Avro, Thrift, etc. In longer term, they may offer these advantages:

  • Cross-language support.
  • Built-in serialisation/deserialisation.
  • External support of the project.
    • Protocol Buffers has a number of utilities written for it (including conversion to JSON, XML, etc.). See: Third-Party Add-ons for Protocol Buffers.
like image 193
Bruce Martin Avatar answered Sep 22 '22 02:09

Bruce Martin