External data representation and Marshalling
XDR not only solves data portability problems, but it also permits the reading and writing of arbitrary C language constructs during a consistent and well-documented manner. Therefore, it is sensible to use the XDR library routines even when the info isn’t shared among machines on a network.
XDR standard allows representation of knowledge which is independent of computer architectures, programming languages, and compiler conventions. Hence it allows the representation of portable data. this text uses CORBA’s common data representation, Java’s Object Serialization and XML or Extensible terminology as different external data representations.
What is Marshalling?
In the sense of the word, marshal means to assemble and arrange (a group of individuals, especially troops) so as. Accordingly, data marshalling in computing refers to the transformation of data-types into a predetermined naming convention in order that it are often reconstructed with reference to the initial data-type. Marshalling touches the primitive and known data types.
CORBA’s common data representation
There is a design program to be solved, if the middleware is supposed to support many different systems and you have to convert the data then how do you specify what is going on in a modular way?
Corba has common external formats CDR (Common Data Representation).
The interface of objects are described in CORBA IDL which is then compiled by the CORBA interface compiler and the marshalling/unmarshaling operations are generated automatically.
For each new platform, a CORBA IDL compiler has to be provided….
Object Serialization of Java
In Java RMI, both objects and primitive data values may be passed as arguments and results of method invocations.
If an object implements the interface Serialisable then the system provides a default serialisation method which the programmer can override if it not sufficient. The contents of all the data members of the class is serialised.
XML
XML may be a markup language that was defined by the planet Wide Web Consortium (W3C) for general use on the online. generally, the term markup language refers to a textual encoding that represents both a text and details on its structure or its appearance.
A textual format for representing structure data that works with any programming technology.
A “markup language” refers to a textual encoding that represents both a text and details on its structure or its appearance. HTML was designed to explain the looks of sites. XML was designed to explain structured documents and markup languages.
XML characteristics
· XML is self-describing.
· XML was intended to be employed by multiple applications for various purposes.
· XML is extensible within the sense that users can define their own tags.
· XML is “textual”, so are often easily read by humans and computers.XML data items are tagged with ‘markup’ strings. The tags are wont to describe the logical structure of the info and to associate attribute-value pairs with logical structures. XML is employed to enable clients to speak with web services and for outlining the interfaces and other properties of web services. However, XML is additionally utilized in many other ways, including in archiving and retrieval systems — although an XML archive could also be larger than a binary one, it’s the advantage of being readable on any computer.