Whole document tree
Chapter 1 IntroductionomniORBpy is an Object Request Broker (ORB) that implements the CORBA 2.3 Python mapping [OMG00b]. It is designed for use with omniORB 3, but it can also be used with omniORB 2.8. If you use omniORB 3.0, the full POA functionality is available; with omniORB 2.8 many POA functions are not supported.
This user guide tells you how to use omniORBpy to develop CORBA applications using Python. It assumes a basic understanding of CORBA, and of the Python mapping. Unlike most CORBA standards, the Python mapping document is small, and quite easy to follow.
This manual contains all you need to know about omniORB in order to use omniORBpy. Some sections are repeated from the omniORB manual.
In this chapter, we give an overview of the main features of omniORBpy and what you need to do to setup your environment to run it.
1.1.1 CORBA 2.3 compliantomniORB implements the Internet Inter-ORB Protocol (IIOP). This protocol provides omniORB the means of achieving interoperability with the ORBs implemented by other vendors. In fact, this is the native protocol used by omniORB for the communication amongst its objects residing in different address spaces.
Moreover, the IDL to Python language mapping provided by omniORBpy conforms to the 2.3 Python mapping specification1.
1.1.2 MultithreadingomniORBpy is fully multithreaded2. To achieve low IIOP call overhead, unnecessary call-multiplexing is eliminated. At any time, there is at most one call in-flight in each communication channel between two address spaces. To do so without limiting the level of concurrency, new channels connecting the two address spaces are created on demand and cached when there are more concurrent calls in progress. Each channel is served by a dedicated thread. This arrangement provides maximal concurrency and eliminates any thread switching in either of the address spaces to process a call. Furthermore, to maximise the throughput in processing large call arguments, large data elements are sent as soon as they are processed while the other arguments are being marshalled.
1.1.3 Missing featuresomniORBpy is not a complete implementation of the CORBA 2.3 core. The following is a list of the missing features.
1.2 Setting up your environmentomniORBpy relies on the omniORB C++ libraries. If you are building from source, you must first build omniORB itself, as detailed in the omniORB documentation. After that, you can build the omniORBpy distribution, according to the instructions in the release notes.
1.2.1 PathsFor Python to find omniORBpy, you must add two directories to the PYTHONPATH environment variable. The lib/python directory contains platform-independent Python code; the lib/$FARCH directory contains platform-specific binaries, where FARCH is the name of your platform, such as i586_linux_glibc or x86_win32.
On Unix platforms, set PYTHONPATH with a command like:
export PYTHONPATH=$PYTHONPATH:$TOP/lib/python:$TOP/lib/$FARCHOn Windows, use
set PYTHONPATH=%PYTHONPATH%;%TOP%\lib\python;%TOP%\lib\x86_win32(Where the TOP environment variable is the root of your omniORB tree.)
You should also add the bin/$FARCH directory to your PATH, so you can run the IDL compiler, omniidl. Finally, add the lib/$FARCH directory to LD_LIBRARY_PATH, so the omniORB core library can be found.
1.2.2 Configuration file
ORBInitRef NameService=<URI for the Naming Service>The easiest way of specifying the Naming Service is with a corbaname: URI, as described in section 4.1.2.
Comments in the configuration file should be prefixed with a `#' character.
On Win32 platforms, the naming service reference can be placed in the system registry, in the (string) value ORBInitRef, under the key
omniORB 2.8 configuration file entriesORBInitRef is new with omniORB 3. Under omniORB 2.8, you must use the older format (which is still supported by omniORB 3):
NAMESERVICE <IOR for the Naming Service>Two other entries are also supported, but with omniORB 3 are made obsolete by the Interoperable Naming Service URIs:
ORBInitialHost <hostname string> ORBInitialPort <port number (1-65535)>The corresponding entries under the Win32 system registry are the keys named ORBInitialHost and ORBInitialPort.
The two entries provide information to the ORB to locate a (proprietary) bootstrap service at runtime. The bootstrap service is able to return the initial object reference for the Naming Service and others.