Serialisation Flashcards

1
Q

What is serialisation?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the purpose of serialisation?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is deserialisation?

A

The process of reconstructing an object from the serialised state.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is serialisation and deserialisation conceptually?

A

Serialisation is converting an object into a stream of bytes. Deserialisation is converting a stream of bytes into an object.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly