Distributed and cloud computing

Divya Bandara
3 min readJun 21, 2020

External data representation and marshalling of CORBA, Java object serialization and XML…

I) CORBA’s common data representation

The Common Object Request Broker Architecture (CORBA) is a messaging mechanism by which the objects can communicate each other regardless of the platform and language used to develop the objects in a distributed network. The CORBA specification was developed by Object Management Group (OMG). The CORBA consists of server provider and the client. The server and the client communicate with each other independent of the programming language of the operating system in which they run. 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 Object Request Broker (ORB) in the CORBA specification is the mediator which interacts applications with other objects.

The application initializes the ORB and accesses an internal object adapter-which maintains things like reference counting, object instantiation policies and object lifetime policies. The object adapter is used to register instances of the generated code classes. Generated code classes are the result of compiling the user IDL code, which translates the high-level interface definition into an OS- and language-specific class base to be applied by the user application. This step is necessary in order to enforce CORBA semantics and provide a clean user process for interfacing with the CORBA infrastructure.

II) Java’s object serialization

An object is an instance of a java class. In Remote Method Invocation, it allows whole objects to be passed and returned. RMI allows Java developers to invoke object methods and execute them on remote Java Virtual Machine (JVM). This mean that any java object even an object that has never been encountered can be passes as a parameter. Both objects and primitive data value may be passed as arguments and results of method invocations. Serializable interface allows its instances to be serialized.

III) XML

XML used to enable clients to communicate with web services. It defines to enable the interfaces and other properties of web services. Object/XML mapping is used to convert an XML document to and from an object and this conversion process is called as XML marshaling.

CORBA vs Java RMI

· RMI is a java specific technology and CORBA has implemented for many languages.

· CORBA uses IDL (Interface Definition Language) to separate interface from implementation and RMI uses java interfaces.

· RMI programs can download new classes from remote JVMs and CORBA does not have a code sharing mechanism.

· CORBA took care of a lot of the necessary synchronization for concurrent code, which is explicitly using in RMI.

XML vs CORBA

· XML data format adds overhead compared to CORBA’s binary format.

· CORBA forces to explicitly define interfaces and XML there is no exact way.

· CORBA provides a complete end to end transport, session and presentation layer. XML only defines the presentation layer, leaving the other layers to be agreed upon separately.

· 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.

XML vs java RMI

· While XML is multi-language and RMI is based on Java.

· While XML has simple data types, any object can be serializing as capable of being transferred in RMI.

--

--