Why keeping serialized for in cache improve the performance when using Coherance?

StackOverflow https://stackoverflow.com/questions/23584545

  •  19-07-2023
  •  | 
  •  

Frage

I am new to Coherance and I am going through the http://www.benstopford.com/2009/03/04/oracle-coherence-part-i-an-introduction/ blog post and in his blog, the second reason he says coherance is fast because it keeps the data in serialized format. Please bear with me here on my understanding.

"Objects are always held in their serialised form (using an efficient binary encoding named POF – find out more about this here). Holding data in a serialised form allows Coherence to skip the serialisation step on the server meaning that data requests only have one serialisation hit, occurring when they are deserialised on the client after a response. Note that both keys and values are held in their serialised form (and in fact the hash code has to be cached as a result of this)."

When you want to use data in your application from cache, you will have to read the serialized data and then deserialize the data to use it. When you want to save the data back you have to serialize the modified data. So I did not understand the second point as a benefit.

War es hilfreich?

Lösung

Information can only be moved over a network in a binary format, which (in Java terms) means that the objects (the data) need to be serialized. Outside of one special case (an advanced programmatic option called the "object backing map"), the servers always store the information in a serialized form, so that the information is ready to go "on the wire". Additionally, using indexes, the servers can also store various parts of the information in their deserialized form, which speed up server-side processing (queries, entry processors, aggregators).

Caches on the clients (called "near" caches) are managed in the deserialized form, so that data cached locally does not need to be repeatedly deserialized.

Andere Tipps

Coherence will store the data in different nodes and servers ,so keeping the information in serliazed format to transfer the data between one node to another node . When we want to share the object between multiple languages POF is really useful . In our application we store the Data from .NET coherence DLL and retrive the data from java .

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top