~ubuntu-branches/ubuntu/trusty/python-omniorb/trusty

« back to all changes in this revision

Viewing changes to .pc/pythonpath/doc/omniORBpy/omniORBpy001.html

  • Committer: Bazaar Package Importer
  • Author(s): Floris Bruynooghe
  • Date: 2011-05-01 12:42:50 UTC
  • mfrom: (2.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20110501124250-zgkxrv9bqoy7bzm2
Tags: 3.5-2
* debian/omniidl-python.install: fix bug exposed by python2.5
  removal (thanks Jakub Wilk for patch) (closes: #624740)
* debian/control: bump standards version to 3.9.2, no changes needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
 
2
            "http://www.w3.org/TR/REC-html40/loose.dtd">
 
3
<HTML>
 
4
<HEAD>
 
5
 
 
6
<META http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 
7
<META name="GENERATOR" content="hevea 1.10">
 
8
<LINK rel="stylesheet" type="text/css" href="omniORBpy.css">
 
9
<TITLE>Introduction</TITLE>
 
10
</HEAD>
 
11
<BODY >
 
12
<A HREF="index.html"><IMG SRC="contents_motif.gif" ALT="Up"></A>
 
13
<A HREF="omniORBpy002.html"><IMG SRC="next_motif.gif" ALT="Next"></A>
 
14
<HR>
 
15
<H1 CLASS="chapter"><A NAME="htoc1">Chapter&#XA0;1</A>&#XA0;&#XA0;Introduction</H1><P>omniORBpy is an Object Request Broker (ORB) that implements the CORBA
 
16
2.6 Python mapping&#XA0;[<A HREF="omniORBpy011.html#pythonmapping">OMG01b</A>]. It works in conjunction with
 
17
omniORB for C++, version 4.1.</P><P>This user guide tells you how to use omniORBpy to develop CORBA
 
18
applications using Python. It assumes a basic understanding of CORBA,
 
19
and of the Python mapping. Unlike most CORBA standards, the Python
 
20
mapping document is small, and quite easy to follow.</P><P>This manual contains all you need to know about omniORB in order to
 
21
use omniORBpy. Some sections are repeated from the omniORB manual.</P><P>In this chapter, we give an overview of the main features of omniORBpy
 
22
and what you need to do to setup your environment to run it.</P><H2 CLASS="section"><A NAME="toc1"></A><A NAME="htoc2">1.1</A>&#XA0;&#XA0;Features</H2><H3 CLASS="subsection"><A NAME="htoc3">1.1.1</A>&#XA0;&#XA0;Multithreading</H3><P>omniORB is fully multithreaded. To achieve low call overhead,
 
23
unnecessary call-multiplexing is eliminated. With the default
 
24
policies, there is at most one call in-flight in each communication
 
25
channel between two address spaces at any one time. To do this without
 
26
limiting the level of concurrency, new channels connecting the two
 
27
address spaces are created on demand and cached when there are
 
28
concurrent calls in progress. Each channel is served by a dedicated
 
29
thread. This arrangement provides maximal concurrency and eliminates
 
30
any thread switching in either of the address spaces to process a
 
31
call. Furthermore, to maximise the throughput in processing large call
 
32
arguments, large data elements are sent as soon as they are processed
 
33
while the other arguments are being marshalled. With GIOP 1.2, large
 
34
messages are fragmented, so the marshaller can start transmission
 
35
before it knows how large the entire message will be.</P><P>From version 4.0 onwards, omniORB also supports a flexible thread
 
36
pooling policy, and supports sending multiple interleaved calls on a
 
37
single connection. This policy leads to a small amount of additional
 
38
call overhead, compared to the default thread per connection model,
 
39
but allows omniORB to scale to extremely large numbers of concurrent
 
40
clients.</P><H3 CLASS="subsection"><A NAME="htoc4">1.1.2</A>&#XA0;&#XA0;Portability</H3><P>omniORB has always been designed to be portable. It runs on many
 
41
flavours of Unix, Windows, several embedded operating systems, and
 
42
relatively obscure systems such as OpenVMS and Fujitsu-Siemens BS2000.
 
43
It is designed to be easy to port to new platforms. The IDL to C++
 
44
mapping for all target platforms is the same.</P><H3 CLASS="subsection"><A NAME="htoc5">1.1.3</A>&#XA0;&#XA0;Missing features</H3><P>
 
45
<A NAME="sec:missing"></A></P><P>omniORB is not (yet) a complete implementation of the CORBA 2.6 core.
 
46
The following is a list of the most significant missing features.</P><UL CLASS="itemize"><LI CLASS="li-itemize">omniORB does not have its own Interface Repository. However, it
 
47
can act as a client to an IfR. The omniifr project
 
48
(<A HREF="http://omniifr.sourceforge.net/"><TT>http://omniifr.sourceforge.net/</TT></A>) aims to create an IfR for
 
49
omniORB.</LI><LI CLASS="li-itemize">omniORB supports interceptors, but not the standard Portable
 
50
Interceptor API. Interceptor facilities available from Python code are
 
51
quite limited.</LI></UL><P>These features may be implemented in the short to medium term. It is
 
52
best to check out the latest status on the omniORB home page
 
53
(<A HREF="http://omniorb.sourceforge.net/"><TT>http://omniorb.sourceforge.net/</TT></A>).</P><H2 CLASS="section"><A NAME="toc2"></A><A NAME="htoc6">1.2</A>&#XA0;&#XA0;Setting up your environment</H2><P>
 
54
<A NAME="sec:setup"></A></P><P>omniORBpy relies on the omniORB C++ libraries. If you are building
 
55
from source, you must first build omniORB itself, as detailed in the
 
56
omniORB documentation. After that, you can build the omniORBpy
 
57
distribution, according to the instructions in the release notes.</P><H3 CLASS="subsection"><A NAME="htoc7">1.2.1</A>&#XA0;&#XA0;Paths</H3><P>With an Autoconf build (the norm on Unix platforms), omniORBpy is
 
58
usually installed into a location that Python will find it.</P><P>Otherwise, you must tell Python where to find it. You must add two
 
59
directories to the <TT>PYTHONPATH</TT> environment variable. The
 
60
<TT>lib/python</TT> directory contains platform-independent Python code;
 
61
the <TT>lib/</TT><TT>$</TT><TT>FARCH</TT> directory contains
 
62
platform-specific binaries, where <TT>FARCH</TT> is the name of
 
63
your platform, such as <TT>x86_win32</TT>.</P><P>On Unix platforms, set <TT>PYTHONPATH</TT> with a command like:</P><PRE CLASS="verbatim">   export PYTHONPATH=$PYTHONPATH:$TOP/lib/python:$TOP/lib/$FARCH
 
64
</PRE><P>On Windows, use</P><PRE CLASS="verbatim">   set PYTHONPATH=%PYTHONPATH%;%TOP%\lib\python;%TOP%\lib\x86_win32
 
65
</PRE><P>(Where the <TT>TOP</TT> environment variable is the root of your
 
66
omniORB tree.)</P><P>You should also add the <TT>bin/</TT><TT>$</TT><TT>FARCH</TT> directory
 
67
to your <TT>PATH</TT>, so you can run the IDL compiler, omniidl.
 
68
Finally, add the <TT>lib/</TT><TT>$</TT><TT>FARCH</TT> directory to
 
69
<TT>LD_LIBRARY_PATH</TT>, so the omniORB core library can be found.</P><H3 CLASS="subsection"><A NAME="htoc8">1.2.2</A>&#XA0;&#XA0;Configuration file</H3><UL CLASS="itemize"><LI CLASS="li-itemize">On Unix platforms, the omniORB runtime looks for the environment
 
70
variable <TT>OMNIORB_CONFIG</TT>. If this variable is defined, it
 
71
contains the pathname of the omniORB configuration file. If the
 
72
variable is not set, omniORB will use the compiled-in pathname to
 
73
locate the file (by default <TT>/etc/omniORB.cfg</TT>).</LI><LI CLASS="li-itemize">On Win32 platforms (Windows NT, 2000, 95, 98), omniORB first
 
74
checks the environment variable <TT>OMNIORB_CONFIG</TT> to obtain the
 
75
pathname of the configuration file. If this is not set, it then
 
76
attempts to obtain configuration data in the system registry. It
 
77
searches for the data under the key
 
78
<TT>HKEY_LOCAL_MACHINE\SOFTWARE\omniORB</TT>.</LI></UL><P>omniORB has a large number of parameters than can be configured. See
 
79
chapter&#XA0;<A HREF="omniORBpy004.html#chap:config">4</A> for full details. The files
 
80
<TT>sample.cfg</TT> and <TT>sample.reg</TT> contain an example
 
81
configuration file and set of registry entries respectively.</P><P>To get all the omniORB examples running, the main thing you need to
 
82
configure is the Naming service, omniNames. To do that, the
 
83
configuration file or registry should contain an entry of the form</P><PRE CLASS="verbatim">  InitRef = NameService=corbaname::my.host.name
 
84
</PRE><P>See section&#XA0;<A HREF="omniORBpy006.html#sec:corbaname">6.1.2</A> for full details of corbaname URIs.</P><HR>
 
85
<A HREF="index.html"><IMG SRC="contents_motif.gif" ALT="Up"></A>
 
86
<A HREF="omniORBpy002.html"><IMG SRC="next_motif.gif" ALT="Next"></A>
 
87
</BODY>
 
88
</HTML>