CORBA
Common Object Request Broker Architecture (CORBA): is a specification developed by the Object Management Group (OMG) to provide interoperability among distributed objects. (1) It allows programs at different locations and developed by different vendors to communicate in a network through an "interface broker."
To understand how CORBA works, there are four main aspects of the architecture that you should appreciate:
Object Request Broker (ORB): is the central component in CORBA. It provides the mechanism required for distributed objects to communicate with one another, whether locally or on remote devices, written in different languages, or at different locations on a network.
Interface Definition Language (IDL): defines the modules, interfaces and operations for the applications and is not considered a programming language. The various programming languages, such as Ada, C++, or Java, supply the implementation of the interface via standardized IDL mappings.
The Naming Service: allows you to register an instance of a class, so that a client can look up this instance and gain a reference to it.
Inter-ORB communication: based on TCP/IP. It is transport protocols that allow distributed ORBs to communicate
After you have an IDL interface, you compile it to produce a client stub and an object skeleton. It is through the stub and skeleton that clients and objects communicate.
Client interacting with CORBA object.
A CORBA Client-Server Example:
Server: https://github.com/MarquiseG/Banque_Corba
Client: https://github.com/MarquiseG/Banque_Corba_Client
To run this example, you must do the following.
- Run idlj -fall -v with Banque.idl as the argument to produce the stubs for the CORBA object:
# idlj -fall -v Banque.idl
This generates a directory corbaBanque that contains .java and .class files.
- Start the directory
#start tnameserv
- Compile then run the server:
# javac ServeurCorba.java
# java ServeurCorba
- Compile then run the client:
# javac ServeurCorba.java
# java ServeurCorba
Note : You can add different interfaces in the same module. Following is an example :
•Abstract IDL model
module CourseRegistration {
interface Student {
attribute any personalInfo; attribute any major;
void enroll();
void graduate();
};
interface Course {
attribute any subject;
attribute any semester;
void register();
void cancel();
};
}
References:
- Objective Interface Systems. http://www.ois.com/Products/what-is-corba.html
- Jean Bacon , Tim Harris. Operating Systems: Concurrent and Distributed Software Design. Addison-Wesley Professional, March 2003
- Debbie Law; Peter Roxburgh; Martin Bond; Dan Haywood; Andy Longshaw. Sam Teachs Yourself J2EE in 21 Days. Sams, 2004.
- Corba Objects. https://docs.oracle.com/javase/jndi/tutorial/objects/storing/corba.html
- Mohamed Youssfi. Exemple d'application Client Serveur CORBA. https://www.youtube.com/watch?v=bAaEn2Kl_MY
Comments
-
- 1. maazouza mourad On 05/02/2021
comment fair un chat java server et c++ client avec omniorb -
- 2. Ibrahima On 11/03/2020
Salut
J ai une question très important. En faite comment gérer les idl si on possède plusieurs classes ?
Merci-
- mkarouneOn 14/03/2020
Hi, I have added a note to handle this case.
-
- 3. Laurent On 26/05/2018
Very clean and precise. Thank you.
Add a comment