The External data representation and marshalling of CORBA CDR, Java’s object serialization and XML
CORBA CDR
The Common Object Request Broker Architecture (CORBA) CDR is an external data representation which can be used by variety of programming languages in clients and servers. CDR can represent 15 primitive data types and the data is represented in binary form. The values are transmitted in sender’s byte ordering which is defines in each message. The CORBA is a specification developed by the Object Management Group (OMG).
ORB plays the role of such mediator and provides interoperability between applications on different machines in distributed environments. Main functions of ORB are:
- To find the object implementation for the request;
- To pack the request and its parameters, pass this message to object implementation;
- To wait for the results, decode and return them back to client.
Java’s object serialization
Remote method invocation allows Java developers to invoke object methods, and have them execute on remote Java Virtual Machines (JVMs). In RMI, whole objects can be passed and returned as parameters. It unlike many remote procedure call based mechanisms. That signifies any Java object can be passed as a parameter. Even new objects which class has never been encountered before by the RVM. An object is an instance of a Java class.
Remote method invocation allows Java developers to invoke object methods, and have them execute on remote Java Virtual Machines (JVMs). In RMI, whole objects can be passed and returned as parameters. It unlike many remote procedure call based mechanisms. That signifies any Java object can be passed as a parameter. Even new objects which class has never been encountered before by the RVM. An object is an instance of a Java class.
When comparing CORBA and Java RMI, RMI is java based technology and CORBA has implemented for many different programming languages. RMI uses java interfaces to separation between the interface and the implementation. CORBA uses Interface Definition Language for that. CORBA does not any mechanism to sharing codes but new classes from JVM can be downloaded by RMI programs.
Extensible Markup Language
The XML which can represent even structure data as ASCII text. It is a textual format, verbose and slow when compared to binary but inoperable. It used to enable clients to communicate with web services and for defining the interface and other properties of web services. Object/XML Mapping, or O/X mapping for short, is the act of converting an XML document to and from an object. This conversion process is also known as XML Marshalling.
When comparing XML and CORBA, XML-RPC uses the well-known internet protocols (HTTP) for communication between computers. CORBA has multi-languages feature that including old legacy languages but XML has many implementations including Python, Ruby, Php. CORBA contains mainly simple data types such as strings. Collections of data (structs) can be transferred. Binary transfer of data comprising a smaller volume. XML is an easy implementation of simple data types such as integers. Implementing transfer of objects would be difficult. XML data has many extra words as tags, therefore greater volume of data to transfer. But firewall friendly.
Comparing java RMI and XML, XML is multi-language and RMI is based on the java. Any object that can be serialized is capable of being transferred on RMI. Binary transfer of data. But XML has simple data types.Implementing transfer of objects would be difficult. XML data has many extra words as tags, therefore greater volume of data to transfer.