| • Science | • People | • Locations | • Timeline |
| Contents | ||
In computer science, serialization means to force one-at-a-time access for the purposes of concurrency control, or to encode a data structure as a sequence of bytes.
This latter form of serialization (which is also referred to as marshalling) involves taking a data structure or object and encoding it into a regular and usually architecture-independent form, suitable for archival to a file, piping to another application, or, by extension, transmission across a network. Usually the encoding takes the form of a byte stream (a sequence of bytes). When receiving a serialized stream, the encoding process is reversed to get a copy of the original data structure.
Serialization has a number of advantages. Serialization provides:
For some of these features to be useful, architecture independence must be maintained. For example, for maximal use of distribution, a computer running on a different hardware architecture should be able to reliably reconstruct a serialized data stream, regardless of endianness. This means that the simpler and faster procedure of directly copying the memory layout of the data structure, cannot work reliably for all architectures. Serializing the data structure in an architecture independent format means that we do not suffer from the problems of byte ordering, memory layout, or simply different ways of representing data structures in different programming languageAn alternate rewrite has been has been. Please refer to it for large rewrites. A programming language or computer language is a standardized communication technique for expressing instructions to a computer. It is a set of syntactic and semantic rules uses.
Serialization however, in some forms, has the disadvantage that since the encoding of the data is serial, merely extracting one part of the data structure that is serialized means that the entire object must be reconstructed or read before this can be done. The serialization capabilities in the Cocoa framework, NSKeyedArchiver, alleviate the problem somewhat, by allowing an object to be archived with each instance variable of the object accessible by using a key.
Serialization, however, breaks the opacityA substance or object that is opaque is neither transparent nor translucent . It does not allow light to pass through it. The property of being opaque is called opacity . Degrees of opacity are converse to degrees of transparency. In science the phrase an of an abstract data typeAbstract data types or ADTs are datatypes described in terms of the operations they support—their interface—rather than how they are implemented. An ADT consists of two components: an interface and an implementation. Users of an ADT are aware of the inter by potentially exposing private implementation details. To discourage competitors from making compatible products, publishers of proprietary softwareProprietary software is any closed-source material which fundamentally means that the user does not control what it does or cannot study or edit the code. The Free Software Foundation defines it as any software that is not free software or is only partial often keep the details of their programs' serialization formats a trade secretIntellectual property A trade secret is a confidential practice, method, process, design, or other information used by a company to compete with other businesses. It is also referred to in some jurisdictions as confidential information. The concept is tha. Some deliberately obfuscateIn computing, obfuscation refers to the deliberate act of nondestructively changing either the source code of a computer program or machine code when the program is in some compiled or binary form, so that it is not easy to understand or read. Binary obfu or even encrypt the serialized data.
Yet, interoperability requires that applications be able to understand the serialization of each other. Therefore remote method call architectures such as CORBA define their serialization formats in detail and often provide methods of checking the consistency of any serialized stream when converting it back into an object.