fixed a typo in the documentation
[ACE_TAO.git] / TAO / docs / Options.html
blobad187365b9807117b1a0636a44827b8fcd4c53a2
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <!-- -->
5 <title>Options for TAO Components</title>
6 </head>
7 <body bgcolor="#ffffff" link="#000fff" vlink="#ff0f0f" text="#000000">
8 <hr>
9 <p></p>
10 <h2 align="center">Options for TAO Components</h2>
11 <h3>Table of Contents</h3>
12 <ul>
13 <li><a href="#MOT">Introduction</a> </li>
14 <li><a href="#choose">Choosing the Right Approach</a> </li>
15 <li><a href="#EXP">TAO's ORB Configuration Options</a>
16 <ul>
17 <li><a href="#EV">Environment Variables</a> </li>
18 <li><a href="#CLO">Command-line Options</a>
19 <ol>
20 <li><a href="#CSCB">Controlling Service Configurator Behavior </a>
21 </li>
22 <li><a href="#CDI">Controlling Debugging Information </a> </li>
23 <li><a href="#ORP">Optimizing Request Processing </a> </li>
24 <li><a href="#CMPS">Connection Management and Protocol
25 Selection </a> </li>
26 <li><a href="#IRO">Multiple Invocation Retry Options</a></li>
27 <li><a href="#MO">Miscellaneous Options </a></li>
28 </ol>
29 </li>
30 <li><a href="#SVC">Service Configuration File </a>
31 <ol>
32 <li><a href="#TRF">Simple and Advanced Resource Factories </a>
33 <ol>
34 <li><a href="#TDRF">TAO_Default_Resource_Factory </a> </li>
35 <li><a href="#TARF">TAO_Advanced_Resource_Factory </a></li>
36 </ol>
37 </li>
38 <li><a href="#TSSF">Server_Strategy_Factory</a> </li>
39 <li><a href="#TCSF">Client_Strategy_Factory</a></li>
40 <li><a href="#TUPF">TAO_UIPMC_Protocol_Factory</a></li>
41 <li><a href="#TMSF">TAO_MIOP_Resource_Factory</a></li>
42 <li><a href="#TTSM">Time_Policy_Manager</a></li>
43 </ol>
44 </li>
45 </ul>
46 </li>
47 </ul>
48 <hr>
49 <h3><b><a name="MOT">Introduction</a></b></h3>
50 TAO is a highly flexible ORB that contains a wide range of ORB
51 configuration options. One or more of these options can be combined
52 to meet various application requirements, such as low-latency,
53 predictable real-time behavior, or small memory footprint. TAO's ORB
54 configuration options are managed by an object-oriented framework
55 within the ORB Core that contains the following types of entities:
56 <ul>
57 <li><b>Settings</b>, which are options that can be assigned values
58 differing from their default settings. Examples include setting the
59 size of a Portable Object Adapter (POA)'s active object map or
60 configuring the ORB to print debugging information as it processes
61 requests. A few of these are run-time options, while a majority of
62 them are compile-time options.
63 <p></p>
64 </li>
65 <li><b>Resources</b>, which are objects used internally by TAO, such
66 as a <em>reactor</em> framework that demultiplexes new connection and
67 data requests from a client or <em>synchronization mechanisms</em>
68 used to regulate access to certain parts of the ORB.
69 <p></p>
70 </li>
71 <li><b>Strategies</b>, which are objects that use the <b>Resource</b>
72 entities to perform various ORB tasks, such as connection management,
73 concurrency, and demultiplexing.
74 <p></p>
75 </li>
76 <li><b>Factories</b>, which TAO uses to create and consolidate its
77 many resources and strategies into a manageable number of factories
78 that can be (re)configured into the ORB conveniently and consistently
79 by ORB and application developers.
80 <p></p>
81 </li>
82 </ul>
83 The set of TAO ORB configuration options that are represented by the
84 settings, resources, strategies, and factories can be specified via
85 <b>environment variables</b>, <b>service configuration files</b>, and
86 <b>command-line arguments</b>, as outlined below:
87 <ul>
88 <li> <b>Environment variables</b> are limited to specifying the
89 interoperable object reference (IOR) and port number of TAO's Naming
90 Service, Trading Service and Implementation Repository. They are
91 limited in flexibility and don't provide the most important
92 configuration hooks necessary to configure TAO for real-time and
93 high-performance applications.
94 <p></p>
95 </li>
96 <li> <b>Command-line options</b> are passed to the ORB
97 initialization
98 factory method, <code>CORBA::ORB_init()</code>, by an application
99 using the standard <i>argc/argv</i> tuple passed to the application's
100 <code>main()</code>. Most of the options that can be exercised
101 through
102 environment variables can also be manipulated through command-line
103 options. Command-line options override the environment variable
104 settings if both are enabled.
105 <p></p>
106 </li>
107 <li> The <b>Service Configurator</b> is a framework that can be used
108 to statically and dynamically configure components into middleware and
109 applications. The information comprising the names of these
110 components and their corresponding options are specified in a service
111 configurator file, whose default file name is
112 <code>svc.conf</code>. The service configurator is opened and
113 processed by the ORB in <code>CORBA::ORB_init()</code>. The service
114 configurator processing is done after all the command-line options
115 have been parsed.
116 </li>
117 </ul>
118 <p></p>
119 <hr width="25%" align="left">
120 <p></p>
121 <h3><a name="choose">Choosing the Right Approach</a></h3>
122 TAO's command-line options are useful when there's a fixed set of
123 configuration options, each of which has a predefined list of
124 alternative values. Conversely, TAO's service configurator file is
125 useful for configuring a broader range of resources, strategies, and
126 factories. Generally speaking, the service configurator file allows
127 the user to <br>
128 <ul>
129 <li>configure the existing components (<em>i.e.</em>, resources,
130 strategies and factories) based on the predefined list of alternatives
131 that TAO provides or
132 <p> </p>
133 </li>
134 <li>extend the existing factories by providing user-defined
135 components and dynamically load them through the service configurator
136 mechanism. </li>
137 </ul>
138 Additionally, the service configurator mechanism allows an
139 application to control the behavior of the ORB using extensible
140 configuration information. In general, the command-line configuration
141 options are provided in TAO
142 in order to leverage preexisting configuration settings that are
143 compiled within the TAO ORB. Users are not allowed to change these
144 settings. In contrast, those options that require more flexible
145 manipulation of resources, strategies, and factories must be
146 configured via <a href="#SVC">service configuration files</a>. As a
147 result, the command-line options and the service configurator options
148 cannot be used interchangeably.
149 <p></p>
150 <hr>
151 <h3><b><a name="EXP">TAO's ORB Configuration Options</a></b></h3>
152 This section provides a detailed overview of how to configure TAO's
153 options using environment variables, command-line options, and service
154 configuration files.
155 <p></p>
156 <hr width="25%" align="left">
157 <h3><a name="EV">Environment Variables</a></h3>
158 As mentioned earlier, environment variables have a limited use in TAO
159 ORB configuration. The currently supported environment variables are
160 listed below. They are used to specify the IOR and port numbers for
161 three of TAO's ORB services.
162 <blockquote>
164 <table border="2" cellpadding="0" cellspacing="2">
165 <tbody>
166 <tr>
167 <th>Environment Variable</th>
168 <th>Description</th>
169 </tr>
170 <tr>
171 <td><code>NameServicePort</code> <em>which</em></td>
172 <td>Specifies which port the Naming Service is listening on for
173 multicast requests. </td>
174 </tr>
175 <tr>
176 <td><code>TradingServicePort</code> <em>which</em></td>
177 <td>Specifies which port the Trading Service is listening on
178 for multicast requests. </td>
179 </tr>
180 <tr>
181 <td><code>ImplRepoServicePort</code> <em>which</em></td>
182 <td>Specifies which port the Implementation Repository is
183 listening on for multicast requests. </td>
184 </tr>
185 </tbody>
186 </table>
187 </p>
188 </blockquote>
189 In addition to being able to define the port where these known services
190 are listening for multicast requests, as above, it is possible to set
191 an environment variable that specifies the IOR of any named service.
192 For example <code>NameServiceIOR=&lt;which,TradingServiceIOR=&lt;which&gt;,
193 ImplRepoServiceIOR=&lt;which&gt;, MyServiceIOR=&lt;which&gt;</code>. This
194 will have a similar effect to defining an -ORBInitRef value on the
195 command line (see below). Any value set as a command line -ORBInitRef
196 option will override any value set as an environment variable for the
197 same service name.<br>
198 <br>
199 In general, setting environment variables is not particularly portable
200 or convenient, which is why users can also set these options via
201 command-line options. The example shown below demonstrates a
202 deployment scenario where the client and Naming Service run on the
203 same host:
204 <p><code>
205 % NameService.exe -ORBEndpoint iiop://localhost:12345
206 </code></p>
207 <p><code>
208 % client.exe -ORBInitRef NameService=corbaloc:iiop:localhost:12345/NameService
209 </code></p>
210 <p>An explanation of these command-line options appears below. </p>
211 <p></p>
212 <hr width="25%" align="left">
213 <h3><a name="CLO">Command-line Options</a></h3>
214 TAO's run-time behavior can also be controlled by passing options via
215 the CORBA initialization method <code>CORBA::ORB_init()</code>. ORB
216 initialization options are commonly passed into the program from the
217 command-line, using the <code>argc</code> and <code>argv</code>
218 parameters available to the <code>main()</code> function.
219 <p>Command-line options can be classified into the following groups
220 according to their purposes:</p>
221 <ol>
222 <li><a href="#CSCB">Controlling Service Configurator Behavior</a> </li>
223 <li><a href="#CDI">Controlling Debugging Information</a> </li>
224 <li><a href="#ORP">Optimizing Request Processing</a> </li>
225 <li><a href="#CMPS">Connection Management and Protocol Selection</a> </li>
226 <li><a href="#MO">Miscellaneous Options</a>
227 </li>
228 </ol>
229 We describe each of these five groups of options below.
230 <p></p>
231 <h4><a name="CSCB">1. Controlling Service Configurator Behavior</a></h4>
232 The options described below influence the behavior of the ORB's <a
233 href="#SVC">service configurator, which is opened and processed <em>after</em>
234 the command-line options
235 have been parsed. </a>
236 <p></p>
237 <blockquote><a href="#SVC"> </a>
238 <p><a href="#SVC"> </a>
239 <table border="2" cellpadding="0" cellspacing="2">
240 <tbody>
241 <tr>
242 <th>Option</th>
243 <th>Description</th>
244 </tr>
245 <tr>
246 <td><code>-ORBSvcConf</code> <em>config filename</em></td>
247 <td>Specifies the name of the file used to read service
248 configuration directives via the Service Configurator framework. By
249 default, a service configurator-based application will look for a file
250 named <code>"svc.conf"</code> in the current directory. </td>
251 </tr>
252 <tr>
253 <td><code>-ORBSvcConfDirective</code> <em>directivestring</em></td>
254 <td>Specifies a service configuration directive, which is
255 passed to the Service Configurator. You can pass multiple of these
256 options on the same command-line. </td>
257 </tr>
258 <tr>
259 <td><code>-ORBServiceConfigLoggerKey</CODE> <em>logger key</em></td>
260 <TD>Set the logger key in the <code>ACE_Service_Config</code>
261 framework. Equivalent to the <code>-k</code> option on the ACE
262 service configurator class.
263 </td>
264 </tr>
265 <tr>
266 <td><code>-ORBSkipServiceConfigOpen</CODE> </td>
267 <TD>Do not process any <code>svc.conf</code> files, which has the
268 side-effect of not initializing the ACE Service Configurator
269 framework or registering the SIGHUP signal.
270 </td>
271 </tr>
272 <tr>
273 <td><code>-ORBIgnoreDefaultSvcConfFile</CODE> </td>
274 <TD>Do not process default <code>svc.conf</code> file. This does not
275 prohibit processing of explicitly provided <code>-ORBSvcConf</code> and/or
276 <code>-ORBSvcConfDirective</code> options.
277 </td>
278 </tr>
279 <tr>
280 <td><code>-ORBGestalt Local|ORB:<i>orbid</i></CODE> </td>
281 <TD>Instruct the ORB to create a local configuration "gestalt" or
282 context. By default, all ORBs share a common configuration context. This
283 is defined by a Service Repository that contains service objects, such
284 as the resource factory. In some cases multiple ORBs may be dynamically
285 loaded and as such may wish to have distinct configurations. Passing the
286 <code>Local</code> argument achieves this. Service objects loaded by an
287 ORB with a local configuration context will be used by that ORB in place
288 of any default service object. The final variation is that of shared
289 contexts. Passing the argument <code>ORB:<i>orbid</i></code> will cause
290 the ORB to share the local configuration of another ORB as identified with
291 the supplied id. <i>The shared context feature is not yet implemented.</i>
292 </td>
293 </tr>
294 </tbody>
295 </table>
296 </p>
297 </blockquote>
298 <h4><a name="CDI">2. Controlling Debugging Information</a></h4>
299 During application development and testing, it is often necessary to
300 control the amount and type of debugging information output by the
301 ORB. The following options enable TAO to provide debugging
302 information at several levels of granularity.
303 <p></p>
304 <blockquote>
306 <table border="2" cellpadding="0" cellspacing="2">
307 <tbody>
308 <tr>
309 <th>Option</th>
310 <th>Description</th>
311 </tr>
312 <tr>
313 <td><code>-ORBDebug</code></td>
314 <td>Instructs the ORB to print debugging messages from the
315 service configurator framework. This option does not have a value but
316 is used as a toggle to enable or disable debugging messages.</td>
317 </tr>
318 <tr>
319 <td><code>-ORBDebugLevel </code><em>level</em></td>
320 <td>Control the level of debugging in the ORB. Higher numbers
321 generate more output (try 10). The default value of this option is 0.</td>
322 </tr>
323 <tr>
324 <td><code>-ORBVerboseLogging</code> <em>level (0|1|2)</em></td>
325 <td>Controls the amount of status data printed on each line of
326 the debug log. Higher numbers generate more output.
327 The default value of this option is 0. </td>
328 </tr>
329 <tr>
330 <td><code>-ORBLogFile</code> <em>Logfilename</em></td>
331 <td>Causes all <code>ACE_DEBUG</code> and <code>ACE_ERROR</code>
332 output to be redirected to the designated <code>Logfilename</code>. </td>
333 </tr>
334 <tr>
335 <td><code>-ORBHandleLoggingStrategyEvents</code>
336 <em>LoggingStrategyServiceName</em></td>
337 <td>Causes use of ORB reactor for dispatching timer events to
338 ACE_Logging_Strategy configured as a dynamic service with name
339 <code>LoggingStrategyServiceName</code>. This allows to implement log file
340 rotation. </td>
341 </tr>
342 <tr>
343 <td><code>-ORBObjRefStyle</code> <em>IOR/URL</em></td>
344 <td>Specifies the user-visible style of object references. The <code>IOR</code>
345 style (default) is the conventional CORBA object reference, whereas the
346 <code>URL</code> style looks more like a URL.
347 </td>
348 </tr>
349 </tbody>
350 </table>
351 </p>
352 </blockquote>
353 <h4><a name="ORP">3. Optimizing Request Processing</a></h4>
354 It is often possible to <a href="performance.html">increase TAO's
355 throughput and reduce latency</a> by optimizing certain stages of
356 request processing in the ORB. The following command-line options
357 control various optimizations during request processing.
358 <p></p>
359 <blockquote>
361 <table border="2" cellpadding="0" cellspacing="2">
362 <tbody>
363 <tr>
364 <th>Option</th>
365 <th>Description</th>
366 </tr>
367 <tr>
368 <td><code>-ORBCDRTradeoff</code> <em>maxsize</em></td>
369 <td><a name="-ORBCDRTradeoff"></a>Control the strategy to
370 tradeoff between copy vs. no copy marshaling of octet sequences. If an
371 octet sequence is smaller than <code>maxsize</code> (which defaults to
372 <code>ACE_DEFAULT_CDR_MEMORY_TRADEOFF</code>) -- and the
373 current message block contains enough space for it -- the octet
374 sequence is copied instead of appended to the CDR stream. </td>
375 </tr>
376 <tr>
377 <td><code>-ORBMaxMessageSize</code> <em>maxsize</em></td>
378 <td><a name="-ORBMaxMessageSize"></a>Set maximum size of
379 outgoing GIOP request/reply. The request or reply
380 being sent will be fragmented, if necessary.</td>
381 </tr>
382 <tr>
383 <td><code>-ORBCollocation</code> <em>global/per-orb/no</em></td>
384 <td><a name="-ORBCollocation"></a>Specifies the use of
385 collocation object optimization. If <code>global</code> is specified
386 (default), objects in the same process will be treated as collocated.
387 If <code>per-orb</code> is specified, only objects in the same ORB are
388 treated as collocated. When <em>no</em> is specified, no objects are
389 treated as collocated. </td>
390 </tr>
391 <tr>
392 <td><code>-ORBCollocationStrategy</code> <em>thru_poa/direct/best</em>
393 </td>
394 <td>Specifies what type of collocated object to use. If not specified
395 the TAO_DEFAULT_COLLOCATION_STRATEGY default (default on thru_poa) is used.
396 If the <code>thru_poa</code> strategy is used, TAO uses the collocation object
397 implementation that respects POA's current state and policies. When
398 using the <code>direct</code> strategy, method invocations on
399 collocated objects become direct calls to servant without checking
400 POA's status, which can increase performance. If you use the <code>direct</code>
401 strategy, your interfaces must be compiled with the <code><a
402 href="compiler.html#collocation-stubs">-Gd</a></code> IDL <a
403 href="compiler.html">compiler option</a>. If you choose for the <code>best</code> strategy,
404 TAO tries to perform the best possible collocation, first <code>direct</code> collocation if possible,
405 else <code>thru_poa</code> collocation if possible and otherwise no collocation. </td>
406 </tr>
407 <tr>
408 <td><code>-ORBAMICollocation</code> <em>1|0</em>
409 </td>
410 <td>Specifies what happens when making collocated AMI invocations.
411 When 1 (default) an AMI call will be done on a collocated
412 servant and the client thread will be used to invoke the
413 servant, when 0 the collocated call will be converted
414 to a remote call so that a different thread could be used
415 to execute the servant.</td>
416 </tr>
417 <tr>
418 <td><code>-ORBNodelay</code> <em>boolean (0|1)</em></td>
419 <td><a name="-ORBNodelay"></a>Enable or disable the <code>TCP_NODELAY</code>
420 option (Nagle's algorithm). By default, <code>TCP_NODELAY</code> is
421 enabled.</td>
422 </tr>
423 <tr>
424 <td><code>-ORBRcvSock</code> <em>receive buffer size</em></td>
425 <td><a name="-ORBRcvSock"></a>Specify the size of the socket
426 receive buffer as a positive, non-zero integer. If not specified, the <code>ACE_DEFAULT_MAX_SOCKET_BUFSIZ</code>
427 default is used.</td>
428 </tr>
429 <tr>
430 <td><code>-ORBSndSock</code> <em>send buffer size</em></td>
431 <td><a name="-ORBSndSock"></a>Specify the size of the socket
432 send buffer as a positive, non-zero integer. If not specified, the <code>ACE_DEFAULT_MAX_SOCKET_BUFSIZ</code>
433 default is used.</td>
434 </tr>
435 <tr>
436 <td><code>-ORBStdProfileComponents</code> <em>boolean (0|1)</em></td>
437 <td><a name="-ORBStdProfileComponents"></a>If <em>0</em> then
438 the ORB does not generate the OMG standardized profile components, such
439 as the ORB type and code sets. Notice that the presence of this
440 components is optional in GIOP 1.1 The default value is controlled by a
441 compile-time flag defined in <CODE>orbconf.h</CODE>.</td>
442 </tr>
443 <tr>
444 <td><code>-ORBNegotiateCodesets</code> <em>boolean (0|1)</em></td>
445 <td><a name="-ORBNegotiateCodesets"></a>If <em>0</em> then the ORB
446 does not include the codeset negotiation subsystem, TAO_Codeset. This yields
447 a somewhat smaller runtime footprint as well as a smaller IOR. However this
448 also removes the ability to interoperate with ORBs on systems using
449 alternative character or wide charater encodings. The default value may be set
450 at compile time by defining <CODE>TAO_NEGOTIATE_CODESETS 0</CODE> in
451 <CODE>orbconf.h</CODE>. Codeset negotiation support is enabled by default in
452 TAO as shipped.<br> <b>Note to static lib users</b> In order to build
453 TAO statically and get the codeset negotiation feature, two additional steps
454 are needed to ensure the TAO_Codeset library is linked in and initalized. Add the MPC feature "negotiate_codesets=1" to the default.features file and regenerate your makefiles, and add <CODE>#include "tao/Codeset/Codeset.h"</CODE> somewhere in your application source, such as the cpp file containing your main.</td>
455 </tr>
456 <tr>
457 <td><code>-ORBSingleReadOptimization</code> <em>boolean (0|1)</em></td>
458 <td><a name="-ORBSingleReadOptimization"></a>This option
459 controls whether TAO's ``single read optimization'' is used when
460 receiving requests. If this option is disabled (<code>0</code>), the
461 ORB will do two reads to read a request: one reads the request header
462 and the other reads the request payload. If this option is enabled (<code>1</code>),
463 the ORB will do a read of size <code>TAO_MAXBUFSIZE</code>, hoping to
464 read the entire request. If more than one request is read they will be
465 queued up for processing later.
466 <p> This option defaults to <code>1</code> because it can
467 provide better performance. In the case of Real-time CORBA, however, this
468 option should be set to <code>0</code>. Consider the following
469 scenario: (1) two requests are read from one socket, (2) the additional
470 request is queued, and (3) the ORB uses its Reactor's notification
471 mechanism to wake up the follower threads. If at the same time,
472 however, new requests arrive on others sockets of higher priority the
473 lower priority queued message will be processed before the newly
474 arrived higher priority request since Reactor notifications are given
475 preferences over normal I/O, thereby causing priority inversion.</p>
476 </td>
477 </tr>
478 <tr>
479 <td><code>-ORBDisableRTCollocation</code> <em>boolean (0|1)</em></td> <td><a name="-ORBDisableRTCollocation"></a>This
480 option controls whether the application wants to use or discard
481 RT collocation decisions made by the RT ORB. A value of
482 <CODE>1</CODE> (true) disables RT collocation decisions and falls back on the default
483 collocation decisions implemented in the default ORB, which is
484 useful for applications using the RT ORB and doesn't want
485 to use the RT collocation decisions but fallback on the default
486 decisions for better performance. The default value is
487 <code>0</code> (false). </td>
488 </tr>
489 <tr>
490 <td><code>-ORBUseLocalMemoryPool</code> <em>boolean (0|1)</em></td>
491 <td><a name="-ORBUseLocalMemoryPool"></a>TAO can use a local memory pool
492 to satisfy some of its needs for heap storage, as it is often more
493 efficient than using the platform's default memory allocator. The local
494 pool will always grow as large as necessary to satisfy memory allocations,
495 but it will never shrink. This means that sometimes a process can retain
496 memory that it no longer needs. If the default allocator is used then
497 TAO gives memory back as soon as it is not needed which allows for better
498 resource sharing at the expense of memory deallocation time.
499 <p>If this option is disabled (<code>0</code>), the ORB will use the
500 default allocator for the platform.</p>
501 <p>If this option is enabled (<code>1</code>), the orb will use the
502 local memory pool.</p>
503 <p> This option defaults to the compile-time option specified by
504 <code>TAO_USE_LOCAL_MEMORY_POOL</code>. The default is <code>1</code> (enabled)</p>
505 </td>
506 </tr>
507 </tbody>
508 </table>
509 </p>
510 </blockquote>
511 <h4><a name="CMPS">4. Connection Management and Protocol Selection</a></h4>
512 TAO can send and receive requests and replies using various <a
513 href="pluggable_protocols">transport protocols</a>. Each protocol has
514 its own concept of an <a href="ORBEndpoint.html">endpoint</a>.
515 The following options manage connections and control protocol
516 selection within a TAO application.
517 <p></p>
518 <blockquote>
520 <table border="2" cellpadding="0" cellspacing="2">
521 <tbody>
522 <tr>
523 <th>Option</th>
524 <th>Description</th>
525 </tr>
526 <tr>
527 <td><code>-ORBAcceptErrorDelay</code> <em>seconds</em></td>
528 <td><a name="-ORBAcceptErrorDelay"></a>This argument controls the
529 amount of time to wait before attempting to accept new
530 connections in the event that a transient error occurs (such as
531 running out of file handles). A delay of zero indicates that
532 accepting should not be attempted again after the transient error
533 and the handler will be removed from the reactor.
534 </td>
535 </tr>
536 <tr>
537 <td><code>-ORBDefaultInitRef</code> <em>IOR prefix</em></td>
538 <td><a name="-ORBDefaultInitRef"></a>This argument allows
539 resolution of initial references not explicitly specified with
540 <CODE>-ORBInitRef</CODE>. It requires a URL prefix that, after appending a slash '/'
541 ('|' for the UIOP pluggable protocol) and a simple object key, forms a
542 new URL to identify an initial object reference. The URL prefix format
543 currently supported is based on the standard <code><A href="INS.html#corbaloc">corbaloc</A></code>
544 mechanism in the CORBA <a href="INS.html">Interoperable Naming
545 Service. </a></td>
546 </tr>
547 <tr>
548 <td><code>-ORBDottedDecimalAddresses</code> <em>boolean (0|1)</em></td>
549 <td><a name="-ORBDottedDecimalAddresses"></a>Use the dotted
550 decimal notation for addresses. This option can be used to workaround
551 broken DNS implementations and may also reduce the time spent resolving
552 IP addresses. This option is enabled (<code>1</code>) by default on
553 Windows since DNS is often misconfigured there. On other platforms
554 this option is disabled (<code>0</code>) since domain names are
555 more flexible address notations for IORs.</td>
556 </tr>
557 <tr>
558 <td><code>-ORBIIOPClientPortBase</code> <em>base</em></td>
559 <td><a name="-ORBIIOPClientPortBase"></a>Clients using IIOP can be
560 constrained to connect <em>from</em> a range of ports. The range is set using
561 this base value then supplying a span to make it from <code>base</code> to
562 <code>base + span</code>. The default base port value is 0, meaning a system
563 selected port is used. If there are no available ports in the range, the ORB
564 will throw a TRANSIENT exception. </td>
565 </tr>
566 <tr>
567 <td><code>-ORBIIOPClientPortSpan</code> <em>span</em></td>
568 <td><a name="-ORBIIOPClientPortSpan"></a>Clients using IIOP can be
569 constrained to connect <em>from</em> a range of ports. The range is set using
570 a base port value along with this span to make a range from <code>base</code> to
571 <code>base + span</code>. The default span is 0, meaning a client may connect from
572 only the base port. The span is ignored if the base port number is 0.</td>
573 </tr>
574 <tr>
575 <td><code>-ORBNoServerSideNameLookups</code> <em>boolean (0|1)</em></td>
576 <td><a name="-ORBNoServerSideNameLookups"></a>Setting this to 1 will
577 prevent the ORB from looking up the peer's hostname when accepting an incoming
578 connection from a client when the above value (<code>ORBDottedDecimalAddresses</code>)
579 is <code>0</code>. This option is disabled (<code>0</code>) by default.</td>
580 </tr>
581 <tr>
582 <td><code>-ORBEndpoint</code> <em>endpoint</em></td>
583 <td><a name="-ORBEndpoint"></a>This option is same as the <a
584 href="#-ORBListenEndpoints"><code>-ORBListenEndPoints</code></a>
585 option described below. <font color="red">This option will be
586 deprecated in later versions on TAO since the CORBA
587 specification now defines the <code>-ORBListenEndpoints</code>
588 option instead. </font> </td>
589 </tr>
590 <tr>
591 <td><code>&#8209;ORBPreferredInterfaces</code>
592 <em>targetNetwork=localNetwork[,...]</em></td>
593 <td><a name="-ORBPreferredInterfaces"></a> This option allows
594 clients running on a multihomed host to pick a local
595 network/interface to communicate with a remote target.
596 When TAO attempts to establish a connection with a host
597 matching targetNetwork, then it will use the local ip address
598 matching localNetwork. Simple wildcards can be used for both
599 parameters, and multiple preferred interfaces can be specified
600 using comma separators (no embedded spaces allowed) or additional &#8209;ORBPreferredInterfaces directives.
601 For example, for a machine with two network cards
602 identified by the ip addresses 192.168.1.10 and 192.168.1.20, you can
603 use -ORBPreferredInterfaces *=*10,*=*20 (or the two directives
604 &#8209;ORBPreferredInterfaces *=*10 &#8209;ORBPreferredInterfaces *=*20).
605 Or to force all communication to first try to
606 use the loopback address, use <code>&#8209;ORBPreferredInterfaces *=127.0.0.1</code> .
607 <em>targetNetwork</em> can use any string, and must typically match
608 with the value read from an IOR.
609 <em>localNetwork</em> must use a dotted decimal address, because it
610 will be matched with the local ip interfaces.
611 </tr>
612 <tr>
613 <td><code>-ORBEnforcePreferredInterfaces</code>
614 <em>boolean (0|1)</em></td>
615 <td><a name="-ORBEnforcePreferredInterfaces"></a> If this
616 option is set to <CODE>1</CODE> (true), then TAO will only try to use the
617 interfaces specified by the <CODE>-ORBPreferredInterfaces</CODE> option.
618 The default is <CODE>0</CODE> (false), in which case if a connection
619 cannot be made using a preferred interface, TAO will
620 attempt to use the default interface (<CODE>INADDR_ANY</CODE>).
621 Note: If none of the preferred interfaces apply to an outgoing connection
622 then they will not be enforced. For this option to have
623 any effect, therefore, the connection through a legal preferred interface must fail.
624 </tr>
625 <tr>
626 <td><code>-ORBKeepalive</code> <em>boolean (0|1)</em></td>
627 <td><a name="-ORBKeepalive"></a>This option allows users to specify
628 that the SO_KEEPALIVE option is set on TCP sockets used by IIOP.
629 The default is <code>0</code> (false).
630 </td>
631 </tr>
632 <tr>
633 <td><code>-ORBDontRoute</code> <em>boolean (0|1)</em></td>
634 <td><a name="-ORBDontRoute"></a>This option allows users to specify
635 that the SO_DONTROUTE option is set on TCP sockets used by IIOP.
636 The default is <code>0</code> (false).
637 </td>
638 </tr>
639 <tr>
640 <td><code>-ORBLingerTimeout</code> <em>timeout</em></td>
641 <td><a name="-ORBLingerTimeout"></a> This option allows users to
642 set the linger timeout on a TCP socket before closing it. Hence,
643 this option is only useful when using IIOP. The
644 <code>timeout</code> value can be in the range of zero to the
645 maximum signed integer value for the particular platform on which
646 TAO is running.
647 </td>
648 </tr>
649 <tr>
650 <td><code>-ORBIPHopLimit</code> <em>hops</em></td>
651 <td><a name="-ORBIPHopLimit"></a>This option allows users to
652 specify the TTL (IPv4) or hop limit (IPv6) value used when datagrams are
653 sent over a socket. The default is the one selected by the Operating System.
654 The <code>hops</code> value can be in the range of zero to the
655 maximum signed integer value for the particular platform on which
656 TAO is running. Currently this feature works in IIOP, DIOP, SCIOP, and MIOP.
657 </td>
658 </tr>
659 <tr>
660 <td><code>-ORBIPMulticastLoop</code> <em>boolean (0|1)</em></td>
661 <td><a name="-ORBIPMulticastLoop"></a>This option allows users to
662 specify that the IP_MULTICAST_LOOP / IPV6_MULTICAST_LOOP option is set on
663 multicast sockets. The default is <code>1</code> (true).
664 </td>
665 </tr>
666 <tr>
667 <td><code>-ORBListenEndpoints</code> <em>endpoint</em></td>
668 <td><a name="-ORBListenEndpoints"></a> This option was
669 introduced with the CORBA <a
670 href="https://www.omg.org/cgi-bin/doc?orbos/01-01-04">Object
671 Reference Template</A> (ORT) specification. It instructs a
672 server ORB to listen for requests on the interface specified
673 by <code>endpoint</code>. When used with Real-time CORBA, the option
674 specifies the endpoints that the default thread pool listens
675 to. TAO endpoints are specified using a URL style format. An
676 endpoint has the form:
677 <blockquote><code>protocol://V.v@addr1,...,W.w@addrN
678 </code></blockquote> where <code>V.v</code> and
679 <code>W.w</code> are optional protocol versions for each
680 address. An example of an IIOP endpoint is:
681 <blockquote><code>iiop://<i><em>hostname</em></i>:<i><em>port</em></i>
682 </code></blockquote>
684 Sets of endpoints may be specified using multiple
685 <code>-ORBListenEndpoints</code> options or by delimiting
686 endpoints with a semi-colon (;). For example,
687 <blockquote><code>-ORBListenEndpoints iiop://localhost:9999
688 -ORBListenEndpoints uiop:///tmp/mylocalsock
689 -ORBListenEndpoints shmiop://10002 </code></blockquote> is
690 equivalent to: <blockquote><code>-ORBListenEndpoints
691 'iiop://localhost:9999;uiop:///tmp/mylocalsock;shmiop://10002'
692 </code></blockquote> Notice the single quotes (') in the
693 latter option specification. Single quotes are needed to
694 prevent the shell from interpreting text after the semi-colon
695 as another command to run. <p>If an endpoint is specified
696 without an <code>addr</code> such as the following: </p>
697 <blockquote><code>-ORBListenEndpoints uiop://
698 -ORBListenEndpoints shmiop:// </code></blockquote> then a
699 default endpoint will be created for the specified
700 protocol. <p>
702 Click <a href="ORBEndpoint.html"> here</a> for much more on
703 how to specify endpoints.
704 </td>
705 </tr>
706 <tr>
707 <td><code>-ORBLaneEndpoint</code> <em>endpoint</em></td>
708 <td><a name="-ORBLaneEndpoint"></a>This option is same as the
710 href="#-ORBLaneListenEndpoints"><code>-ORBLaneListenEndPoints</code></a>
711 option described below. <font color="red">This option will be
712 deprecated in later versions on TAO.</font>
713 </td>
714 </tr>
715 <tr>
716 <td><code>-ORBLaneListenEndpoints</code>
717 <em>thread-pool-id:thread-lane-id endpoint</em></td> <td><a
718 name="-ORBLaneListenEndpoints"></a> This option allows the
719 user to specify endpoints for thread pools and lanes. This
720 option is only meaningful when used with Real-time CORBA and
721 only makes sense when the thread pools and lanes are created in the
722 same order across server incarnations. See <a
723 href="#-ORBListenEndpoints"><code>-ORBListenEndPoints</code></a>
724 option on how to specify endpoints. An example is:
725 <blockquote><code>2:3 iiop://localhost:2345
726 </code></blockquote> where <code>2</code> specifies the second
727 thread pool created by the process and <code>3</code>
728 specifies the third lane of that thread pool. Note that
729 <code>0</code> should be used for the lane when specifying
730 endpoints for thread pools without lanes. <code>*:*</code>
731 can be used to specify all pools and lanes, <code>1:*</code> means
732 all lanes from pool <code>1</code>, and <code>*:1</code>
733 means lane <code>1</code> from all pools.
735 <p>Sets of endpoints may be specified using multiple
736 <code>-ORBLaneListenEndpoints</code> options or by delimiting
737 endpoints with a semi-colon (;). For example,
738 <blockquote><code>-ORBLaneListenEndpoints 1:4
739 iiop://localhost:9999 -ORBLaneListenEndpoints 1:4
740 uiop:///tmp/mylocalsock -ORBLaneListenEndpoints 1:4
741 shmiop://10002 </code></blockquote> is equivalent to:
742 <blockquote><code>-ORBLaneListenEndpoints 1:4
743 'iiop://localhost:9999;uiop:///tmp/mylocalsock;shmiop://10002'
744 </code></blockquote> Notice the single quotes (') in the
745 latter option specification. Single quotes are needed to
746 prevent the shell from interpreting text after the semi-colon
747 as another command to run. <p>If an endpoint is specified
748 without an <code>addr</code> such as the following: </p>
749 <blockquote><code>-ORBLaneListenEndpoints 2:3 uiop://
750 -ORBLaneListenEndpoints 2:3 shmiop:// </code></blockquote>
751 then a default endpoint will be created for the specified
752 protocol.
753 </td>
754 </tr>
755 <tr>
756 <td><code>-ORBImplRepoServicePort</code> <em>portspec</em></td>
757 <td>Specifies which port the Implementation Repository is
758 listening on for multicast requests. By default, the <code>TAO_DEFAULT_IMPLREPO_SERVER_REQUEST_PORT</code>
759 (10018) is used.</td>
760 </tr>
761 <tr>
762 <td><code>-ORBInitRef</code> <em>ObjectId=IOR</em></td>
763 <td><a name="-ORBInitRef"></a>Allows specification of an
764 arbitrary object reference for an initial service. The IOR could be in
765 any one of the following formats: OMG <code>IOR</code>, <code>URL</code>,
766 <code>corbaloc</code> (including <code>uioploc</code>) or <code>file</code>.
767 <code><A href="INS.html#corbaloc">corbaloc</A></code> is a multiple end-point IOR understood by
768 <code>ORB::string_to_object()</code> and used as a
769 boot-strapping mechanism by the <code>ORB::resolve_initial_references()</code>.
770 The mappings specified through this argument override the ORB
771 install-time defaults. The <code>file://pathname</code> interprets the
772 contents of the <code>pathname</code> file as an object reference in
773 any of the above formats. </td>
774 </tr>
775 <tr>
776 <td><code>-ORBMulticastDiscoveryEndpoint</code> <em>endpoint</em></td>
777 <td>Specifies the <code>endpoint</code> that should be used
778 for locating the Naming Service through multicast. <em>endpoint</em>
779 is of the form <code>ip-number:port-number</code> (<em>e.g.</em>, <code>"tango.cs.wustl.edu:1234"</code>
780 or <code>"128.252.166.57:1234"</code>). If there is no <code>':'</code>
781 in the end_point it is assumed to be a port number, with the IP address
782 being <code>INADDR_ANY</code>. </td>
783 </tr>
784 <tr>
785 <td><code>-ORBNameServicePort</code> <em>portspec</em></td>
786 <td>Specifies which port the Naming Service is listening on for
787 multicast requests. By default, the <code>TAO_DEFAULT_NAME_SERVICE_REQUEST_PORT</code>
788 (10013) value is used.</td>
789 </tr>
790 <tr>
791 <td> <code>-ORBTradingServicePort</code>
792 <em>portspec</em></a></td>
793 <td> Specifies
794 to which port the Trading Service is listening on for multicast
795 requests. By default, the <code>TAO_DEFAULT_TRADING_SERVICE_REQUEST_PORT</code>
796 (10016) value is used.</td>
797 </tr>
798 <tr>
799 <td> <code>-ORBUseIMR</code> <em>boolean (0|1)</em></td>
800 <td>This argument specifies that for POAs with the <code>PERSISTENT</code>
801 policy, that the TAO <a href="implrepo/">Implementation Repository</a>
802 should be used for notification of startup and shutdown and object
803 references should be changed to use the Implementation Repository also (N.B.
804 although see <code>-ORBIMREndpointsInIOR</code> below). </td>
805 </tr>
806 <tr>
807 <td> <code>-ORBIMREndpointsInIOR</code> <em>boolean (0|1)</em></td>
808 <td>This argument specifies whether, for POAs with the <code>PERSISTENT</code>
809 policy, the TAO <a href="implrepo/">Implementation Repository</a>
810 listen endpoints should be encoded into IORs when <code>-ORBUseIMR</code>
811 is set. The default is true. </td>
812 </tr>
813 <tr>
814 <td><code>-ORBUseParallelConnects</code> <em>boolean (0|1)</em></td>
815 <td><a name="-ORBUseParallelConnects"></a>This option allows users to
816 specify the ORB attempt to connect simultaneously to all endpoints
817 listed in profiles, rather than stepping through individual endpoints,
818 trying and possibly failing, before moving on to the next. For this
819 feature to work, the server must be using shared profiles.
820 The default is <code>0</code> (false).
821 </td>
822 </tr>
823 <tr>
824 <td><code>-ORBUseSharedProfile</code> <em>boolean (0|1)</em></td>
825 <td><a name="-ORBUseSharedProfile"></a>
826 This option allows multiple implicit or explicit endpoints to be
827 combined into a single profile for a given protocol rather than using
828 multiple profiles. For IIOP in non RTCORBA environments, the CORBA
829 specified tagged component <code>TAG_ALTERNATE_IIOP_ADDRESS</code> is
830 used to encode the combined endpoints. Processses using RTCORBA and
831 priority banded connections will continue to generate Profiles with
832 <code>TAO_TAG_IIOP_ENDPOINT</code> components.
833 This options is disabled by default.
834 </td>
835 </tr>
836 <tr>
837 <td><code>-ORBParallelConnectDelay</code> <em>unsigned long msec</em></td>
838 <td><a name="-ORBParallelConnectDelay"></a>When using parallel
839 connection attempts, this option defines the number of milliseconds to
840 delay when polling previously started connection attempts. If a server
841 is likely to be busy, this client side option will help avoid creating
842 redundant connections that must be accepted, only to be closed a moment
843 later. However, if the first reachable endpoint is far down the list,
844 this option will increase the delay before that endpoint is reached.
845 The default is <code>0</code>.
846 </td>
847 </tr>
848 <tr>
849 <td><code>-ORBPreferIPV6Interfaces</code> <em>boolean (0|1)</em></td>
850 <td><a name="-ORBPreferIPV6Interfaces"></a>
851 If option is <CODE>1</CODE> (true) it directs the default
852 endpoint selector for client connections to first attempt to
853 connect any IIOP endpoints from a provided IOR specifying
854 IPv6 interfaces. Only when none of these can be found or sucessfully connected IPv4
855 interfaces will be tried. The default is <CODE>0</CODE> (false).
857 This option is only available for IPv6 enabled builds of TAO (<CODE>ACE_HAS_IPV6</CODE>).
858 </td>
859 </tr>
860 <tr>
861 <td><code>-ORBConnectIPV6Only</code> <em>boolean (0|1)</em></td>
862 <td><a name="-ORBConnectIPV6Only"></a>
863 If this option is <CODE>1</CODE> (true) it directs a server ORB to:<br><p>
864 <li>allow only IPv6 interfaces as listening endpoints</li>
865 <li>encode only IPv6 interfaces in the IOR profile</li>
866 <li>prevent (depending on availability of IPV6_V6ONLY socket option)
867 or block IPv6 to IPv4 connections</li>
869 This option directs the default endpoint selector for client connections
870 to only attempt to connect any IIOP endpoints from a provided IOR specifying
871 IPv6 interfaces. Any available IPv4 interfaces will be
872 ignored. The default setting is <CODE>0</CODE> (false).
874 This option is only available for IPv6 enabled builds of TAO (ACE_HAS_IPV6).
875 </td>
876 </tr>
877 <tr>
878 <td><code>-ORBUseIPV6LinkLocal</code> <em>boolean (0|1)</em></td>
879 <td><a name="-ORBUseIPV6LinkLocal"></a>
880 If this option is <CODE>1</CODE> (true) it directs a server ORB to allow
881 connections on IPv6 link local addresses.
882 The default setting is <CODE>0</CODE> (false).
884 This option is only available for IPv6 enabled builds of TAO (ACE_HAS_IPV6).
885 </td>
886 </tr>
887 <tr>
888 <td><code>-ORBAllowZiopNoServerPolicies</code> <em>boolean (0|1)</em></td>
889 <td><a name="-ORBAllowZiopNoServerPolicies"></a> If this option is <CODE>1</CODE>
890 (true) it directs a client ORB to use any client-side (sender) configured ZIOP compression
891 without having seen any server-side (listener) ZIOP available compressor's list policies.
892 The CORBA Compressed GIOP (ZIOP) V1.0 specification states that the Server publishes
893 its available (i.e. allowable) compressors in the IOR of each server object. This
894 option allows ZIOP to be used with MIOP and/or CORBALOCs that have no such
895 compression list policies embedded. The client simply has to trust that the server is
896 configured to allow its highest priority compressor to be used. Any servers
897 that cannot decompress the client's used ZIOP compressor will reject the
898 request as they simply cannot decode or handle it (client-side (sender) comms will simply
899 timeout or lock-up for any such incorrect two-way requests, or be oblivious
900 to the failure for any such incorrect one-way requests). The default
901 setting is <CODE>0</CODE> (false) i.e. to disallow compression in such cases
902 and conform to the ZIOP specification; but this can be changed by adding
903 <CODE>#define TAO_ALLOW_ZIOP_NO_SERVER_POLICIES_DEFAULT true</CODE> to TAO's <CODE>config.h</CODE>
904 </td>
905 </tr>
906 </tbody>
907 </table>
908 </p>
909 </blockquote>
910 <h4><a name="IRO">5. Multiple Invocation Retry Options</a></h4>
911 In cases such as connection timing issues or a load balancing server
912 is temporarily not able to handle requests, it may be desirable to have
913 the ORB transparently retry an invocation a maximum number of times
914 until a successful invocation is made. To support this, a set of
915 parameters can be used to cycle over base and location forwarded
916 profiles until an invocation is successful. When cycling over
917 profiles and the first base profile is to be used, a user-defined
918 delay is made before retrying.
919 <p></p>
920 These parameters are used in the following situations:
921 <p></p>
922 <ul>
923 <li>Initial connection: If the connection to a server would result
924 in a TRANSIENT exception being thrown, cycle over profiles no more than the value of
925 the -ORBForwardOnTransientLimit option before throwing the exception.
926 <p></p>
927 </li>
928 <li>Waiting for a reply from the server: When using the IIOP protocol,
929 on many platforms if zero bytes is read as the server's reply, this could
930 indicate that the server may have had a disorderly shutdown or the
931 connection to the server was abruptly terminated. In this case
932 cycling through the profiles to retry the request will not exceeding the
933 value of -ORBForwardOnReplyClosedLimit. If for example the Implementation
934 Repository and Activator are used to start the server then this cycling could be
935 used to give the server enough time to re-launch. When this option is
936 used the -ORBForwardOnTransientLimit option should also be used to
937 avoid exceptions being thrown when trying to reestablish a connection.
938 <b>Note that because it is not known if the request was sent, this
939 could result in the request being processed more than one by the
940 server. Therefore this option should be used with care.</b>
941 This is why, although a COMM_FAILURE exception is normally thrown in this case,
942 this option is kept distinct from -ORBForwardOnCommFailureLimit
943 discussed below.
944 <p></p>
945 <li>Server sends an exception as a reply: A reply is received
946 and it is checked if it is an exception. If the exception is
947 of type COMM_FAILURE with completion status of COMPLETED_NO, then
948 the profiles will be cycled no more than the value of option
949 -ORBForwardOnCommFailureLimit until a successful reply is
950 received. Similar retries can be applied to TRANSIENT exceptions
951 (-ORBForwardOnTransientLimit), OBJECT_NOT_EXIST exceptions
952 (-ORBForwardOnObjectNotExistLimit), and INV_OBJREF exceptions
953 (-ORBForwardOnInvObjrefLimit).
954 <p></p>
955 </li>
956 </ul>
958 The retry options are given in the table below. Note that for
959 backward compatibility, the -ORBForward* options described in the
960 <a href="#MO">Miscellaneous Options </a> section are retained.
961 However, if any option in this section is used, then any
962 -ORBForward* option given in the Miscellaneous Options
963 section is ignored.
964 <p></p>
966 These options can also be used in the list of
967 <a href="#TCSF">Client_Strategy_Factory</a> options
968 in the service configurator file.
969 Using the service configurator file can help insure these
970 options are uniformly applied across multiple clients by
971 having them use the same configurator file.
973 <blockquote>
975 <table border="2" cellpadding="0" cellspacing="2">
976 <tbody>
977 <tr>
978 <th>Option</th>
979 <th>Description</th>
980 </tr>
981 <tr>
982 <td><code>-ORBForwardOnTransientLimit</code> <em>limit</em></td>
983 <td>Use this option to cycle through profiles when
984 establishing a connection with a server or when a
985 server replies to a request with a TRANSIENT
986 exception.
987 The number of retries will not exceed <em>limit</em>.</td>
988 </tr>
989 <tr>
990 <td><code>-ORBForwardOnCommFailureLimit</code> <em>limit</em></td>
991 <td>Use this option to cycle through profiles when a
992 server replies to a request with a COMM_FAILURE
993 exception.
994 The number of retries will not exceed <em>limit</em>.</td>
995 </tr>
996 <tr>
997 <td><code>-ORBForwardOnObjectNotExistLimit</code> <em>limit</em></td>
998 <td>Use this option to cycle through profiles when a
999 server replies to a request with a OBJECT_NOT_EXIST
1000 exception.
1001 The number of retries will not exceed <em>limit</em>.</td>
1002 </tr>
1003 <tr>
1004 <td><code>-ORBForwardOnInvObjrefLimit</code> <em>limit</em></td>
1005 <td>Use this option to cycle through profiles when a
1006 server replies to a request with a INV_OBJREF
1007 exception.
1008 The number of retries will not exceed <em>limit</em>.</td>
1009 </tr>
1010 <tr>
1011 <td><code>-ORBForwardOnReplyClosedLimit</code> <em>limit</em></td>
1012 <td>Use this option to cycle through profiles when it has
1013 been detected that a connection is closed when reading a server reply
1014 and having the server possibly process the reqest more than once
1015 is acceptable. This option currently does not work under FreeBSD.
1016 The number of retries will not exceed <em>limit</em>.
1017 If this option is used then -ORBForwardOnTransientLimit should
1018 also be used to avoid a TRANSIENT exception being thrown.
1019 </td>
1020 </tr>
1021 <tr>
1022 <td><code>-ORBForwardDelay</code> <em>int msecs</em></td>
1023 <td>Defines the number of milliseconds to delay while
1024 cycling through profiles when the first base profile
1025 is to be tried. The default is 100,000 milliseconds
1026 (0.1 seconds).</td>
1027 </tr>
1028 </tbody>
1029 </table>
1030 </p>
1031 </blockquote>
1034 <h4><a name="MO">6. Miscellaneous Options</a></h4>
1035 Options in this category don't control the behavior of the ORB in
1036 terms of resouces or strategies. Instead, they are helper options
1037 provided for specific application requirements.
1038 <blockquote>
1040 <table border="2" cellpadding="0" cellspacing="2">
1041 <tbody>
1042 <tr>
1043 <th>Option</th>
1044 <th>Description</th>
1045 </tr>
1046 <tr>
1047 <td><code>-ORBId</code> <em>orb_name</em></td>
1048 <td><a name="-ORBId"></a>This option allows the name of an ORB
1049 to be set to <code>orb_name</code>. The <CODE>ORBId</CODE> will be
1050 passed to the <CODE>CORBA::ORB_init()</CODE> method to differentiate
1051 coexisting ORBs (when there is more than one ORB).</td>
1052 </tr>
1053 <tr>
1054 <td><code>-ORBServerId</code> <em>server_id</em></td>
1055 <td><a name="-ORBServerId"></a>This option allows setting a name/id
1056 to a server to uniquely identify a server to TAO's <a href="implrepo">Implementation
1057 Repository</a>. </td>
1058 </tr>
1059 <tr>
1060 <td><code>-ORBDaemon</code></td>
1061 <td>Specifies that the ORB should <em>daemonize</em> itself, <em>i.e.</em>,
1062 run as a background process. Note, that this changes the working directory to
1063 be the root directory "/". This especially affects relative paths specified at the command line.
1064 This option is only meaningful on OS platforms that support daemonization.</td>
1065 </tr>
1066 <tr>
1067 <td><code>-ORBForwardInvocationOnObjectNotExist</code> <em>boolean (0|1)</em></td>
1068 <td>If this option is 1, the ORB forwards the request to next available profile when
1069 receiving OBJECT_NOT_EXIST exception reply. The default value is <CODE>0</CODE>
1070 which means the request is not forwarded upon OBJECT_NOT_EXIST exception.
1071 </td>
1072 </tr>
1073 <tr>
1074 <td><code>-ORBForwardOnceOnObjectNotExist</code> <em>boolean (0|1)</em></td>
1075 <td>If this option is 1, the ORB forwards the request if it
1076 receives OBJECT_NOT_EXIST exception reply. If it receives one of the exceptions
1077 (OBJECT_NOT_EXIST, COMM_FAILURE, TRANSIENT, INV_OBJREF) during forwarding,
1078 the request is not forwarded again and exception is propagated to the client
1079 code. The default value is <CODE>0</CODE> which means the request
1080 is not forwarded upon OBJECT_NOT_EXIST exception.
1081 </td>
1082 </tr>
1083 <tr>
1084 <td><code>-ORBForwardOnceOnCommFailure</code> <em>boolean (0|1)</em></td>
1085 <td>If this option is 1, the ORB forwards the request if it
1086 receives COMM_FAILURE exception reply. If it receives one of the exceptions
1087 (OBJECT_NOT_EXIST, COMM_FAILURE, TRANSIENT, INV_OBJREF) during forwarding,
1088 the request is not forwarded again and exception is propagated to the client
1089 code. The default value is <CODE>0</CODE> which means the request is not forwarded upon
1090 COMM_FAILURE exception.
1091 </td>
1092 </tr>
1093 <tr>
1094 <td><code>-ORBForwardOnceOnTransient</code> <em>boolean (0|1)</em></td>
1095 <td>If this option is 1, the ORB forwards the request if it
1096 receives TRANSIENT exception reply. If it receives one of the exceptions
1097 (OBJECT_NOT_EXIST, COMM_FAILURE, TRANSIENT, INV_OBJREF) during forwarding,
1098 the request is not forwarded again and exception is propagated to the client
1099 code. The default value is <CODE>0</CODE> which means the request
1100 is not forwarded upon TRANSIENT exception.
1101 </td>
1102 </tr>
1103 <tr>
1104 <td><code>-ORBForwardOnceOnInvObjref</code> <em>boolean (0|1)</em></td>
1105 <td>If this option is 1, the ORB forwards the request if it
1106 receives INV_OBJREF exception reply. If it receives one of the exceptions
1107 (OBJECT_NOT_EXIST, COMM_FAILURE, TRANSIENT, INV_OBJREF) during forwarding,
1108 the request is not forwarded again and exception is propagated to the client
1109 code. The default value is <CODE>0</CODE> which means the request
1110 is not forwarded upon INV_OBJREF exception.
1111 </td>
1112 </tr>
1113 </tbody>
1114 </table>
1115 </p>
1116 </blockquote>
1117 <p></p>
1118 <hr width="25%" align="left">
1119 <h3><a name="SVC">The Service Configurator File</a></h3>
1120 Internally, TAO uses the <a
1121 href="http://www.dre.vanderbilt.edu/~schmidt/PDF/Svc-Conf.pdf">ACE Service
1122 Configurator framework</a> to allow applications to configure the ORB
1123 at run-time. Applications provide a file named <code>svc.conf</code>
1124 with options that configure appropriate strategies in to the ORB. The
1125 options enable developers to control the behavior of the factories,
1126 strategies, and resources that the ORB uses. By default, TAO provides
1127 the following set of factories:
1128 <p></p>
1129 <ol>
1130 <li><a href="#TRF">Default Resource and Advanced Resource Factories.</a>
1131 This factory controls the creation of configurable resources used by
1132 TAO's ORB core. The resource factory is responsible for constructing
1133 and providing access to various resources used by the ORB irrespective
1134 of whether they perform client or server roles. ORB resources include
1135 reactors, protocol factories, message flushing strategies, connection
1136 purging strategies and different IOR parsers.
1137 <p> </p>
1138 </li>
1139 <li> <a href="#TSSF">Server Strategy Factory.</a> This factory
1140 creates various strategies of special utility to the ORB that is useful
1141 for controlling the behavior of servers. This factory is responsible
1142 for creating strategies useful for server objects like the concurrency
1143 strategy and the request demultiplexing strategies used by the POA.
1144 <p> </p>
1145 </li>
1146 <li> <a href="#TCSF">Client Strategy Factory.</a> This factory
1147 creates various strategies of special utility to the ORB, useful for
1148 controlling the behavior of clients. This factory is responsible for
1149 creating strategies useful for clients such as request multiplexing
1150 strategies, wait strategies, connect strategies etc.
1151 <p></p>
1152 </li>
1153 <li> <a href="#TUPF">TAO UIPMC Protocol Factory </a> This factory is
1154 responsible for controlling the behavior of clients and servers that
1155 use UDP sockets.
1156 <p></p>
1157 </li>
1158 <li> <a href="#TMSF">MIOP Strategy Factory.</a> This factory is
1159 responsible for controlling the behavior of clients and servers that
1160 use MIOP protocol.
1161 <p></p>
1162 </li>
1163 <li> <a href="#TTSM">Time Policy Strategy Manager.</a> This factory
1164 manages the TIME_POLICY strategy used by the ORB for timers and
1165 countdowns.
1166 <p></p>
1167 </li>
1168 </ol>
1169 Options specified via a <code>svc.conf</code> file can represent
1170 either the components provided by TAO (including the
1171 <code>Resource_Factory</code>, and the
1172 <code>Server_Strategy_Factory</code> and
1173 <code>Client_Strategy_Factory</code>) or customized components
1174 developed by the users. The service configurator file
1175 (<code>svc.conf</code>) provided by the user identifies the components
1176 to be loaded with the required strategies for each component.
1177 <p>A <code>svc.conf</code> file is <em><b>not</b></em> required to
1179 TAO applications since TAO provides a set of default values for
1180 strategies useful for the most common use cases, <em>i.e.</em>, the
1181 default values are set for all options. When a TAO application calls
1182 <code>CORBA::ORB_init()</code> it will try to find the
1183 <code>svc.conf</code> file. If found, TAO will parse and process the
1184 directives in the file; if not found, the default value for the
1185 default components will be used.</p>
1186 <hr width="25%" align="left">
1187 <h4><a name="TRF">1. Default and Advanced Resource Factories</a></h4>
1188 Many of TAO's ORB Core resources are fixed, including the allocators
1190 the incoming and outgoing data paths, and data structures for the
1191 various
1192 maps and lists maintained by the ORB. There is some flexibility,
1193 however, in the choice of a reactor, the selection of transport
1194 protocols, choice of data flushing strategy, various forms of
1195 connection resource management strategies and possibility of using
1196 different IOR parsers. The resource factories supported by TAO
1197 include the <code>Resource_Factory</code> and
1198 <code>Advanced_Resource_Factory</code>. TAO provides defaults of these
1199 factories, as well as the specialized resource factories described
1200 below:
1201 <blockquote>
1203 <table border="2" cellpadding="0" cellspacing="2">
1204 <tbody>
1205 <tr>
1206 <th>Resource Factory</th>
1207 <th>Description</th>
1208 </tr>
1209 <tr>
1210 <td><code><a href="#TDRF">Resource Factory</a></code></td>
1211 <td>Unless configured otherwise, this is the default resource
1212 factory used by the ORB.The resource factory is responsible for
1213 creating and providing access to various resources used by the server
1214 and client ORBs. The resources managed by this factory include creation
1215 of acceptor and connector registries, choice of data flushing strategy,
1216 limits for connection resource management, types of CDR buffers used
1217 for marshalling and demarshalling data, and different IOR parsers. </td>
1218 </tr>
1219 <tr>
1220 <td><code><a href="#TARF">Advanced Resource Factory</a></code></td>
1221 <td>This factory provides more advanced configuration options
1222 in the addition to all the features of the default resource factory.<br>
1223 <br>
1224 The advanced resource factory gives more control than the default
1225 resource factory over the type of resources used and how those
1226 resources are accessed. In addition to the options provided by the
1227 default resource factory, the advanced resource factory provides
1228 options that allow selecting different reactors, choosing different
1229 transport mechanisms and selecting the right connection purging
1230 strategy to maintain limits on resources used. The advanced resource
1231 factory was created to allow more advanced options while keeping the
1232 footprint of the default resource factory small.<br>
1233 <br>
1234 The advanced resource factory inherits from the default resource
1235 factory and accepts all of its options in addition to its own. </td>
1236 </tr>
1237 <tr>
1238 <td><code>Qt Resource Factory</code></td>
1239 <td>This is a specialized resource factory providing the means
1240 for integrating with the Qt GUI toolkit from Trolltech. </td>
1241 </tr>
1242 <tr>
1243 <td><code>Xt Resource Factory</code></td>
1244 <td>This is a specialized resource factory providing the means
1245 for integrating with the X Window System's Xt Intrinsics toolkit. </td>
1246 </tr>
1247 </tbody>
1248 </table>
1249 </p>
1250 </blockquote>
1251 <p></p>
1252 <h4><a name="TDRF">1.1. Resource_Factory</a></h4>
1253 Typically, the above options are exercised via the service
1254 configurator (svc.conf) file. The following line in the
1255 <code>svc.conf</code> file (all in one line)
1256 <p> <code>static
1257 Resource_Factory "[list of options]"</code></p>
1258 <p>will load the default
1259 resource factory with the options listed within the double quotes. The
1260 following table shows the list of possible options that can be
1261 specified within the double quotes in the above directive. There is an <a
1262 href="../tests/LongUpcalls/svc.conf">
1263 example</a> of how this is used in TAO.</p>
1264 <p></p>
1265 <blockquote>
1267 <table border="2" cellpadding="0" cellspacing="2">
1268 <tbody>
1269 <tr>
1270 <th>Option</th>
1271 <th>Description</th>
1272 </tr>
1273 <tr>
1274 <td><code>-ORBConnectionCacheLock</code> <em>locktype</em></td>
1275 <td><a name="-ORBConnectionCacheLock"></a>Specify the type of
1276 lock to be used by the Connection Cache. Possible values for lock type
1277 are <code>thread</code>, which specifies that an inter-thread mutex is
1278 used to guarantee exclusive access, and <code>null</code>, which
1279 specifies that no locking be performed. The default is thread. </td>
1280 </tr>
1281 <tr>
1282 <td><code>-ORBConnectionCacheMax</code> <em>limit</em></td>
1283 <td><a name="-ORBConnectionCacheMax"></a>The transport cache
1284 will grow to a maximum of the specified limit. The default is system
1285 dependent, but can be overridden at compile-time by defining the
1286 preprocessor macro <CODE>TAO_CONNECTION_CACHE_MAXIMUM</CODE>. </td>
1287 </tr>
1288 <tr>
1289 <td><code>-ORBConnectionCachePurgePercentage</code> <em>percent</em></td>
1290 <td><a name="-ORBConnectionCachePurgePercentage"></a>If the
1291 transport cache is purged, the specified percentage (20 by default) of
1292 the total number of connections cached will be closed. </td>
1293 </tr>
1294 <tr>
1295 <td><code>-ORBConnectionPurgingStrategy</code> <em>type</em></td>
1296 <td><a name="-ORBConnectionPurgingStrategy"></a>Opened
1297 connections are added to the transport cache so they can be reused.
1298 If a process continues to run and these connections are not reused,
1299 however, the cache will continue to grow. Before each new connection,
1300 therefore, the cache is checked and purged if it has reached the limit
1301 specified by the <CODE>-ORBConnectionCacheMax</CODE> option or the
1302 system default if that option was not used. The possible values for
1303 type are <CODE>lru</CODE>, <CODE>lfu</CODE>, <CODE>fifo</CODE>, and
1304 <CODE>null</CODE>. The default is <CODE>lru</CODE> (least recently
1305 used). The other options are <CODE>lfu</CODE> (least frequently used),
1306 <CODE>fifo</CODE> (first in first out), and <CODE>null</CODE> (no
1307 connections are purged) and are contained within the TAO Strategies
1308 library. </td>
1309 </tr>
1310 <tr>
1311 <td><code>-ORBDropRepliesDuringShutdown</code> <em>boolean (0|1)</em></td>
1312 <td><a name="-ORBDropRepliesDuringShutdown"></a> Strategy to
1313 make the ORB wait for replies to show up even if the ORB is
1314 shutdown. The default is to drop replies. For example, clients
1315 comunicating with misbehaved servers will continue to hang if
1316 replies don't show up and even if the client ORB is shutdown
1317 from another thread. This strategy helps the ORB decide to
1318 wait for the replies or drop replies. Some clients may not
1319 want to drop replies, and may want all their requests to be
1320 processed until ORB::destroy () is called. Setting the value
1321 of this option to 0 would help with that. </td>
1322 </tr>
1323 <tr>
1324 <td><code>-ORBFlushingStrategy</code> <em>type</em></td>
1325 <td><a name="-ORBFlushingStrategy"></a>By default TAO provides
1326 three strategies to flush queued messages. The <code>leader_follower</code>
1327 strategy uses the Reactor and non-blocking I/O to send the outgoing
1328 messages, this strategy participates in the Leader/Followers protocol
1329 to synchronize access to the Reactor. The <code>reactive</code>
1330 strategy uses the Reactor but does not take part in the
1331 Leader/Followers protocol, thus it is better used only in single
1332 threaded applications. Finally, the <code>blocking</code> strategy
1333 flushes the queue as soon as it becomes "full", and blocks the thread
1334 until all the data is sent.
1335 </td>
1336 </tr>
1337 <tr>
1338 <td><code>-ORBIORParser</code> <em>parser</em></td>
1339 <td><a name="-ORBIORParser"></a>Name an IOR Parser to load. IOR
1340 Parsers are used to interpret strings passed to <code>ORB::string_to_object()</code>.
1341 By default the ORB can handle multiple string formats, including <code>IOR:</code>,
1342 <code>corbaloc:</code>, <code>corbaname:</code>, and <code>file:</code>.
1343 The application developer can <a href="ior_parsing.html">add
1344 new IOR formats </a>using this option. </td>
1345 </tr>
1346 <tr>
1347 <td><code>-ORBMuxedConnectionMax</code> <em>number</em></td>
1348 <td><a name="-ORBMuxedConnectionMax"></a>The transport cache
1349 allows only specified number of connections-per-QoS property to be
1350 added to connection cache. Threads not getting the connections will
1351 wait for the connections to be released. This option is more useful for
1352 transports using a muxed connection strategy and want control over the
1353 number of connections that are created by the active threads. </td>
1354 </tr>
1355 <tr>
1356 <td><code>-ORBOutputCDRAllocator</code> <em>mmap|local_memory_pool</em></td>
1357 <td><a name="-ORBOutputCDRAllocator"></a>When the define
1358 <code>TAO_USE_OUTPUT_CDR_MMAP_MEMORY_POOL</code> is set to 1 then always the mmap pool
1359 will be used.
1360 </td>
1361 </tr>
1362 <tr>
1363 <td><code>-ORBProtocolFactory</code> <em>factory</em></td>
1364 <td><a name="-ORBProtocolFactory"></a>Specify which pluggable
1365 protocol factory to load. By default, only the factory for the IIOP
1366 protocol (<code>IIOP_Factory</code>) is loaded.
1367 <p>For example, if some protocol called <em><code>Foo</code></em>
1368 whose factory was called <em><code>Foo_Factory</code></em> was
1369 available, then it could be loaded into TAO by specifying <code>-ORBProtocolFactory
1370 Foo_Factory</code> in the service configurator file. The <em><code>Foo</code></em>
1371 pluggable protocol would then be available for use. </p>
1372 </td>
1373 </tr>
1374 <tr>
1375 <td><code>-ORBReactorMaskSignals</code> <em>0/1</em></td>
1376 <td>ACE select reactors mask signals during upcalls to the
1377 event handlers. This is only useful if the application is going to trap
1378 those signals and handle them in any special way. Disabling the mask
1379 can improve performance by reducing the number of kernel level locks. </td>
1380 </tr>
1381 <tr>
1382 <td><code>-ORBZeroCopyWrite</code> </td>
1383 <td><a name="-ORBZeroCopyWrite"></a> Use a zero copy write
1384 protocol, which at this moment the only option is sendfile.
1385 If your platform does support sendfile but you don't want
1386 that TAO uses it you can disable
1387 sendfile in TAO by add the define <code>TAO_HAS_SENDFILE 0</code>
1388 to your config.h file.
1389 </td>
1390 </tr>
1391 </tbody>
1392 </table>
1393 </p>
1394 </blockquote>
1395 <h4><a name="TARF">1.2. Advanced_Resource_Factory</a></h4>
1396 This factory is located in the <code>TAO_Strategies</code> library. It
1397 accepts the options below as well as those described above in the
1398 <code>Resource_Factory</code>. This factory can be loaded dynamically
1399 using a service configurator directive of the form (all on one line):
1400 <p><code>dynamic Advanced_Resource_Factory Service_Object
1401 *</code><br>
1402 <code>TAO_Strategies:_make_TAO_Advanced_Resource_Factory
1403 () "-ORBReactorType select_st" </code></p>
1404 <p>It can also be loaded statically by doing the following:</p>
1405 <p></p>
1406 <ul>
1407 <li>Add <code>#include "tao/Strategies/advanced_resource.h"</code>
1408 to the file containing <code>main()</code>. </li>
1409 <li>Link the TAO_Strategies library into the executable. </li>
1410 <li>Specify a service configurator directive of the form: <code>static
1411 Advanced_Resource_Factory "-ORBReactorType select_st"</code> </li>
1412 </ul>
1413 You can
1414 omit the <code>#include</code> if you always use dynamic libraries.
1415 <p>Loading the <code>Advanced_Resource_Factory</code> disables the
1416 <code>Resource_Factory</code>. Any directives for the
1417 <code>Resource_Factory</code> will have no effect (and generate
1418 warnings telling you so). The following table lists the options that
1419 can be provided in double quotes. An <a
1420 href="../performance-tests/Latency/Single_Threaded/svc.conf"> example</a>
1421 is available that shows how to specify this option in the svc.conf file.</p>
1422 <p></p>
1423 <blockquote>
1425 <table border="2" cellpadding="0" cellspacing="2">
1426 <tbody>
1427 <tr>
1428 <th>Option</th>
1429 <th>Description</th>
1430 </tr>
1431 <tr>
1432 <td><code>-ORBAMHResponseHandlerAllocator</code> <em>which</em></td>
1433 <td><a name="-ORBAMHResponseHandlerAllocator"></a>Specify whether the ORB
1434 uses locked (<em>which</em> = <code>thread</code>) or lock-free (<em>which</em>
1435 = <code>null</code>) allocators for the AMH response handlers.</td>
1436 </tr>
1437 <tr>
1438 <td><code>-ORBAMIResponseHandlerAllocator</code> <em>which</em></td>
1439 <td><a name="-ORBAMIResponseHandlerAllocator"></a>Specify whether the ORB
1440 uses locked (<em>which</em> = <code>thread</code>) or lock-free (<em>which</em>
1441 = <code>null</code>) allocators for the AMI response handlers.</td>
1442 </tr>
1443 <tr>
1444 <td><code>-ORBInputCDRAllocator</code> <em>which</em></td>
1445 <td><a name="-ORBInputCDRAllocator"></a>Specify whether the
1446 ORB uses locked (<em>which</em> = <code>thread</code>) or lock-free
1447 (<em>which</em> = <code>null</code>) allocators for the incoming CDR
1448 buffers. Though <code>null</code> should give the optimal performance;
1449 we made the default <code>thread</code>. TAO optimizations for octet
1450 sequences will not work in all cases when the allocator does not have
1451 locks (for example if the octet sequences are part of a return
1452 value). Using locked allocators also allows the users to take
1453 advantage of the TAO octet sequence extensions to preserve the buffer
1454 after the upcall. </td>
1455 </tr>
1456 <tr>
1457 <td><code>-ORBReactorRegistry</code> <em>registry_type</em></td>
1458 <td><a name="-ORBReactorRegistry"></a>This option is no longer
1459 supported. The Advanced Resource Factory will emit an error if you
1460 attempt its use. </td>
1461 </tr>
1462 <tr>
1463 <td><code>-ORBReactorThreadQueue</code> <em>which</em></td>
1464 <td><a name="-ORBReactorThreadQueue"></a>Applies only to the
1465 <CODE>ACE_TP_Reactor</CODE>, i.e., when <code>-ORBReactorType</code> =
1466 <code>tp</code>, and specifies the order, last-in-first-out
1467 (<em>which</em> = <code>LIFO</code>), the default, or
1468 first-in-first-out (<em>which</em> = <code>FIFO</code>), in which
1469 waiting threads are selected to run by the
1470 <CODE>ACE_Select_Reactor_Token</CODE>. </td>
1471 </tr>
1472 <tr>
1473 <td><code>-ORBReactorType</code> <em>which</em></td>
1474 <td><a name="-ORBReactorType"></a>Specify what kind of reactor
1475 the ORB uses. The default reactor is the ACE_TP_Reactor.
1476 <table border="1" cellpadding="0" cellspacing="2">
1477 <tbody>
1478 <tr>
1479 <th><em>which</em></th>
1480 <th>Reactor</th>
1481 </tr>
1482 <tr>
1483 <td><code>select_mt</code></td>
1484 <td>Use the multi-thread select-based reactor.</td>
1485 </tr>
1486 <tr>
1487 <td><code>select_st</code></td>
1488 <td>Use the single-thread select-based reactor.</td>
1489 </tr>
1490 <tr>
1491 <td><code>wfmo</code></td>
1492 <td>Use the WFMO reactor (Win32 only).</td>
1493 </tr>
1494 <tr>
1495 <td><code>msg_wfmo</code></td>
1496 <td>Use the MsgWFMO reactor (Win32 only).</td>
1497 </tr>
1498 <tr>
1499 <td><code>tp</code></td>
1500 <td>Use the <code>ACE_TP_Reactor</code>, a select based
1501 thread-pool reactor which is the default.</td>
1502 </tr>
1503 <tr>
1504 <td><code>dev_poll</code></td>
1505 <td>Use the <code>ACE_Dev_Poll_Reactor</code>, a
1506 <code>/dev/poll</code> or Linux <code>sys_epoll()</code>
1507 based thread-pool reactor. It is intended to be a
1508 highly scalable replacement for the
1509 <code>select()</code> based reactors. The
1510 ACE_Dev_Poll_Reactor is currently only supported on
1511 Linux. Be aware that dev_poll
1512 support is experimental!</td>
1513 </tr>
1514 </tbody>
1515 </table>
1516 </td>
1517 </tr>
1518 </tbody>
1519 </table>
1520 </p>
1521 </blockquote>
1522 <h4><a name="TSSF">2. Server_Strategy_Factory</a></h4>
1523 Certain elements of the ORB relate only to a TAO server. In this
1524 context, the server is any application that passively accepts
1525 connection from other processes and receives requests from those other
1526 connections. The server strategy factory is responsible for supporting
1527 features of TAO that are specific to servers. In particular, these
1528 include the following strategies:
1529 <ul>
1530 <li> The <em>concurrency strategies</em> control the thread creation
1531 flags and other concurrency related behaviors.
1532 <p></p>
1533 </li>
1534 <li> The <em>demuliplexing strategies</em> are used
1535 to locate servants inside the POA that are responsible for handling
1536 requests.
1537 <p></p>
1538 </li>
1539 </ul>
1540 TAO provides a default server strategy factory called
1541 <code>Server_Strategy_Factory</code>
1542 <p>Typically, the following options are set via the service
1543 configurator
1544 (svc.conf) file. The following line in the svc.conf file (all in one
1545 line)</p>
1546 <p><code>static Server_Strategy_Factory "[list of
1547 options]"</code></p>
1548 <p>would load all the options listed within "". An
1549 <a href="../performance-tests/Latency/Single_Threaded/svc.conf">example</a>
1550 is available
1551 that shows how to specify this option in the <code>svc.conf</code>
1552 file. </p>
1553 <p></p>
1554 <blockquote>
1556 <table border="2" cellpadding="0" cellspacing="2">
1557 <tbody>
1558 <tr>
1559 <th>Option</th>
1560 <th>Description</th>
1561 </tr>
1562 <tr>
1563 <td><code>-ORBActiveHintInIds</code> <em>adds an active hint
1564 in ids</em></td>
1565 <td>Specify whether an active hint should be added to ids. With
1566 active hints, ids can be found quickly. However, they lead to larger
1567 IORs. Note that this option is disregarded <code>if
1568 -ORBAllowReactivationOfSystemids</code> is set to <code>0</code>.
1569 The <em>-ORBActiveHintInIds</em>
1570 can be <code>0</code> or <code>1</code>. This option defaults to <code>1</code>.
1571 </td>
1572 </tr>
1573 <tr>
1574 <td><code>-ORBActiveHintInPOANames</code> <em>adds an active
1575 hint in poa names</em></td>
1576 <td>Specify whether an active hint should be added to POA
1577 names. With active hints, POA names can be found quickly. However, they
1578 lead to larger IORs. The <code>-ORBActiveHintInPOANames</code> can be <code>0</code>
1579 or <code>1</code>. This option defaults to <code>1</code>. </td>
1580 </tr>
1581 <tr>
1582 <td><code>-ORBActiveObjectMapSize</code> <em>active object map
1583 size</em></td>
1584 <td>Specify the size of the active object map. If not
1585 specified, the default value is 64.</td>
1586 </tr>
1587 <tr>
1588 <td><code>-ORBAllowReactivationOfSystemids</code> <em>allows
1589 reactivation of system ids</em></td>
1590 <td>Specify whether system ids can be reactivated, i.e., once
1591 an id that was generated by the system has been deactivated, will the
1592 user reactivate a new servant using the old id. If the user is not
1593 going to use this feature, the IORs can be shortened, an extra
1594 comparison in the critical upcall path removed, and some memory on the
1595 server side can be saved. The <code>ORBAllowReactivationOfSystemids</code>
1596 can be <code>0</code> or <code>1</code>. This option defaults to <code>1</code>.
1597 </td>
1598 </tr>
1599 <tr>
1600 <td><a name="orb_concurrency"><code>-ORBConcurrency</code></a> <em>which</em></td>
1601 <td>Specify which concurrency strategy to use. Range of values
1602 is <code>reactive</code> for a purely Reactor-driven concurrency
1603 strategy or <code>thread-per-connection</code> for creating a new
1604 thread to service each connection. The default is reactive. </td>
1605 </tr>
1606 <tr>
1607 <td><code>-ORBPersistentidPolicyDemuxStrategy</code> <em>persistent
1608 id policy based demultiplexing strategy</em></td>
1609 <td>Specify the demultiplexing lookup strategy to be used with
1610 the persistent id policy. The <em>demultiplexing strategy</em> can be
1611 one of <code>dynamic</code> or <code>linear</code>. This option
1612 defaults to using the <code>dynamic</code> strategy. </td>
1613 </tr>
1614 <tr>
1615 <td><code>-ORBPoaMapSize</code> <em>poa map size</em></td>
1616 <td>Specify the size of the POA map. If not specified, the
1617 default value is 24.</td>
1618 </tr>
1619 <tr>
1620 <td><code>-ORBSystemidPolicyDemuxStrategy</code> <em>system id
1621 policy based demultiplexing strategy</em></td>
1622 <td>Specify the demultiplexing lookup strategy to be used with
1623 the system id policy. The <em>demultiplexing strategy</em> can be one
1624 of <code>dynamic</code>, <code>linear</code>, or <code>active</code>.
1625 This option defaults to use the <code>dynamic</code> strategy when <code>-ORBAllowReactivationOfSystemids</code>
1626 is true, and to <code>active</code> strategy when <code>-ORBAllowReactivationOfSystemids</code>
1627 is false. </td>
1628 </tr>
1629 <tr>
1630 <td><code>-ORBThreadFlags</code> <em>thread flags</em></td>
1631 <td>Specify the flags used for thread creation. Flags can be
1632 any logical-OR combination of <code>THR_DETACHED</code>, <code>THR_BOUND</code>,
1633 <code>THR_NEW_LWP</code>, <code>THE_SUSPENDED</code>. The
1634 default is <code>THR_BOUND | THR_DETACHED</code> . </td>
1635 </tr>
1636 <tr>
1637 <td><a name="server_timeout"><code>-ORBThreadPerConnectionTimeout</code></a>
1638 <em>milliseconds</em></td>
1639 <td>In many platforms it is impossible to interrupt the server
1640 threads created by the <code>thread-per-connection</code> model. This
1641 is because these threads are blocked in <code>read()</code> operations
1642 (and not in <code>select()</code>). As a workaround, the server
1643 threads periodically poll the ORB to find out if they should shutdown.
1644 This option controls the period of the polling, expressed in
1645 milliseconds. Applications that do not shutdown, or that can otherwise
1646 ensure that no server threads will be running at shutdown (for example
1647 if all the clients terminate before the server) can disable the
1648 polling using the magic value <code>INFINITE</code>.
1649 <p>If the option is not provided then the ORB uses the
1650 compile-time flag <code>TAO_DEFAULT_THREAD_PER_CONNECTION_TIMEOUT</code>,
1651 this flag also expresses the time in milliseconds (as a string
1652 constant) and the magic value <code>"INFINITE"</code> can be used to
1653 disable polling entirely. This yields a slight performance improvement
1654 (around 1%). </p>
1655 </td>
1656 </tr>
1657 <tr>
1658 <td><code>-ORBTransientidPolicyDemuxStrategy</code> <em>transient
1659 id policy based demultiplexing strategy</em></td>
1660 <td>Specify the demultiplexing lookup strategy to be used with
1661 the transient id policy. The <em>demultiplexing strategy</em> can be
1662 one of <code>dynamic</code>, <code>linear</code>, or <code>active</code>.
1663 This option defaults to using the <code>active</code> strategy. </td>
1664 </tr>
1665 <tr>
1666 <td><code>-ORBUniqueidPolicyReverseDemuxStrategy</code> <em>unique
1667 id policy based reverse demultiplexing strategy</em></td>
1668 <td>Specify the reverse demultiplexing lookup strategy to be
1669 used with the unique id policy. The <em>reverse demultiplexing strategy</em>
1670 can be one of <code>dynamic</code> or <code>linear</code>. This
1671 option defaults to using the <code>dynamic</code> strategy. </td>
1672 </tr>
1673 <tr>
1674 <td><code>-ORBUseridPolicyDemuxStrategy</code> <em>user id
1675 policy based demultiplexing strategy</em></td>
1676 <td>Specify the demultiplexing lookup strategy to be used with
1677 the user id policy. The <em>demultiplexing strategy</em> can be one of
1678 <code>dynamic</code> or <code>linear</code>. This option
1679 defaults to using the <code>dynamic</code> strategy. </td>
1680 </tr>
1681 </tbody>
1682 </table>
1683 </p>
1684 </blockquote>
1685 <h4><a name="TCSF">3. Client_Strategy_Factory</a></h4>
1686 Similar to the
1687 server strategy factory, the client strategy factory supports those
1688 elements of TAO that are specific to the behavior of clients, which
1689 are any CORBA applications that actively establish connections, submit
1690 requests, and perhap receive responses. The client strategy factory
1691 provides control over several resources used by clients. TAO provides
1692 a default client strategy factory called
1693 <code>Client_Strategy_Factory</code>.
1694 <p>Typically, the following options are set via the service
1695 configurator
1696 (<code>svc.conf</code>) file. The following line in the
1697 <code>svc.conf</code> file (all in one line)</p>
1698 <p><code>static Client_Strategy_Factory "[list of options]"</code></p>
1699 <p> would load all the options listed within "". An <a
1700 href="../performance-tests/Latency/Single_Threaded/svc.conf">example</a>
1701 is available that shows how to specify this option in the <code>svc.conf</code>
1702 file.</p>
1703 <p></p>
1704 <blockquote>
1706 <table border="2" cellpadding="0" cellspacing="2">
1707 <tbody>
1708 <tr>
1709 <th>Option</th>
1710 <th>Description</th>
1711 </tr>
1712 <tr>
1713 <td><code>-ORBClientConnectionHandler</code> <em>MT | ST | RW
1714 / MT_NOUPCALL</em><br>
1715 <code>-ORBWaitStrategy</code> <em>MT / ST / RW / MT_NOUPCALL
1716 </em>
1717 </td>
1718 <td><em>Please note that these two options are synonymous and can be used interchangeably.</em>
1719 <p><a name="-ORBClientConnectionHandler"></a><em>ST</em> means
1720 use the single-threaded client connection handler, i.e., the leader
1721 follower model will not be used. However, <em>ST</em> does support
1722 nested upcalls and handling of new requests while waiting for the reply
1723 from a server.
1724 <p><em>MT</em> means use the multi-threaded client connection
1725 handler which uses the leader follower model. This model allows the use
1726 of multiple threads with a single Reactor. </p>
1727 <p><em>RW</em> selects a strategy that simply blocks in
1728 <code>recv()</code> when waiting for a response from the server
1729 instead of waiting in the Reactor using the Leader/Followers
1730 pattern. The <em>RW</em> strategy only works when the application
1731 does not have to worry about new request showing up when waiting for a
1732 response. Further, this strategy cannot be used with BiDIR GIOP.
1733 Note that applications that require nested upcalls are not compatible
1734 with this strategy. Also note that this strategy will only affect synchronous
1735 two way calls, since there is no waiting for one way calls or AMI requests
1736 (at least not in the same sense as for synchronous two way calls).
1737 This strategy can also be used in an application that
1738 is both a client and a server where the server side is handled by a
1739 separate thread and the client threads are "pure" clients.
1740 Use in single threaded applications with both client and server roles is
1741 also possible but in these cases special care has to be taken to avoid
1742 deadlocks because of nested synchronous calls. Mixing in AMI requests and/or
1743 other asynchronous reactor (timer/notification) events might help solve
1744 such issues.
1745 When this strategy is set to RW, then also the -ORBFlushingStrategy
1746 (which is part of the Resource_Factory) has to be set to <code>blocking</code>.</p>
1748 <CODE>MT_NOUPCALL</CODE> means use a client connection handler that
1749 participates in the leader-follower model like MT, but, like
1750 RW, does not allow handling of nested CORBA upcalls within the
1751 waiting thread. It does allow handling of other non CORBA (ACE reactor events)
1752 like timers and ACE notification queue events. Note that with
1753 this strategy it is possible
1754 to "run out of threads" in a thread pool, and that TAO doesn't
1755 grow thread pools. Unlike RW, this does not require <a
1756 href="#ORBTransportMuxStrategy">-ORBTransportMuxStrategy&nbsp;<em>EXCLUSIVE</em></a>.
1757 </p>
1758 <p>Default for this option is <em>MT</em>. </p>
1759 </td>
1760 </tr>
1762 <tr>
1763 <td><code>-ORBConnectionHandlerCleanup</code> <em>0 | 1</em><br>
1764 </td>
1765 <td><a name="-ORBConnectionHandlerCleanup"></a>Setting this
1766 option to <em>1</em> lets the ORB know that connection
1767 handlers setup for sending messages need to be cleaned up
1768 when errors occur. This option has an effect only for
1769 <em> -ORBClientConnectionHandler RW </em>. Rest of the
1770 options for <em> -ORBClientConnectionHandler </em> have been
1771 automatically set up for cleaning the connection
1772 handlers. Setting the option to <em> 1 </em> has a side
1773 effect of registering and unregistering the connection
1774 handlers with the Reactor for every invocation, which has a
1775 negative impact on performance. Setting the option to <em> 0
1776 </em> prevents this performance impact but leads to problems
1777 outlined
1779 href="http://bugzilla.dre.vanderbilt.edu/show_bug.cgi?id=2186">
1780 here</A> and <a
1781 href="http://bugzilla.dre.vanderbilt.edu/show_bug.cgi?id=2224">
1782 here</A>
1783 <p>Default for this option is <em>0</em>. </p>
1784 </td>
1785 </tr>
1787 <tr>
1788 <td><code>-ORBConnectStrategy</code> <em>type</em></td>
1789 <td><a name="-ORBConnectStrategy"></a>TAO provides three
1790 strategies to connect to remote servers. The default <em>leader_follower</em>
1791 strategy uses the Reactor and non-blocking connects to connect and this
1792 strategy participates in the Leader/Followers protocol to synchronize
1793 access to the Reactor. The <em>reactive</em> strategy uses the Reactor
1794 for non-blocking connects but does not take part in the
1795 Leader/Followers protocol, thus it is better used only in single
1796 threaded applications. Finally, the <em>blocked</em> strategy as the
1797 name implies, blocks the thread until connection is complete. Some of
1798 the protocols in TAO (such as SHMIOP and SSLIOP) can only use the <em>blocked</em>
1799 strategy.
1800 </td>
1801 </tr>
1802 <tr>
1803 <td><code>-ORBDefaultSyncScope</code> <em>None | Transport | Server | Target</em></td>
1804 <td><a name="-ORBDefaultSyncStrategy"></a>Supply a default sync scope for
1805 the ORB to use when a Messaging Sync Scope policy is not used. When not
1806 supplied, the default sync scope is SYNC_WITH_TRANSPORT.
1807 </td>
1808 </tr>
1809 <tr>
1810 <td><code>-ORBTransportMuxStrategy</code> <em>EXCLUSIVE | MUXED</em></td>
1811 <td><a name="ORBTransportMuxStrategy"></a><em>EXCLUSIVE</em>
1812 means that the Transport does not multiplex requests on a connection.
1813 At a time, there can be only one request pending on a connection.
1814 <p><em>MUXED</em> means that Transport multiplexes more than
1815 one request at the same time on a connection. This option is often used
1816 in conjunction with AMI, because multiple requests can be sent "in
1817 bulk." </p>
1818 <p>Default for this option is <em>MUXED</em>. </p>
1819 </td>
1820 </tr>
1821 <tr>
1822 <td>Invocation Retry options</td>
1823 <td>Options of the same names as the command-line options
1824 described in <a href="#IRO">Multiple Invocation Retry Options</a>
1825 can also be applied client strategy factory service. Any
1826 option provided on the command line will override the
1827 corresponding option in the service configurator
1828 file.
1829 </td>
1830 </tr>
1831 </tbody>
1832 </table>
1833 </p>
1834 </blockquote>
1835 <h4><a name="TUPF">4. TAO_UIPMC_Protocol_Factory</a></h4>
1836 This factory is located in the <code>TAO_PortableGroup</code> library and
1837 implements the MIOP protocol. It uses the
1838 <a href="TMSF">TAO_MIOP_Resource_Factory</a> to manage UDP connection options
1839 shared with the TAO_DIOP_Protocol_Factory. It accepts its own un-shared
1840 options shown below. (Any options required should be given
1841 to the TAO_UIPMC_Protocol_Factory between the two double-quotes at the end
1842 of the line as a space separated list; however none are required as all
1843 options take default values if not specified.) This factory can be loaded
1844 dynamically using service configurator directives of the form (all on one line):
1845 <p><code>dynamic UIPMC_Factory Service_Object *
1846 TAO_PortableGroup:_make_TAO_UIPMC_Protocol_Factory() ""</code></p>
1847 <p>Normally however in order to set up the TAO_UIPMC_Protocol_Factory correctly,
1848 the application will have to use other service configurator directives as well;
1849 for example:</p>
1850 <code>dynamic UIPMC_Factory Service_Object *
1851 TAO_PortableGroup:_make_TAO_UIPMC_Protocol_Factory() ""<br>
1852 static Resource_Factory "&#8209;ORBProtocolFactory IIOP_Factory
1853 &#8209;ORBProtocolFactory UIPMC_Factory"<br>
1854 dynamic PortableGroup_Loader Service_Object *
1855 TAO_PortableGroup:_make_TAO_PortableGroup_Loader() ""</code></p>
1856 <blockquote>
1857 <p></p>
1858 <table border="2" cellpadding="0" cellspacing="2">
1859 <tbody>
1860 <tr>
1861 <th>Option</th>
1862 <th>Description</th>
1863 </tr>
1864 <tr>
1865 <td ALIGN="left"><code>&#8209;ORBListenerInterfaces</code> <em>targetNetwork=localNetwork[,...] | CopyPreferredInterfaces</em></td>
1866 <td ALIGN="left">This is a server-side (listener) option that specifies, on a multihomed host,
1867 which network/interface(s) are to be used to listen for communications from the multicast addressed
1868 remote client(s). If this option is unspecified (or if none of the given
1869 <em>targetNetwork=localNetwork</em> patterns match the current addresses being set-up for
1870 the attempted listener) then the default listener will be set-up as specified or defaulted with the
1871 <code>&#8209;ORBListenOnAll</code> see above.
1872 Otherwise when TAO attempts to establish the listeners for a <em>targetNetwork</em> multicast
1873 address(es), it will use the local ip address(es) matching the <em>localNetwork</em> string. Simple
1874 wildcards can be used for both parameters, and multiple paired <em>targetNetwork=localNetwork</em>
1875 strings can be specified using comma separators (no embedded spaces allowed) or via additional
1876 <code>&#8209;ORBListenerInterfaces</code> directives. It is also possiable to specify loopback
1877 and/or multiple interfaces at the same time for each listener established via such
1878 <code>&#8209;ORBListenerInterfaces</code> directives.
1880 For example, for a machine with two network cards identified by the ip addresses
1881 <code>192.168.1.10</code> and <code>192.168.1.20</code>, you can use the single directive
1882 <code>&#8209;ORBListenerInterfaces 239.255.*=*10,224.255.*=*20</code> or the pair of directives
1883 <code>&#8209;ORBListenerInterfaces 239.255.*=*10 &#8209;ORBListenerInterfaces 224.255.*=*20</code>
1884 to establish the link to listen for <em>239.255.*</em> multicast addresses on the first interface, and
1885 <em>224.255.*</em> multicast addresses on the second interface.</p>
1886 <em>targetNetwork</em> can use any string, but must typically match the value writen into the IOR and so
1887 will usually be a dotted decimal multicast address in the administrative "site local" range,
1888 (<em>224.255.0.0</em> to <em>238.255.255.255</em>) or (<em>239.255.0.0</em> to <em>239.255.255.255</em>).
1889 <p><em>localNetwork</em> must use a local dotted decimal address, because it will be matched with
1890 the local ip interfaces.</p>
1891 The same client-side (sender) assignments as specified by the ORB_init supplied command line option(s)
1892 <code>&#8209;ORBPreferredInterfaces</code> can be duplicated by specifying the single special
1893 <em>CopyPreferredInterfaces</em> parameter as in <code>&#8209;ORBListenerInterfaces CopyPreferredInterfaces</code>
1894 (which may be prefixed and/or postfixed by other <code>&#8209;ORBListenerInterfaces <em>targetNetwork=localNetwork</em></code>
1895 options as required).
1896 </tr>
1897 <tr>
1898 <td ALIGN="left"><code>&#8209;ORBListenOnAll</code> <em>0 | 1</em></td>
1899 <td ALIGN="left">This is a server-side (listener) option that by default is disabled; however
1900 this option only takes effect where no <code>&#8209;ORBListenerInterfaces</code>
1901 directives (if any, see below) match the actual multicast address being set-up.
1902 <p>If disabled (<em>0</em>) the multicast address will be listened for only on the default multicast
1903 interface associated with the <CODE>INADDR_ANY</CODE> local address (normally the first such
1904 local interface on the system), the loopback interface is normally excluded.</p>
1905 If enabled (<em>1</em>) the multicast address will be listened for on ALL the local network
1906 interface(s) which are multicast enabled (again the loopback interface is normally excluded).
1907 </td>
1908 </tr>
1909 </tbody>
1910 </table>
1911 </blockquote>
1912 <h4><a name="TMSF">5. TAO_MIOP_Resource_Factory</a></h4>
1913 This factory is located in the <code>TAO_PortableGroup</code> library and
1914 manages UDP connection options shared between the TAO_DIOP_Protocol_Factory
1915 and the <a href="TUPF">TAO_UIPMC_Protocol_Factory</a> (see above). It
1916 accepts the options detailed below, which should be specified between the
1917 two double-quotes shown here as a space-separated list; however none are
1918 required as all options take default values if not specified. This factory
1919 can be loaded dynamically using a service configurator directive of the
1920 form (all on one line):
1921 <p><code>dynamic MIOP_Resource_Factory Service_Object *
1922 TAO_PortableGroup:_make_TAO_MIOP_Resource_Factory () ""</code></p>
1923 You would normally have to use other service configurator
1924 directives as well; for example:
1925 <p><code>dynamic UIPMC_Factory Service_Object *
1926 TAO_PortableGroup:_make_TAO_UIPMC_Protocol_Factory() ""<br>
1927 static Resource_Factory "&#8209;ORBProtocolFactory IIOP_Factory
1928 &#8209;ORBProtocolFactory UIPMC_Factory"<br>
1929 dynamic PortableGroup_Loader Service_Object *
1930 TAO_PortableGroup:_make_TAO_PortableGroup_Loader() ""<br>
1931 dynamic MIOP_Resource_Factory Service_Object *
1932 TAO_PortableGroup:_make_TAO_MIOP_Resource_Factory () ""</code></p>
1933 Since DIOP and MIOP use UDP sockets (which is not a "reliable" transport unlike
1934 TCP/IP), it is easy to configure them in such a way that messages will not
1935 actually reach the servant. The options below are intended to maximize DIOP and
1936 MIOP reliability, but they must be used with care; users of DIOP and MIOP must
1937 understand that large messages are sent in fragments and they have to be
1938 reassembled by the server in their entirety to be usable by the servant. If
1939 even a single data fragment/packet is lost, the whole message cannot be
1940 reconstructed and will be unusable. There is no way for the servant to even
1941 know it has missed such a DIOP or MIOP message, and being a one-way protocol,
1942 neither will the client be aware that the message has been lost. Fragments
1943 can be lost due to a variety of reasons:
1944 <p></p>
1945 <ul>
1946 <li>
1947 The client sends too large a message fragment, or sends messages too fast,
1948 overwhelming the client socket's transmission buffer. (In which case the
1949 client-side (sender) OS simply ignores the excess send requests and some of the
1950 fragments are not actually sent on the wire.)
1951 <li>
1952 The server socket's receive buffer became too full to acquire the fragments off
1953 the wire. (In this case the client is again sending messages too fast, but this
1954 time it is the servant that is too slow to process the messages it has already
1955 received.)
1956 <li>
1957 Something happend to the network or routing and the packet was lost between the
1958 client and the server, or the server OS failed to react to the hardware network
1959 device in a timely manor so that network packets were lost.</li></ul>
1960 <p></p>
1961 <p style="Z-INDEX: 0">In the first two cases above, the loss can be mitigated by
1962 the client adapting/throttling its sending rate so as to not overflow the
1963 capacity of the client's operating system sending buffer and the receiving
1964 buffer of the server socket. If there are multiple clients all sending to the
1965 same server, all of these clients must be configured to slow down their sending
1966 rate (as a software system design descision) as otherwise the server's receive
1967 buffer will become swamped and some messages will be lost.</p>
1968 <blockquote>
1970 <table border="2" cellpadding="0" cellspacing="2" ID="Table1">
1971 <tbody>
1972 <tr>
1973 <th>
1974 Option</th>
1975 <th>
1976 Description</th>
1977 </tr>
1978 <tr>
1979 <td ALIGN="left"><code>&#8209;ORBEagerDequeueing</code> <em>0 | 1</em></td>
1980 <td ALIGN="left">This is a server-side (listener) option that is enabled by default;
1981 although this default can be overriden when the TAO libraries are built in the <CODE>
1982 ace/config.h</CODE>, by specifying the new default such as <CODE>#define&nbsp;TAO_DEFAULT_MIOP_EAGER_DEQUEUEING&nbsp;false</CODE>
1983 which in this case would turn this off by default, unless specified in the
1984 service file. If disabled (0) each thread servicing the MIOP listener will only
1985 dequeue enough MIOP message fragments from the socket receive buffer to
1986 complete a single full MIOP message which it will then process. This action
1987 reduces the amount of user memory consumed by the server process, but it also
1988 increases the likelihood of the OS sockets receive buffer overflowing (as
1989 whilst processing each message, the thread cannot dequeue other incomming
1990 message fragments). If enabled (1) it specifies that each server thread will
1991 attempt to dequeue all available MIOP messages from the receiver's socket and
1992 queue these up in a user memory FIFO queue, before attempting to process a
1993 single MIOP message from the head of this FIFO queue. This action attempts to
1994 speed up the dequeueing of MIOP messages from the OS socket receive buffer
1995 (with a corresponding increase in the amount of user memory consumed by the
1996 server process) so as to limit the number of MIOP messages that the server may
1997 miss due to the OS sockets receive buffer becoming full.
1998 </td>
1999 </tr>
2000 <tr>
2001 <td ALIGN="left"><code>&#8209;ORBMaxFragmentRate</code> <em>microseconds</em></td>
2002 <td ALIGN="left">
2003 <P>This client-side (sender) option (if enabled, see <code>&#8209;ORBSendThrottling</code> below)
2004 specifies a non-zero, positive amount of time (in
2005 uSec, i.e. microseconds) that it takes to transmit and process an individual
2006 message fragment of the maximum size; see the <code>&#8209;ORBMaxFragmentSize</code>
2007 option above. (This is the total of the
2008 client&#8209;&gt;server&#8209;&gt;servant processing time not just the average
2009 network transmission delay.) The client attempts to keep the rate at which it
2010 sends messages down to this speed by purposly delaying sending message
2011 fragments, if it would exceeding this capacity (but also see the <code>&#8209;ORBSendHighWaterMark</code>
2012 option below). The default is same value as specified, or is defaulted by, the <code>
2013 &#8209;ORBMaxFragmentSize</code> option above, but this time teated as
2014 microseconds not bytes. (This default delay value is approximatly the time
2015 required to transmit that number of bytes on a 10Base&#8209;T network.) Larger
2016 values will throttle back the clients transmittion rate, smaller values will
2017 speed it up; but note this value is used with the <code>&#8209;ORBMaxFragmentSize</code>
2018 option above&nbsp;to&nbsp;specify a working ratio&nbsp;so this value may need
2019 to be altered if the size is changed.
2020 </P>
2021 </td>
2022 </tr>
2023 <tr>
2024 <td ALIGN="left"><code>&#8209;ORBMaxFragments</code> <em>limit</em></td>
2025 <td ALIGN="left">This is a client-side (sender) option used to limit the maximum number of
2026 fragments that a client can break the outgoing message up into. The limit must
2027 be a positive number or zero (indicating an unlimited number). The default is
2028 normally <em>0 (i.e. unlimited)</em>, but this default can be overriden when
2029 the TAO libraries are built in <code>ace/config.h</code>, by specifying the
2030 new default limit such as <code>#define&nbsp;TAO_DEFAULT_MIOP_MAX_FRAGMENTS&nbsp;1</code>
2031 which in this case would turn off fragmentation by default (as only a single
2032 fragment would be allowed), unless a new limit is specified in the service
2033 file. Any messages that are too large and require more fragments than allowed
2034 by this setting are simply not transmitted by the client (the message is
2035 effectly lost without any error indication, other than possibly a debug
2036 message). This setting can be used as a safety setting to stop swamping the
2037 network and servants with abnormally large messages, or during testing to
2038 "lose" large messages for whatever reason.
2039 </td>
2040 </tr>
2041 <tr>
2042 <td ALIGN="left"><code>&#8209;ORBFragmentsCleanupStrategy</code> <em>DELAY | NUMBER
2043 | MEMORY</em></td>
2044 <td ALIGN="left">This option is used on the server to specify the incomplete
2045 fragments cleanup strategy. The default is <em>DELAY</em>, indicating that the
2046 fragments that cannot be reassembled after a certain delay should be removed
2047 from the waiting queue (i.e. considered lost messages). The other options are <em>
2048 NUMBER</em> and <em>MEMORY</em>, which respectively mean the number of
2049 messages in the waiting queue will be limited, or the whole memory comsumed by
2050 the incomplete messages in the waiting queue will be limited.
2051 </td>
2052 </tr>
2053 <tr>
2054 <td ALIGN="left"><code>&#8209;ORBFragmentsCleanupBound</code> <em>limit</em></td>
2055 <td ALIGN="left">This option specifies the numerical limit for the server's <code>&#8209;ORBFragmentsCleanupStrategy</code>
2056 option. If the strategy is <em>DELAY</em>, the value indicates the delay in
2057 milliseconds (defaulting to 1000 milliseconds i.e. 1 second). If the strategy
2058 is <em>NUMBER</em>, the limit indicates the number of non-reassembled messages
2059 in the queue (defaulting to 5 messages). If the strategy is <em>MEMORY</em>,
2060 the limit indicates the number of bytes reserved for the whole queue (with the
2061 default being 3000000 bytes).
2062 </td>
2063 </tr>
2064 <tr>
2065 <td ALIGN="left"><code>&#8209;ORBMaxFragmentSize</code> <em>bytes</em></td>
2066 <td ALIGN="left">Another client-side (sender) option used to limit the number of bytes in
2067 each individual MIOP fragment, which must be between <em>272</em> and <em><code>ACE_MAX_UDP_PACKET_SIZE</code>
2068 (normally 65507)</em> bytes inclusive. Smaller values increase (and larger
2069 values decrease) the number of fragments required to send the actual payload
2070 data. Each fragment requires the overhead of a new MIOP header (32 bytes)
2071 prefixing the actual data being sent, with the header reducing the actual
2072 usable payload data inside each fragment. Roughly this value can be considered
2073 as the MTU (Maximum Transmission Unit) set for the specific connection. The
2074 default takes the same value as the <code>ACE_MAX_UDP_PACKET_SIZE</code> for
2075 the system, but this can be overridden in the <code>ace/config.h</code> by
2076 giving a new value for <code>#define&nbsp;TAO_DEFAULT_MIOP_FRAGMENT_SIZE&nbsp;65507</code>
2077 when the TAO libraries are built. <b>Note: most gateways and routing networks
2078 define an MTU of around <em>1458-1500</em>; it is therefore advisable to
2079 specify the correct <code>&#8209;ORBMaxFragmentSize</code> value otherwise some
2080 fragments may be lost.</b> See also the <code>&#8209;ORBSndSock</code> option
2081 below. Note also if this value is changed (during development) and the <code>&#8209;ORBMaxFragmentRate</code>
2082 option below is also specified, you should change that value by the same
2083 factor, otherwise the speed of transmission will be effected as these two
2084 options specify a working ratio.
2085 </td>
2086 </tr>
2087 <tr>
2088 <td ALIGN="left"><code>&#8209;ORBRcvSock</code> <em>bytes</em></td>
2089 <td ALIGN="left">This server-side (listener) option is the size of the incoming socket's
2090 message buffer, i.e., how much data can be received directly off the wire by the
2091 server and queued for processing by the servant whilst it is busy. If specified
2092 in the service configuration file, this value will override (for MIOP only) the
2093 value specified by the corresponding ORB_init parameter. If NOT specified in
2094 either place, the default value for the system itself will be used. Again for a
2095 Linux type OS, the systems RcvSock is usually about <b>65535</b> bytes, but
2096 whatever value is actually specified it is normally doubled internally to take
2097 account of the control structures required to track the messages themselves and
2098 so it is not a hard limit. Specifying as large a value as possible (i.e.
2099 whatever upper limit the OS will allow) with the MIOP <code>&#8209;ORBRcvSock</code>
2100 option is advisable to maximize the available socket's receive buffer space, but
2101 obviously this is a trade off between available memory and other OS non-paged
2102 memory uses.
2103 </td>
2104 </tr>
2105 <tr>
2106 <td ALIGN="left"><code>&#8209;ORBSendHighWaterMark</code> <em>bytes</em></td>
2107 <td ALIGN="left">This client-side (sender) option (if enabled, see <code>&#8209;ORBSendThrottling</code> below)
2108 is the usable size of the message
2109 buffer, i.e how much data can be sent without introducing delays into the
2110 transmition of individual MIOP fragments (due to the <code>&#8209;ORBMaxFragmentRate</code>
2111 option above). <b>Its default value is the size of the buffer maintained by the
2112 Operating System for the sending socket at the client side (see the <code>&#8209;ORBSndSock</code>
2113 option below) and although it should ideally be based on the server's receive
2114 socket buffer size, that information is not available to the client, and the
2115 two values normally default to the same size anyway.</b> If in doubt specify
2116 this value and&nbsp;set it to a smaller value than the full size of the servers <CODE>
2117 &#8209;ORBRcvSock</CODE> option&nbsp;(especially if multiple clients are all
2118 broadcasting to the same server, when each client should only use a fraction of
2119 the full buffer size based upon the number of clients actually in use).
2120 </td>
2121 </tr>
2122 <tr>
2123 <td ALIGN="left"><code>&#8209;ORBSendThrottling</code> <em>0 | 1</em></td>
2124 <td ALIGN="left">This is a client-side (sender) option that is enabled by default;
2125 although this default can be overriden when the TAO libraries are built in the <CODE>
2126 ace/config.h</CODE>, by specifying the new default such as <CODE>#define&nbsp;TAO_DEFAULT_MIOP_SEND_THROTTLING&nbsp;false</CODE>
2127 which in this case would turn off throttling by default, unless specified in
2128 the service file. If disabled (0) the client will always attempt to transmit
2129 all MIOP message fragments without any delay. If enabled (1) the client will
2130 attempt to automatically restrict the speed of sending individual MIOP messages
2131 to maintain an average of <code>&#8209;ORBMaxFragmentSize</code> bytes per <code>&#8209;ORBMaxFragmentRate</code>
2132 microseconds once the threshold of <code>&#8209;ORBSendHighWaterMark</code> bytes
2133 of data are currently being transmitted or are in progress via each individual transport
2134 (i.e. each individual client-side (sender) connection to the server).
2135 </td>
2136 </tr>
2137 <tr>
2138 <td ALIGN="left"><code>&#8209;ORBSndSock</code> <em>bytes</em></td>
2139 <td ALIGN="left">This client-side (sender) option is the size of the outgoing socket's
2140 message buffer. If specified in the service configuration file, this value will
2141 override (for MIOP only) the value specified by the corresponding ORB_init
2142 parameter. If NOT specified in either place, the default value for the system
2143 itself will be used. NOTE: the <code>&#8209;ORBSndSock</code> size normally
2144 limits the maximum size of an individual message fragment, larger fragments can
2145 be simply ignored (i.e. packet loss) by the client's socket without any error
2146 indication; this value and the <code>&#8209;ORBMaxFragmentSize</code> should be
2147 set with care. For a Linux type OS, the system's SndSock is usually defaulted to
2148 about <b>65535</b> bytes, but whatever value is actually specified it is
2149 normally doubled internally to take account of the control structures required
2150 to track the messages themselves and so it is not a hard limit.
2151 </td>
2152 </tr>
2153 </tbody>
2154 </table>
2155 </p>
2156 </blockquote>
2157 <h4><a name="TTSM">6. Time_Policy_Manager</a></h4>
2158 The TIME_POLICY manager controls the actual TIME_POLICY strategy used for
2159 ORB timers and countdowns. TAO provides a default strategy manager called
2160 <code>Time_Policy_Manager</code>.
2161 <p>Typically, the following options is set via the service
2162 configurator
2163 (<code>svc.conf</code>) file. The following line in the
2164 <code>svc.conf</code> file (all in one line)</p>
2165 <p><code>static
2166 Time_Policy_Manager "[option]"</code></p>
2167 <p> would load the option listed within "".
2168 An <a href="../tests/Time_Policy/hr_time.conf">example</a>
2169 is available that shows how to specify this option in the <code>svc.conf</code>
2170 file.</p>
2171 <p></p>
2172 <blockquote>
2174 <table border="2" cellpadding="0" cellspacing="2">
2175 <tbody>
2176 <tr>
2177 <th>Option</th>
2178 <th>Description</th>
2179 </tr>
2180 <tr>
2181 <td><code>-ORBTimePolicyStrategy</code> <em>strategy</em></td>
2182 <td><p><a name="-ORBTimePolicyStrategy"></a>The <em>strategy</em> argument
2183 defines the TIME_POLICY strategy to load. TAO provides two
2184 standard TIME_POLICY strategies:</p>
2185 <p><em>OS</em> denotes the system time policy strategy which uses the systems
2186 equivalent of <code>gettimeofday</code> to return a current time value. This is the default for
2187 TAO (unless <code>TAO_USE_HR_TIME_POLICY_STRATEGY</code> has been defined).</p>
2188 <p><em>HR</em> denotes the highres time policy strategy which uses the systems
2189 equivalent of a <code>MONOTONIC</code> timer source to return a current time value (when
2190 <code>TAO_USE_HR_TIME_POLICY_STRATEGY</code> has been defined this becomes the default for TAO).</p>
2191 <p>Any other value is assumed to denote the exact name of a dynamically loadable
2192 TIME_POLICY strategy. The <a href="../tests/Time_Policy_Custom">Time_Policy_Custom</a>
2193 test provides an example of this functionality.</p>
2194 </td>
2195 </tr>
2196 </tbody>
2197 </table>
2198 </p>
2199 </blockquote>
2200 <hr>
2201 <p>Back to the TAO <a href="components.html">component options and tuning documentation</a>.<!--#include virtual="/~schmidt/cgi-sig.html" -->
2202 </body>
2203 </html>