1 <!doctype html public
"-//w3c//dtd html 4.0 transitional//en">
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>
14 Fault Tolerant Real-time Event Service
</h2></center>
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.
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.
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
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.
79 Run the applications as follows:
81 <p> 1. Start Naming_Service
83 <br> $ $TAO_ROOT/orbsvcs/Naming_Service/tao_cosnaming -m
1
84 <br> or you can use the shell script NameService
85 in this directory to start it.
86 <p> 2. Start the ftrt_eventservice. Use the
"-p" option to start
88 <br> use the
"-j" option to start it as a backup.
89 <p> $ cd $TAO_ROOT/orbsvcs/FTRT_Event_Service
90 <br> $ ./ftec -p
91 <br> $ ./ftec -j
92 <br> $ ./ftec -j
94 <p> 3. Start the consumer and supplier.
95 <p> $ ./consumer
96 <br> $ ./supplier
99 How do we add a new FTRTEC to the system?
</h3>
102 <p> The newly created process will contact to the naming service
104 <br> the existing object group.
107 Is there any adjustable options for FTRTEC?
</h3>
108 Here is the list of options for the ftec script
109 <p> -sciop
110 Use SCIOP for CORBA communication
111 <br> -sctp
112 Use SCTP for fault detection
113 <br> -hb n
114 Specify the heart beat interval in sec
115 <br>
116 for SCTP connection, this option also activate sctp option.
117 <br> -ami
118 Use AMI call for replication messages (The default is
119 <br>
120 two-way CORBA call for replication)
121 <br> -p
122 activate as a primary replica.
123 <br> -j
124 activate as a backup replica.
126 <p> Below are some options that are used for the consumer and supplier
127 <br> test scripts.
128 <p> -sciop
129 Use SCIOP for CORBA communication. This requires that the Naming
130 <br>
131 Service and ftec are also started using SCIOP transport protocol.
132 <p> -d n
133 Specify the transaction depth. The transaction depth indicates the
134 <br>
135 number of replicas that must complete the subscription request before
136 <br>
137 the request can return.
138 <p> -t f.f
139 For supplier only. Specify the time interval between event sending
140 <br>
141 in seconds, this value should be a float point.
142 <p> 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.
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
you can get the IOR for the factory object.
1)
151 specify the name you want the factory
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> ftrtec_factory_service :
155 <p> -i id_string
156 The id field of the name that is used to register to the naming service
157 <br> -k kind_string
158 The kind field of the name that is used to register to the naming service
159 <br> -o output_filename
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
165 <p> type_id : this value should be
"IDL:FtRtecEventChannelAdmin/EventChannel:1.0"
166 <br> the_criteria : the_criteria is a sequence of Property
167 which in term consists of
"nam" and
"value". Below a a list of possible
171 <table BORDER COLS=
2 WIDTH=
"100%" >
179 <td>FTEC_MEMBERSHIP
</td>
187 <td>FTEC_DETECTOR_TRANSPORT_PROTOCL
</td>
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
<<=
"5");
</td>
201 <td>FTEC_REPLICATION_STRATEGY
</td>
204 <br>(If not specified, the ftrt_eventservice use default two-way call for
210 <td>NameServieIOR
</td>
212 <td>the corbaloc representation for the naming service
217 <p> 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.
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
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
229 <br>For example, if you have an existing client called my_supplier.
230 <p> # setting up the event channel group as previously
232 <p> $ftrtec_gateway_service -o gateway.ior
233 ## start the gateway and output the IOR of the gateway to a file
234 <br> $my_supplier -i file://gateway.ior
## start
235 the supplier using the gateway