summaryrefslogtreecommitdiff
path: root/TAO/performance-tests/Cubit/TAO/IDL_Cubit/README
blob: cd3c6535bd50af78edd3ff1908fc2090fa914e97 (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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
// $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.

The collocation_test demonstrates how the performance improves when
objects are collocated.  The test runs both server and client in
different threads.

NOTES: The IDL_Cubit server used to run a Naming Service so the client
        could easily locate it.  This proved too problematic, the test
        required a complete compilation of the orbsvcs library and was
        not reliable.  The preferred method is to use a file to pass
        the factory IOR between the server and the client.

server:
=======

% server [-ORBEndpoint <endpoint>]
         [-d] [-f <ior_output_file>]

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

-f       Outputs the cubit_factory IOR to a file.

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 [client options]

IDL_Cubit Client Options:
-------------------------
-d      Debug flag
-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
-t      Enable a test   (see below for a list of valid tests)
-z      Disable a test  (see below for a list of valid tests)
-b      Set the number of bytes to be used in the octet sequence test.
        Currently, this flag only works if the "small_octet_seq" test
        is enabled (by default or by using the -t option).

Valid IDL_Cubit test arguments are:

        void
        octet
        short
        long
        struct
        union
        small_octet_seq
        small_long_seq
        small_struct_seq
        large_octet_seq
        large_long_seq
        large_struct_seq
        mixin
        rti_data
        one_way
	any
	any_struct

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 -f option of the server.)

        2. Directly on the command line 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 as:

  collocation_test [-c "client side auguments"] [-s "server side arguments"]

You can specify any command line options understood by server and
client in server-side and client-side options string.  The easiest way
to run the test is:

  collocation_test

This will start testing the "thru_poa" collocation strategy.  Notice
that the ior filenames passed to both server side and client side must
match.  To test the "direct" collocation strategy, run the test as:

  collocation_test -s "-ORBCollocationStrategy direct"

To disable collocation optimization run the test as:

  collocation_test -s "-ORBCollocation no"

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 (default is 3 seconds)
-debug              -- sets the debug flag for both client and server
-release            -- runs the Release version of the test (for NT use)


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

1. Start the server.

% server -ORBEndpoint iiop://tango:20000 -ORBObjRefStyle URL -f 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 -f theior

         IDL_Cubit: client

Factory received OK
.
.
.


Sample Run, passing the IOR on the command line, on VxWorks:
------------------------------------------------------------
    -> ld < server
    -> spa server, "-ORBObjRefStyle", "URL"
            IDL_Cubit: server

    The IOR is: <iiop://1.0@samba:1028/U/child_poa/factory>

    -> ld < client
    -> spa client, "-k", "iiop://1.0@samba:1028/U/child_poa/factory"
    Enter <number> to select, anything else to stop: 2

The IOR provided to the client is the IOR that the server printed out.
Be sure to replace the <> with "".


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


Running IDL_Cubit on CHORUS:
--------------------------

1.You should make sure that you set the HOST environment variable on the
Chorus VME Board to the IP address of that Board before you run
MT_Cubit test.

e.g.,
$rsh tambora1 setenv HOST 128.252.165.82

2. You should make sure that the path to IOR file has write permission
for ALL.

server:
------
$rsh host_name arun path_to_server -f path_to_ior_file -ORBDottedDecimalAddresses 1 <server_options>

You DONT have to use -ORBdotteddecimaladdresses 1 if you have
TAO_USE_DOTTED_DECIMAL_ADDRESSES defined in your config.h file.

e.g.,
$rsh tambora1 arun /IDL_Cubit/server  -f /ior
-ORBDottedDecimalAddresses 1 -ORBObjRefStyle URL

client:
-------

$rsh host_name arun path_to_client -f path_to_ior_file <client_options>

e.g.,

$rsh tambora2 arun /IDL_Cubit/client -f /ior