Serialisation Flashcards
What is serialisation?
Serialisation is the process of converting an object into a byte array. JVM can use this byte array to transmit/read the object over a network.
What is the purpose of serialisation?
Communication: used for transmitting an object over network between two machines.
Persistence: we can store the objects state in a database and retrieve it later on.
Caching: serialisation can be used for caching to improve performance.
JVM Synchronisation: it can be used in the same way across multiple types of JVM.
What is deserialisation?
The process of reconstructing an object from the serialised state.
What is serialisation and deserialisation conceptually?
Serialisation is converting an object into a stream of bytes. Deserialisation is converting a stream of bytes into an object.