Current location - Quotes Website - Signature design - What is the difference between corba and RMI?
What is the difference between corba and RMI?
RMI defines a set of remote interfaces that can be used to generate remote objects. Clients can use the same syntax as methods of local objects to call remote objects. The classes and methods provided by RMI API can handle the basic communication and serialization of parameter reference requirements for accessing remote methods.

The remote method call is similar to the remote procedure call (RPC) proposed by Sun Company in 1985. RPC also needs to serialize parameters and return numerical data, but the situation is relatively simple because it does not involve objects. Sun developed an external data representation (XDR) system to support data serialization. An important difference between RPC and RMI is that RPC uses fast and unreliable UDP protocol, while RMI uses slow and reliable TCP/IP protocol.

Remote Method Call (RMI) and CORBA are both distributed computing technologies, which have their own advantages and disadvantages. In order to help understand the characteristics and uses of RMI, it is necessary to discuss the differences between CORBA and RMI.

CORBA (Common Object Request Broker Architecture) is the object management architecture of OMG, and it is the standard for establishing an object-oriented distributed system. CORBA is designed as an open specification, which can be used by all programming languages. That is to say, a Java client on one machine can request the service of another machine using SmallTalk or C++. It is the independence of this language that makes CORBA so flexible and attractive. In order to adapt to language independence, CORBA adopts a very common standard as its interface. In different languages, remote call, signature and object introduction have different definitions, so CORBA must be as neutral and open as possible. It is this universality that is a weakness of CORBA. When developers adopt CORBA, they need to define the language interface with a new standard, which requires developers to learn new programming interfaces, thus reducing the transparency of the remote model.

RMI is only developed for Java-to-Java distributed computing. The standard of remote call is developed for Java and the natural Java signature and call of Java application, which makes RMI quite transparent to Java developers and easy to implement. RMI is closely combined with Java language, which can provide very good fault tolerance and exception handling compared with CORBA. Although the RMI standard of Java is not as independent as CORBA, Java itself is an independent platform, which makes RMI a good choice in cross-platform distributed software development.

IIOP

It is a protocol of CORBA 2.0 and compatible platforms. The initial stage of the protocol is to establish the following components: a gateway from IIOP to HTTP, which allows CORBA clients to access WWW resources; Gateway from HTTP to IIOP, through which CORBA resources can be accessed; A server that provides resources for IIOP and HTTP, and a browser that can recognize IIOP as a protocol.