CORBA
CORBA
CORBA
CORBA
Common Object Request Broker
Architecture.
1 General overview
2 Key features
4 Benefits
4.2 OS Independence
6 Firewalls
General overview
CORBA is a mechanism in software for normalizing the method-call
semantics between application objects that reside either in the same address
space (application) or remote address space (same host, or remote host on a
network).
CORBA uses an interface description language (IDL) to specify the interfaces
that objects will present to the outside world. CORBA then specifies a
“mapping” from IDL to a specific implementation language like C++ or Java.
Standard mappings exist for Ada, C, C++, Lisp, Smalltalk, Java, COBOL, PL/I
and Python. There are also non-standard mappings for Perl, Visual Basic,
Ruby, Erlang, and Tcl implemented by object request brokers (ORBs) written
for those languages.
The CORBA specification dictates that there shall be an ORB through which
the application interacts with other objects. In practice, the application simply
initializes the ORB, and accesses an internal Object Adapter which maintains
such issues as reference counting, object (& reference) instantiation policies,
object lifetime policies, etc. 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 for use by the user application.
This step is necessary in order to enforce the CORBA semantics and provide
a clean user processes for interfacing with the CORBA infrastructure.
Some IDL language mappings are more hostile than others. For example,
due to the very nature of Java, the IDL-Java Mapping is rather trivial and
makes usage of CORBA very simple in a Java application. The C++ mapping
is not trivial but accounts for all the features of CORBA, e.g. exception
handling. The C-mapping is even more strange (since it's not an OO
language) but it does make sense and handles the RPC semantics just fine.
(Red Hat Linux delivers with the GNOME UI system, which has its IPC built
on CORBA.)
A "language mapping" requires that the developer ("user" in this case) create
some IDL code representing the interfaces to his objects. Typically a CORBA
implementation comes with a tool called an IDL compiler. This compiler will
convert the user's IDL code into some language-specific generated code. The
generated code is then compiled using a traditional compiler to create the
linkable-object files required by the application. This diagram illustrates how
the generated code is used within the CORBA infrastructure:
Key features
Objects By Reference
Objects are used in an application "by reference". This reference is either
acquired though a "stringified" URI string, NameService lookup (similar to
DNS), or passed-in as a method parameter during a call.
Object references are "lightweight" objects matching the interface of the "real
object" (remote or local). Method calls on the reference result in subsequent
calls to the ORB and blocking on the thread while waiting for a reply, success
or failure. The parameters, return data (if any) , and exception data are
marshaled internally by the ORB according the local language/OS mapping.
Data By Value
The CORBA Interface Definition Language provides the language/OS-neutral
inter-object communication definition. CORBA Objects are passed by
reference, while data (integers, doubles, structs, enums, etc) are passed by
value. The combination of Objects by reference and data-by-value provides
the means to enforce strong data typing while compiling clients and servers,
yet preserve the flexibility inherent in the CORBA problem-space.
Objects by Value (OBV)
Apart from remote objects, the CORBA and RMI-IIOP define the concept of
the OBV. The code inside the methods of these objects is executed locally by
default. If the OBV has been received from the remote side, the needed code
must be either a priori known for both sides or dynamically downloaded from
the sender. To make this possible, the record, defining OBV, contains the
Code Base that is a space separated list of URLs from where this code
should be downloaded. The OBV can also have the remote methods.
The OBV's may have fields that are transferred when the OBV is transferred.
These fields can be OBV's themselves, forming lists, trees or arbitrary graphs.
The OBV's have a class hierarchy, including multiple inheritance and abstract
classes.
External links
(VMCID), which occupies the high order 20 bits, and the minor code
which occupies the low order 12 bits.
Minor codes for the standard exceptions are prefaced by the VMCID
assigned to OMG, defined as the unsigned long constant
CORBA::OMGVMCID, which has the VMCID allocated to OMG
occupying the high order 20 bits. The minor exception codes associated
with the standard exceptions that are found in Table 3-13 on page 3-58
are or-ed with OMGVMCID to get the minor code value that is returned in
the ex_body structure (see Section 3.17.1, “Standard Exception
Definitions,” on page 3-52 and Section 3.17.2, “Standard Minor Exception
Codes,” on page 3-58).
Within a vendor assigned space, the assignment of values to minor codes
is left to the vendor. Vendors may request allocation of VMCIDs by
sending email to tagrequest@omg.org.
The VMCID 0 and 0xfffff are reserved for experimental use. The VMCID
OMGVMCID (Section 3.17.1, “Standard Exception Definitions,” on page
3-52) and 1 through 0xf are reserved for OMG use.
The Common Object Request Broker: Architecture and Specification
(CORBA 2.3)
External links
CORBA/IIOP Specification
Benefits
CORBA brings to the table many benefits that no other single
technology brings in one package. These benefits include language-
and OS-independence, freedom from technology-linked
implementations, strong data-typing, high level of tunability, and
freedom from the details of distributed data transfers.
Language Independence
CORBA at the outset was designed to free engineers from the hang-
ups and limitations of considering their designs based on a particular
software language. Currently there are many languages supported
by various CORBA providers, the most popular are Java and C++.
There are also C-only, SmallTalk, Perl, Ada, and Python
implementations, just to mention a few.
OS Independence
CORBA's design is meant to be OS-independent. CORBA is
available in Java (OS-independent), as well as natively for
Linux/Unix, Windows, Sun, Mac and others.
Some of its failures were due to the implementations and the process
by which CORBA was created as a standard, others reflect problems
in the politics and business of implementing a software standard.
These problems led to a significant decline in CORBA use and
adoption in new projects and areas. The technology is slowly being
replaced by Java-centric technologies
Fundamental flaws
CORBA's notion of location transparency has been criticized; that is,
that objects residing in the same address space and accessible with
a simple function call are treated the same as objects residing
elsewhere (different processes on the same machine, or different
machines). This notion is flawed if one requires all local accesses to
be as complicated as the most complex remote scenario. However
CORBA does not place a restriction on the complexity of the calls.
Many implementations provide for recursive thread/connection
semantics. I.e. Obj A calls Obj B, which in turn calls Obj A back,
before returning.
Design and process deficiencies
The creation of the CORBA standard is also often cited for its
process of design by committee. There was no process to arbitrate
between conflicting proposals or to decide on the hierarchy of
problems to tackle. Thus the standard was created by taking a union
of the features in all proposals with no regard to their coherence.[3]
This made the specification very complex, prohibitively expensive to
implement entirely and often ambiguous.
A design committee composed largely of vendors of the standard
implementation, created a disincentive to make a comprehensive
standard. This was because standards and interoperability increased
competition and eased customers' movement between alternative
implementations. This led to much political fighting within the
committee, and frequent releases of revisions of the CORBA
standard that were impossible to use without proprietary
extensions.[1]
Firewalls
CORBA (more precisely, GIOP) uses binary formats in order to
transmit data. This is more efficient than a textual format (such as
XML), since the amount of data to be transmitted is smaller and less
processing has to be done to encode and decode data. However, it
has been difficult to get such binary messages (is this really true
today?) Firewalls that use HTTP proxy servers are the most difficult
for any other protocol to pass unless the firewall supports SOCKS as
well. At one time it was difficult even to force implementations to use
a single standard port — they tended to pick multiple random ports
instead. Of course in the present century, the current ORBs to do
have these deficiencies. Due to such difficulties, some users have
made increasing use of web services instead of CORBA. These
communicate using XML via port 80, which is normally left open for
web browsing via HTTP. Recent CORBA implementations, though,
support SSL and can be easily configured to work on a single port.
Most of the popular open source ORBS, such as TAO and JacORB
also support bidirectional GIOP, which gives CORBA the advantage
of being able to use callback communication rather than the polling
approach characteristic of web service implementations. Also, more
CORBA-friendly firewalls are now commercially available
CORBA DOCUMENTATION