summaryrefslogtreecommitdiff
path: root/TAO/performance-tests/Cubit/TAO/IDL_Cubit/README
blob: ca173cc45abcfed1a25d83466e01a0902b908ab2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
// $Id$

This example uses the TAO IDL compiler to generate the SII stubs and
skeletons.  You can either run the server in the background in the
same window as the client or open a separate window for the client and
server.

By default, the client and server use the Naming Service.  The cubit
server has its own NamingServer implementation.  Therefore, you don't
have to start the NamingService before starting the client and server.
Likewise, you can use the -s flags on both the server and client if
you don't want to use the naming service.

The collocation_test demonstrates how the performance improves when
objects are collocated.  The test runs both server and client in
different threads.  To run it, simply run collocation_test.  It
accepts any command line arguments for the client side, but there is
not way to specify command line arguments for the server side at this
moment.  This may be changed in the future.  At this moment, the
collocation_test must use Naming_Service to resolve object
references.  This may be changed later, also.

server:
-------

% server [-d] [-s] [-ORBhost <serverhost>] [-ORBport <portnum>]
           [-n <number-of-cubit-objects>] [-o <ior_output_file>]

Options:
-------
-s       Tells the server not to register the Cubit_Factory object
         with the Naming Service.

-d       Debug flag (It is additive more -d flags will increase
         the debugging level).

-o       Outputs the cubit_factory IOR to a file.

-n       Number of cubit objects exported by the server.

The server cubit factory maintains num_of_cubit objects (default =
1). They are assigned keys that look like "key0", "key1", ...

When the server is started and you have used the -d flag, you should
see as the first line of output something that looks like the follow:

        iiop:1.0//swarm:10015/Persistent/886013035/850128/RootPOA/RootPOA_is_BAD/factory
        (-ORBobjrefstyle url)
or
        IOR:000000000000001649444c3a43756269745...
        (-ORBobjrefstyle ior)

Using -d turns on debugging messages.  It is additive, i.e., the more
-d options provided, the more debugging you get.  At the moment, only
2 levels of debugging are implemented, and more than 2 -d options are
silently ignored.

client:
-------

% client [-d] [-s] [-x] <-f cubit_factory_ior_file> <-k cubit_factory_ior>  -n <iterations>

Options:
-------
-d      Debug flag
-s      Don't Use the Naming Service
-x      Tells the server to shutdown.
-f      Reads the cubit factory IOR from the file
-k      Reads the cubit factory IOR from commandline
-n      no. of iterations

The following are the three ways of giving the CubitFactory IOR to the
client:

        1. From a file using the -f option. (This file can be produced using
                the -o option of the server.)

        2. Directly on the commandline using the -k option.

        3. Get it from the Naming Service (which is the default client
           behavior).

collocation_test:
-----------------

        This test demonstrates how collocation optimization improve
performance of collocated objects.  Run the test without any argument
to see results with collocation optimization.  Run it with
<-ORBcollocation no> to perform the same test without the optimization.

run_test.pl:
------------

        This is a perl script which simplifies the execution of the
test.

run_test [-h] [-n num] [-mcast] [-sleeptime t] [-debug] [-release]

-h                  -- prints this information
-n num              -- client uses <num> iterations
-mcast              -- uses the multicast version of the nameservice
-sleeptime t        -- run_test should sleep for <t> seconds between running
                       the server and client
-debug              -- sets the debug flag for both client and server
-release            -- runs the Release version of the test (for NT use)
                       (default is 3 seconds)

Sample Run-Using files to communicate IOR:
------------------------------------------

1. Start the server.

% server -s -ORBport 20000 -ORBobjrefstyle url -o theior

        IDL_Cubit:SERVER

The IOR is: <iiop:1.0//tango:20000/Persistent/887665222/647179/RootPOA/RootPOA_is_BAD/factory\00\00>

2. Start the client.

%client -s -ORBport 19998 -f theior

         IDL_Cubit: client

Factory received OK
.
.
.

Sample Run-Using Naming Service:
--------------------------------
1. Start the server
        %server -ORBport 19999

2. Start the client
        %client -ORBport 19998
                if you don't want the server to shutdown.
        %client -ORBport 19998  -x
                if you want to shutdown the server after this request.

3. If Multicast is not supported the naming service can be reached by
the  following 2 methods.

        a) use the -ORBnameserviceior flag to the client to give the
        naming service ior outputted by the server.

        b)set the ENVIRONMENT variable "NameService"

        This might be helpful if more than one person is running the
        Naming service in which case Multicast might cause confusion with some
        other Naming Service trying to answer your call.

Using JAVA to access the IDL Cubit test:
----------------------------------------

install JDK1.2
install Java to IDL compiler

copy the following files:
cp $TAO_ROOT/orbsvcs/orbsvcs/CosNaming.idl .
cp $TAO_ROOT/orbsvcs/tests/Simulator/DOVEBrowser/NS_Resolve.java .

Compile:
javatoidl cubit.idl
javatoidl CosNaming.idl
javac *.java

Run:
java IDL_Cubit_Client