Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / docs / releasenotes / ftrt_ec.html
blob45a7a59aa82194731542240666de351aae08a34f
1 <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
2 <!-- -->
3 <html>
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6 <meta name="Author" content="Venkita Subramonian">
7 <meta name="GENERATOR" content="Mozilla/4.79 [en] (Windows NT 5.0; U) [Netscape]">
8 <title>Fault Tolerant Real-Time Event Service</title>
9 </head>
10 <body>
12 <center>
13 <h2>
14 Fault Tolerant Real-time Event Service</h2></center>
16 <h3>
17 Introduction</h3>
18 The Fault Tolerant Real-time Event Service provides the fault tolerant
19 capability to the TAO Real-time Event Service. Essentially, it allows you
20 to start several event services in different machines. These event services
21 form an object group which can be treated as a logical event service by
22 clients. The clients only communicate with the primary (leader) of the
23 object group. The rest event channels in the object group are called backups.
24 Once the primary dies, one of the backups will assume the reponsibility
25 of primary and this process is transparent to the clients.
26 <p>The key to provide fault tolerance to event channels is to replicate
27 the states of primary to its backups. There are two kinds of states in
28 the event channels, transient and persistent. A transient state in the
29 event channels is the events which are yet to be delivered to the consumers.
30 Those events are hard to replicate because the time scale is too small.
31 They might be delivered late or out of scope if we tried to replicate the
32 events. However, the subscription information occurs at a suitable
33 time scale for replication, and is in fact more essential for the delivery
34 of events since it establishes a kind of connectivity from suppliers to
35 consumers. Therefore, we only replicate the subscriptions
36 <p>Once the primary receives the subscription requests from the clients,
37 it will replicate the requests to the backup event channels.In order to
38 provide time bounds on replication, we introduce the concept of transaction
39 depth. If we say the transaction depth is n, that means a subscription
40 method invocation has to be blocked until the first n replicas complete
41 the subscription operation, illustrated by the assured-replicate arc in
42 the figure. Other replicas can get the state change via a so called soft-replicate
43 which conceptually means the replication is not assured to complete before
44 the subscription operation returns.&nbsp; So, if the soft-replicate fails
45 due to loss of the primary, we will have only the assured depth of replication.
46 The clients are allowed to configure the transaction depth to tradeoff
47 reliability and responsiveness. Furthermore, it is necessary to roll back
48 an operation in some replicas if the transaction depth can not be met.
49 In addition, we can use either two-way or AMI calls for assured-replication
50 and one-way operations for soft-replication.
51 <p><b><font color="#FF6666">Important Note</font> :</b> In current stage,
52 the Fault Tolerant Event Service can only be made under <a href="../../../bin/MakeProjectCreator/README">MPC</a> build. The
53 conventional makefiles are yet to be supported. In other words, you should
54 use $ACE_ROOT/bin/mwc.pl to generate makefiles for ACE and TAO before you can
55 build it. See <a href="../../../bin/MakeProjectCreator/USAGE">here</a> for the instruction of using mwc.pl.
56 <br>&nbsp;
57 <h3>
58 Programs</h3>
59 There are several programs in $TAO_ROOT/orbsvcs/FTRT_Event_Servce directory:
60 <p>ftrt_eventservice : Located under $TAO_ROOT/orbsvcs/FTRT_Event_Servce/Event_Service
61 directory. It implements the functionality of fault tolerant event
62 channel. It can be started directly or&nbsp; be started by the ftrtec_factory_service.
63 <p>ftrtec_factory_service : Located under $TAO_ROOT/orbsvcs/FTRT_Event_Servce/Factory_Service
64 directory. It is a program used to spawn the ftrt_eventservice
65 process. The process it create can be controled through "test.cfg" whose
66 contents should begin with the repository id of EventChannel followed by
67 the executable path of ftrt_eventservice.
68 <p>ftrtec_gateway_service : Located under $TAO_ROOT/orbsvcs/FTRT_Event_Servce/Gateway_Service
69 directory. It is an intermediator program between the ftrt_eventservice
70 and the clients which do not support FT CORBA.
71 <p>consumer : A shell script to start the consumer test program. The actual
72 consumer pragram is in $TAO_ROOT/orbsvcs/tests/FtRtEvent.
73 <p>supplier : A shell script to start the supplier test program. The actual
74 supplier pragram is in $TAO_ROOT/orbsvcs/orbsvcs/tests/FtRtEvent.
75 <p>ftec : a shell script to start ftrt_eventservice.
76 <br>&nbsp;
77 <h3>
78 Quick start:</h3>
79 &nbsp; Run the applications as follows:
80 <br>&nbsp;
81 <p>&nbsp; 1. Start Naming_Service
82 <p>
83 <br>&nbsp;&nbsp; $ $TAO_ROOT/orbsvcs/Naming_Service/tao_cosnaming -m 1
84 <br>&nbsp;&nbsp;&nbsp;&nbsp; or you can use the shell script NameService
85 in this directory to start it.
86 <p>&nbsp; 2. Start the ftrt_eventservice. Use the "-p" option to start
87 it as a primary and
88 <br>&nbsp;&nbsp;&nbsp;&nbsp; use the "-j" option to start it as a backup.
89 <p>&nbsp; $ cd $TAO_ROOT/orbsvcs/FTRT_Event_Service
90 <br>&nbsp; $ ./ftec -p
91 <br>&nbsp; $ ./ftec -j
92 <br>&nbsp; $ ./ftec -j
93 <br>&nbsp;
94 <p>&nbsp; 3. Start the consumer and supplier.
95 <p>&nbsp; $ ./consumer
96 <br>&nbsp; $ ./supplier
97 <br>&nbsp;
98 <h3>
99 How do we add a new FTRTEC to the system?</h3>
100 &nbsp; Just use
101 <p>&nbsp; ./ftec -j
102 <p>&nbsp; The newly created process will contact to the naming service
103 and then join to
104 <br>&nbsp; the existing object group.
105 <br>&nbsp;
106 <h3>
107 Is there any adjustable options for FTRTEC?</h3>
108 &nbsp; Here is the list of options for the ftec script
109 <p>&nbsp; -sciop&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
110 Use SCIOP for CORBA communication
111 <br>&nbsp; -sctp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
112 Use SCTP for fault detection
113 <br>&nbsp; -hb n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
114 Specify the heart beat interval in sec
115 <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
116 for SCTP connection, this option also activate sctp option.
117 <br>&nbsp; -ami&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
118 Use AMI call for replication messages (The default is
119 <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
120 two-way CORBA call for replication)
121 <br>&nbsp; -p&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
122 activate as a primary replica.
123 <br>&nbsp; -j&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
124 activate as a backup replica.
125 <br>&nbsp;
126 <p>&nbsp;Below are some options that are used for the consumer and supplier
127 <br>&nbsp;&nbsp;&nbsp; test scripts.
128 <p>&nbsp; -sciop&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
129 Use SCIOP for CORBA communication. This requires that the Naming
130 <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
131 Service and ftec are also started using SCIOP transport protocol.
132 <p>&nbsp; -d n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
133 Specify the transaction depth. The transaction depth indicates the
134 <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
135 number of replicas that must complete the subscription request before
136 <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
137 the request can return.
138 <p>&nbsp; -t f.f&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
139 For supplier only. Specify the time interval between event sending
140 <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
141 in seconds, this value should be a float point.
142 <p>&nbsp;If you the naming service are not running at the same machine
143 with above programs, you can always set the environmental variables NameServiceIOR
144 before starting the ftec, consumer or supplier.
145 <br>&nbsp;
146 <h3>
147 How do I start the FTRTEC using ftrtec_factory_service?</h3>
148 The ftrtec_factory_service is a small program that can instaniate a ftrt_eventservice
149 on demand. It exports the FT::GenericFactory interface to its client. There
150 are two ways that&nbsp; you can get the IOR for the factory object. 1)
151 specify the name you want the factory&nbsp; register to the naming service
152 and then get the IOR from the naming service by the name. 2) output the
153 IOR to a file when the factory starts. Here are the options
154 <p>&nbsp;&nbsp;&nbsp; ftrtec_factory_service :
155 <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -i id_string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
156 The id field of the name that is used to register to the naming service
157 <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -k kind_string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
158 The kind field of the name that is used to register to the naming service
159 <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -o output_filename&nbsp;&nbsp;&nbsp;
160 The output file name for the factory IOR.
161 <p>Once you get the IOR for the factory, you can use create_object to intantiate
162 the ftrt_eventservice.
163 <br>Here are the parameters in create_object() to control how ftrt_eventservice
164 is created.
165 <p>&nbsp;&nbsp; type_id : this value should be "IDL:FtRtecEventChannelAdmin/EventChannel:1.0"
166 <br>&nbsp;&nbsp; the_criteria : the_criteria is a sequence of Property
167 which in term consists of "nam" and "value". Below a a list of possible
168 nam and values.
169 <br>&nbsp;
170 <br>&nbsp;
171 <table BORDER COLS=2 WIDTH="100%" >
172 <tr>
173 <td>nam</td>
175 <td>value</td>
176 </tr>
178 <tr>
179 <td>FTEC_MEMBERSHIP</td>
181 <td>PRIMARY
182 <br>BACKUP
183 <br>NONE</td>
184 </tr>
186 <tr>
187 <td>FTEC_DETECTOR_TRANSPORT_PROTOCL</td>
189 <td>TCP
190 <br>SCTP</td>
191 </tr>
193 <tr>
194 <td>FTEC_HEART_BEAT</td>
196 <td>the heart beat value in sec. (Note, you have to specify it using string,
197 i.e. the_criteria[0].value &lt;&lt;= "5");</td>
198 </tr>
200 <tr>
201 <td>FTEC_REPLICATION_STRATEGY</td>
203 <td>AMI
204 <br>(If not specified, the ftrt_eventservice use default two-way call for
205 replication)
206 <br>&nbsp;</td>
207 </tr>
209 <tr>
210 <td>NameServieIOR</td>
212 <td>the corbaloc representation for the naming service
213 <br>&nbsp;</td>
214 </tr>
215 </table>
217 <p>&nbsp;Any nam string started with "-" will be used as a command line
218 option to start ftrt_eventservice. For example, if you specfiy the name
219 as "-ORBEndpoint" and value as "sciop://" then the ftrt_eventservice can
220 be started using sciop.
221 <br>&nbsp;
222 <h3>
223 How do I use the ftrtec_gateway_service program ?</h3>
224 The FTRTEC uses some features in FT CORBA that requires every client to
225 use FT ORB to work. If your&nbsp; client is written based other ORBs other
226 than TAO. You cannot get the desired fault tolerance feature. In this case
227 you can have the ftec_gateway as an intermediator between the FTRTEC and
228 you client program.
229 <br>For example, if you have an existing client called my_supplier.
230 <p>&nbsp;&nbsp;&nbsp; # setting up the event channel group as previously
231 stated.
232 <p>&nbsp;&nbsp;&nbsp; $ftrtec_gateway_service -o gateway.ior&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
233 ## start the gateway and output the IOR of the gateway to a file
234 <br>&nbsp;&nbsp;&nbsp; $my_supplier -i file://gateway.ior&nbsp; ## start
235 the supplier using the gateway
236 <br>&nbsp;
237 </body>
238 </html>