~ubuntu-branches/ubuntu/quantal/libbonobo/quantal-201207170711

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Server architecture</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
<link rel="start" href="index.html" title="Bonobo Activation API Reference Manual">
<link rel="up" href="architecture.html" title="Bonobo Activation Architecture">
<link rel="prev" href="architecture.html" title="Bonobo Activation Architecture">
<link rel="next" href="async-activation.html" title="Async Activation">
<meta name="generator" content="GTK-Doc V1.8 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="chapter" href="tutorial.html" title="Bonobo Activation tutorial">
<link rel="chapter" href="configuring.html" title="Configuring Bonobo Activation">
<link rel="chapter" href="architecture.html" title="Bonobo Activation Architecture">
<link rel="chapter" href="query-langage.html" title="Bonobo Activation Query Langage">
<link rel="chapter" href="server-xml-reference.html" title=".server file format reference">
<link rel="chapter" href="migrating.html" title="Migrating from gnorba to Bonobo-activation">
<link rel="chapter" href="api-reference.html" title="API Reference">
<link rel="article" href="lgpl.html" title="GNU Lesser General Public License">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
<td><a accesskey="p" href="architecture.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="architecture.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Bonobo Activation API Reference Manual</th>
<td><a accesskey="n" href="async-activation.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr></table>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="server-arch"></a>Server architecture</h2></div></div></div>
<p>
The Bonobo Activation server is split in 2 parts: the <code class="classname">ObjectDirectory</code> which contains the list
of all servers on a given machine, and the <code class="classname">ActivationContext</code> which contains the
list of all ObjectDirectories. It contains by default the local ObjectDirectory
and you can add inside other distant ObjectDirectories.
</p>
<p>
Each server is described by its .server file which contains among others
the IDL interfaces this server implements, some specific properties and 
an <span class="emphasis"><em>IID</em></span> (Implementation ID). Each IID has to be unique.
Its format is pretty simple:
</p>
<pre class="programlisting">
OAFIID:program_name:UUID
</pre>
<p>
The UUID is supposed to be generated by the <span class="emphasis"><em>uuidgen</em></span> 
program. <span class="emphasis"><em>program_name</em></span> has to be an ASCII string without
comma (','), square bracket ('[]'), or forward slash ('/') characters.
</p>
<p>
Each CORBA server on a given machine is thus identified in a unique way.
CORBA servers on different machines are uniquely identified through the 
<span class="emphasis"><em>AID</em></span> (Activation ID). The AID format is also pretty
simple:
</p>
<pre class="programlisting">
OAFAID:[IID,user,host,domain]
</pre>
<p>
<span class="emphasis"><em>user</em></span> is the user unix login.
<span class="emphasis"><em>host</em></span> is a DNS domain name or stringified IP
address.
<span class="emphasis"><em>domain</em></span> is is a string describing what use 
area the object has.
</p>
<p>
One important thing to understand about these AID and IID is that the 
<code class="classname">ObjectDirectory</code> deals exclusively with IIDs (it is stritcly local) and
the <code class="classname">ActivationContext</code> deals with AIDs since it can associate a set of
<span class="emphasis"><em>user</em></span>, <span class="emphasis"><em>host</em></span> and 
<span class="emphasis"><em>domain</em></span> to each IID it gets from one of its 
<code class="classname">ObjectDirectory</code>.
</p>
<p>
As a result of this architecture, activation requests should go to the 
<code class="classname">ActivationContext</code> and
registrations to the <code class="classname">ObjectDirectory</code>.

</p>
<div class="figure">
<a name="architecture-diagram"></a><p class="title"><b>Figure&#160;1.&#160;The Bonobo Activation architecture</b></p>
<div class="figure-contents"><div class="mediaobject"><img src="bonobo-activation.png" alt="The Bonobo Activation architecture"></div></div>
</div>
<p><br class="figure-break">






The idea behind this is that when you make a request on the ActivationContext (like query),
it will:
</p>
<div class="itemizedlist"><ul type="disc">
<li><p>make sure it has an up-to-date list of all the Servers with a call to 
<code class="function">ObjectDirectory::get_servers</code> for each of its ObjectDirectory.
</p></li>
<li><p>loop through this list to try to satisfy the query with the
given requirements and sort-order.
</p></li>
<li><p>activate the corresponding object with 
<code class="function">ObjectDirectory::activate</code> (this is not exactly what happens 
since there are optimizations to save this call but the general idea is right).
</p></li>
</ul></div>
<p>
</p>
</div>
</body>
</html>