15 This directory contains: 1) definition and implementation of a simple
16 CORBA Load Balancing Service and 2) client and server illustrating the
25 Load Balancing Service interface and its
28 Load_Balancing_Service.h
29 Load_Balancing_Service.cpp:
30 Load Balancing Service driver.
35 Interface and implementation of a simple CORBA
36 object used in the client-server example.
40 Client and server example, illustrating the use of the
41 Load Balancing Service.
46 For interface and detailed description see Load_Balancer.idl. Two
47 load balancing protocols are supported: random and round-robin.
48 Servers register their objects with either random or round robin
49 object groups, and clients request object references from those groups.
51 This is a very basic approach to load balancing: there is no feedback
52 mechanism to allow registered servers to notify Load Balancing service of
53 how busy they are. Also, the use of the service is not transparent to
56 The service can be used in different ways. Depending
57 on the system and its characteristics, it might make more sense for a
58 client to either 1) obtain a new object reference from the Load
59 Balancing service for each invocation or 2) obtain new references from
60 the Load Balancing service at certain intervals, measured in time or
61 number calls or 3) use the Load Balancing service just once, to obtain
62 the initial object reference.
66 - Persistent version of this Load Balancing Service can be found
67 in TAO/examples/Load_Balancing_persistent.
69 - TAO's Load Balancing Service (definition, implementation and
70 tests are located in TAO/orbsvcs tree) This is a more
71 sophisticated Load Balancing implementation, which is
72 distributed as one of TAO's Object Services.
77 Simple client and server are provided to illustrate the use of the
78 Load Balancing service (LB). The server creates two object groups in
79 the LB, one random and one round robin. It then creates the specified
80 number of <Identity> objects and registers them with the random object
81 group in LB. Same is done with the round robin group. The client
82 performs the specified number of invocation on <Identity> object,
83 contacting the specified group of LB for a new object reference before
88 run_test.pl perl script can be used to run the example, i.e., the Load
89 Balancing service, the server and the client. (The output from the
90 perl script is somewhat confusing since it is a mixture of output from
91 client, server and load balancing service.) Alternatively, the
92 example (or just the load balancing service) can be started manually.
94 First, start the Load Balancing service, specifying the file where to
95 store its ior. Then start the server, and, finally, the client, as
96 shown below. Run each executable in its own window for output readability.
97 Command-line options are described in the next section.
99 $ load_balancer -o balancer.ior
100 $ server -i file://balancer.ior
101 $ client -i file://balancer.ior
106 Load_Balancing Service:
109 increase debug output
111 output file for the <Object_Group_Factory> ior
117 increase debug output
119 ior of the <Object_Group_Factory> object
121 number of objects to create/register with the random
122 group (default value is 5)
124 number of objects to create/register with the round
125 robin group (default value is 5))
131 increase debug output
133 ior of the <Object_Group_Factory> object
135 number of times to make invocation on Identity object
138 use random group for obtaining references (as opposed
139 to the round robin group) (default value is use round robin)