]> rtime.felk.cvut.cz Git - orte.git/blob - doc/orte/orte_internals.xml
Add sources of figures
[orte.git] / doc / orte / orte_internals.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <section id="orte-internals">
3   <title>ORTE Implementation Issues</title>
4
5   <para>
6   ORTE is network middleware for distributed, real-time application development 
7   that uses the real-time, publish-subscribe model. The middleware is available 
8   for a variety of platforms including RTAI, RTLinux, Windows, and a several 
9   versions of Unix. The compilation system is mainly based on autoconf.
10   </para>
11   
12   <para>
13   ORTE is middleware composed of a database, and tasks. 
14   On the top of ORTE architecture is application interface (API). By using API
15   users should write self application. The tasks perform all of the message
16   addressing serialization/deserialization, and transporting. The ORTE components
17   are shown in <xref linkend="cap:orte_internal_architecture"/>
18   </para>
19   <figure id="cap:orte_internal_architecture">
20   <title>ORTE Architecture 
21   </title>
22   <mediaobject>
23     <imageobject>
24       <imagedata align="center" fileref="&orte_internal_architecture_img;"
25         format="EPS" scale="35" srccredit="OCERA CTU 2004" />
26     </imageobject>
27   </mediaobject>
28   </figure>
29
30
31   <para>
32   The RTPS protocol defines two kinds of Applications:
33   </para>
34   
35   <itemizedlist>
36     <listitem>
37       <para>
38       <emphasis role="bold">Manager:</emphasis>
39       The manager is a special Application that helps applications automatically 
40       discover each other on the Network.
41       </para>
42     </listitem>
43     <listitem>
44       <para>
45       <emphasis role="bold">ManagedApplication:</emphasis>
46       A ManagedApplication is an Application that is managed by one or more 
47       Managers. Every ManagedApplication is managed by at least one Manager.      
48       </para>
49     </listitem>
50   </itemizedlist>
51   <para>
52   The manager is mostly designed like separate application. In RTPS architecture
53   is able to create application which contains manager and managedapplication, but
54   for easy managing is better split both. The ORTE contains a separate instance
55   of manager located in directory <filename>orte/manager</filename>.  
56   </para>
57   
58   <para>The manager is composed from five kinds of objects:</para>
59   <itemizedlist>
60     <listitem>
61       <para>
62       <emphasis role="bold">WriterApplicationSelf:</emphasis>
63       through which the Manager provides information about its own parameters
64       to Managers on other nodes.
65       </para>
66     </listitem>
67     <listitem>
68       <para>
69       <emphasis role="bold">ReaderManagers:</emphasis>
70       CSTReader through which the
71       Manager obtains information on the state of all other Managers on the
72       Network.
73       </para>
74     </listitem>
75     <listitem>
76       <para>
77       <emphasis role="bold">ReaderApplications:</emphasis>
78       CSTReader which is used for the registration of local and remote
79       managedApplications.
80       </para>
81     </listitem>
82     <listitem>
83       <para>
84       <emphasis role="bold">WriterManagers:</emphasis>
85       CSTWriter through which the Manager will send the
86       state of all Managers in the Network to all its managees. 
87       </para>
88     </listitem>
89     <listitem>
90       <para>
91       <emphasis role="bold">WriterApplications:</emphasis>
92       CSTWriter through which the Manager will
93       send information about its managees to other Managers in the Network.
94       </para>
95     </listitem>
96   </itemizedlist>
97   
98   <para>
99   A Manager that discovers a new ManagedApplication
100   through its readerApplications must decide whether it must manage this
101   ManagedApplication or not. For this purpose, the attribute
102   managerKeyList of the Application is used. If one of the
103   ManagedApplication&#39;s keys (in the attribute managerKeyList) is equal
104   to one of the Manager&#39;s keys, the Manager accepts the Application as
105   a managee. If none of the keys are equal, the managed application is
106   ignored. At the end of this process all Managers have discovered their
107   managees and the ManagedApplications know all Managers in the Network.
108   </para>
109   
110   <para>The managedApplication is composed from seven kinds of objects:</para>
111   <itemizedlist>
112     <listitem>
113       <para>
114       <emphasis role="bold">WriterApplicationSelf:</emphasis>
115       a CSTWriter through which the ManagedApplication registers
116       itself with the local Manager.
117       </para>
118     </listitem>
119     <listitem>
120       <para>
121       <emphasis role="bold">ReaderApplications:</emphasis>
122       a CSTReader through which the ManagedApplication receives
123       information about another ManagedApplications in the network.
124       </para>
125     </listitem>
126     <listitem>
127       <para>
128       <emphasis role="bold">ReaderManagers:</emphasis>
129       a CSTReader through which the ManagedApplication receives
130       information about Managers.     
131       </para>
132     </listitem>
133     <listitem>
134       <para>
135       <emphasis role="bold">WriterPublications:</emphasis>
136       CSTWriter through which the Manager will send the
137       state of all Managers in the Network to all its managees. 
138       </para>
139     </listitem>
140     <listitem>
141       <para>
142       <emphasis role="bold">ReaderPublications:</emphasis>
143       a Reader through which the Publication receives information
144       about Subscriptions.
145       </para>
146     </listitem>
147     <listitem>
148       <para>
149       <emphasis role="bold">WriterSubscriptions:</emphasis>
150       a Writer that provides information about Subscription to
151       Publications.
152       </para>
153     </listitem>
154     <listitem>
155       <para>
156       <emphasis role="bold">ReaderSubscriptions:</emphasis>
157       a Reader that receives issues from one or more instances of
158       Publication, using the publish-subscribe service.
159       </para>
160     </listitem>
161   </itemizedlist>
162
163   <para>
164   The ManagedApplication has a special CSTWriter writerApplicationSelf. The
165   Composite State (CS) of the ManagedApplication&#39;s writerApplicationSelf
166   object contains only one NetworkObject - the application itself. The
167   writerApplicationSelf of the ManagedApplication must be configured to
168   announce its presence repeatedly and does not request nor expect
169   acknowledgments.
170   </para>
171   <para>
172   The ManagedApplications now use the CST Protocol between the
173   writerApplications of the Managers and the readerApplications of the
174   ManagedApplications in order to discover other ManagedApplications in
175   the Network. Every ManagedApplication has two special CSTWriters,
176   writerPublications and writerSubscriptions, and two special CSTReaders,
177   readerPublications and readerSubscriptions.
178   </para>
179   <para>
180   Once ManagedApplications have discovered each other, they use the
181   standard CST protocol through these special CSTReaders and CSTWriter to
182   transfer the attributes of all Publications and Subscriptions in the
183   Network.
184   </para>
185   
186   <para>The ORTE stores all data in local database per application. There isn't
187   central store where are data saved. If an application comes into communication, 
188   than will be created local mirror of all applications parameters. 
189   Parts of internal structures are shown in <xref linkend="cap:orte_attributes"/>.
190   </para>
191   <figure id="cap:orte_attributes">
192   <title>ORTE Internal Attributes
193   </title>
194   <mediaobject>
195     <imageobject>
196       <imagedata align="center" fileref="&orte_attributes_img;"
197         format="EPS" scale="35" srccredit="OCERA CTU 2004" />
198     </imageobject>
199   </mediaobject>
200   </figure>
201   
202   <para>
203   Following example shows communication between two nodes (N1, N2).
204   There are applications running on each node - MA1.2 on node
205   N1 and MA2.1, MA2.2 on node N2. Each node has it own manager (M1, M2). The 
206   example shows, what's happen when a new application comes into communication
207   (MA1.1).
208   </para>
209
210   <orderedlist>
211     <listitem><para>
212     MA1.1 introduces itself to local manager M1
213     </para></listitem>
214     <listitem><para>
215     M1 sends back list of remote managers Mx and other local applications MA1.x
216     </para></listitem>
217     <listitem><para>
218     MA1.1 is introduced to all Mx by M1
219     </para></listitem>
220     <listitem><para>
221     All remote MAs are reported now to M1.1
222     </para></listitem>
223     <listitem><para>
224     MA1.1 is queried for self services (publishers and subscriberes) from others MAx.
225     </para></listitem>
226     <listitem><para>
227     MA1.1 asks for services to others MAx.
228     </para></listitem>
229     <listitem><para>
230     All MAs know information about others.
231     </para></listitem>
232   </orderedlist>
233
234   <para>
235   The corresponding publishers and subscribers with matching Topic
236   and Type are connected and starts their data communication.
237   </para>
238
239   <figure id="cap:orte_rtps_communication">
240   <title>RTPS Communication among Network Objects
241   </title>
242   <mediaobject>
243     <imageobject>
244       <imagedata align="center" fileref="&orte_rtps_communication_img;"
245         format="EPS" scale="35" srccredit="OCERA CTU 2004" />
246     </imageobject>
247   </mediaobject>
248   </figure>
249
250 </section>