Speaking in the context of the Java programming language, serialization and deserialization communicates Java's ability to "flatten" an object to a data stream and, conversely, reconstruct the object from a data stream.
The primary player in the "serialization" show is the Serializable interface. The Serializable interface is a "marker" interface. This means that it has no methods or fields, but simply "marks" a class as being able to be serialized. When the Java VM encounters a class that is "marked" as Serializable during a serialization process, the VM will assume that it is safe to write to the stream. This all happens somewhat automatically for a developer.
The serialization and deserialization process is used extensively throughout many of the remote communications processes of the Java platform. The Remote Method Invocation (RMI) mechanism of Java is one of the most notable of these processes. When making a method call within the RMI framework, any non-primitive objects are serialized to the underlying data stream and sent to the target remote process where they are deserialized and reconstructed. A number of different Java technologies including Enterprise JavaBeans (EJB) use the RMI framework.
This was first published in February 2003