Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

Benefits and drawbacks are described in POF documentation

With standard Java serialisation you don't need to implement readExternal, writeExtrenal methods

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top