source: trunk/third/bonobo-activation/api-docs/architecture.sgml @ 18311

Revision 18311, 5.0 KB checked in by ghudson, 22 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r18310, which included commits to RCS files with non-trunk default branches.
Line 
1<chapter id="architecture">
2<title>Bonobo Activation Architecture</title>
3
4<sect1 id="oaf-daemon">
5<title>The Bonobo Activation daemon</title>
6<para>
7Bonobo Activation is nothing but a daemon implementing a set of
8CORBA interfaces. These CORBA interfaces implement a Name service
9for the set of CORBA servers installed on your system. Basically,
10OAF knows about all the CORBA servers of your system, running or not.
11The OAF daemon will activate those servers if you ask for them.
12</para>
13
14<para>
15The Bonobo Activation daemon features a powerful query langage which
16allows you to ask for certain services rather than for certain applications.
17</para>
18
19<para>
20C programmers who wish to access these services do not need to make
21raw CORBA calls: they can use a set of convenience functions implemented
22in the liboaf library. This library acts as a wrapper on top of the CORBA
23server. The API documentation for the liboaf library is available there.
24(XXX: add pointer to the API ref).
25</para>
26
27</sect1>
28
29<sect1 id="server-arch">
30<title>Server architecture</title>
31
32<para>
33The OAF server is split in 2 parts: the <classname>ObjectDirectory</classname> which contains the list
34of all servers on a given machine, and the <classname>ActivationContext</classname> which contains the
35list of all ObjectDirectories. It contains by default the local ObjectDirectory
36and you can add inside other distant ObjectDirectories.
37</para>
38
39<para>
40Each server is described by its .server file which contains among others
41the IDL interfaces this server implements, some specific properties and
42an <emphasis>IID</emphasis> (Implementation ID). Each IID has to be unique.
43Its format is pretty simple:
44<programlisting>
45OAFIID:program_name:UUID
46</programlisting>
47The UUID is supposed to be generated by the <emphasis>uuidgen</emphasis>
48program. <emphasis>program_name</emphasis> has to be an ASCII string without
49comma (','), square bracket ('[]'), or forward slash ('/') characters.
50</para>
51
52<para>
53Each CORBA server on a given machine is thus identified in a unique way.
54CORBA servers on different machines are uniquely identified through the
55<emphasis>AID</emphasis> (Activation ID). The AID format is also pretty
56simple:
57<programlisting>
58OAFAID:[IID,user,host,domain]
59</programlisting>
60<emphasis>user</emphasis> is the user unix login.
61<emphasis>host</emphasis> is a DNS domain name or stringified IP
62address.
63<emphasis>domain</emphasis> is is a string describing what use
64area the object has.
65</para>
66
67<para>
68One important thing to understand about these AID and IID is that the
69<classname>ObjectDirectory</classname> deals exclusively with IIDs (it is stritcly local) and
70the <classname>ActivationContext</classname> deals with AIDs since it can associate a set of
71<emphasis>user</emphasis>, <emphasis>host</emphasis> and
72<emphasis>domain</emphasis> to each IID it gets from one of its
73<classname>ObjectDirectory</classname>.
74</para>
75
76<para>
77As a result of this architecture, activation requests should go to the
78<classname>ActivationContext</classname> and
79registrations to the <classname>ObjectDirectory</classname>.
80        <figure>
81        <title>OAF architecture</title>
82        <graphic fileref="oaf.png" scale="50"></graphic>
83      </figure>
84The idea behind this is that when you make a request on the ActivationContext (like query),
85it will:
86<itemizedlist>
87<listitem><para>make sure it has an up-to-date list of all the Servers with a call to
88<function>ObjectDirectory::get_servers</function> for each of its ObjectDirectory.
89</para></listitem>
90<listitem><para>loop through this list to try to satisfy the query with the
91given requirements and sort-order.
92</para></listitem>
93<listitem><para>activate the corresponding object with
94<function>ObjectDirectory::activate</function> (this is not exactly what happens
95since there are optimizations to save this call but the general idea is right).
96</para></listitem>
97</itemizedlist>
98</para>
99
100</sect1>
101
102<sect1 id="async-activation">
103<title>Async Activation</title>
104
105<para>
106OAF also has a set of asynchronous activation interfaces so that you do not need to block
107on activation calls. The CORBA level is pretty simple: the activation context has a set of
108<function>_async</function> calls: <function>OAF_ACtivationContext_activate_async</function>
109and <function>OAF_ACtivationContext_activate_from_id_async</function>. Both of those calls
110take an OAFActivationCallback CORBA object as parameter. This object, which is supposed to
111be implemented by client applications (it is actually implemented in liboaf) will receive
112CORBA calls when the activation is finished:
113<programlisting>
114module OAF {
115        interface ActivationCallback {
116                oneway void report_activation_failed (in string reason);
117                oneway void report_activation_succeeded (in ActivationResult result);
118        };
119};
120</programlisting>
121</para>
122
123<para>
124Of course, liboaf provides comvenient wrappers for those CORBA functions. Those are named
125<function>bonobo_activation_activate_async</function> and
126<function>bonobo_activation_activate_from_id_async</function>.
127</para>
128
129</sect1>
130
131</chapter>
Note: See TracBrowser for help on using the repository browser.