Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Object serialization practical uses?

How many software projects have you worked on used object serialization? I personally never came across a scenario where object serialization was used. One use case i can think of is, a server software storing objects to disk to save memory. Are there other types of software where object serialization is essential or preferred over a database?

like image 497
nash Avatar asked Jun 03 '10 03:06

nash


People also ask

What can object serialization be used for?

Serialization is the process of converting an object into a stream of bytes to store the object or transmit it to memory, a database, or a file. Its main purpose is to save the state of an object in order to be able to recreate it when needed.

Where is serialization used in real time?

The realtime use of serialization is to save the state of object or we can say persist an object and it's mainly use in networks where we want to travel an object over network.

What is the practical use of serialization in Java?

Serialization in Java allows us to convert an Object to stream that we can send over the network or save it as file or store in DB for later usage. Deserialization is the process of converting Object stream to actual Java Object to be used in our program.

Under what practical circumstances might you want to implement custom object serialization?

The two primary use cases for object serialization are: Object persistence— storing the object's state in a permanent persistence mechanism such as a database. Object remoting— sending the object to another computer or system.


1 Answers

I've used object serialization in a lot of my projects. Sometimes we use it to store computer-specific settings locally. I have also used XML serialization to simplify interaction and generation of XML documents. It is also very beneficial in communication protocols. Serialize on one end and re-inflate on the other end.

like image 161
Adam Driscoll Avatar answered Sep 21 '22 02:09

Adam Driscoll