How CORBA differs from RMI ? Discuss the concepts of IDL briefly.
The difference between COBRA & RMI are as follows:-
- CORBA has an implementation for many languages.
- It uses Interface Definition Language (IDL) to separate interface from implementation.
- CORBA objects are not garbage collected because it is language independent and some languages like C++ do not support garbage collection.
- CORBA does not support this code-sharing mechanism.
- CORBA passes objects by reference.
- CORBA is a peer-to-peer system.
- CORBA uses Internet Inter-ORB Protocol as its underlying remoting protocol.
- The responsibility of locating an object implementation falls on the Object Adapter either Basic Object Adapter or Portable Object Adapter.
- RMI is a Java-specific technology.
- It uses a Java interface for implementation.
- RMI objects are garbage collected automatically.
- RMI programs can download new classes from remote JVMs.
- RMI passes objects by remote reference or by value.
- Java RMI is a server-centric model.
- RMI uses the Java Remote Method Protocol as its underlying remoting protocol.
- The responsibility of locating an object implementation falls on JVM.
2nd Part :
Interface Description Language (IDL)
An Interface Description Language (IDL) is a specification language used to describe a software component’s interface. IDLs describe an interface in a language-independent way, enabling communication between software components that do not share a language- for example, between components written in C++ and components written in java.
We can’t write the actual programs in IDL because it lacks the logic and flows control structure, instead, IDL concentrates on type definitions, both for primitive and class types, so you can use it instead to define the interface, not implementation. For example, and function used to calculate tax on order might be defined like this :
float calculate_tax(in float amount);