summaryrefslogtreecommitdiff
path: root/TAO/DevGuideExamples/Multithreading/ThreadPerConnection/README
blob: 03aab46eaede0c2c045e199152db1127dae5a82e (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
$Id$

File: DevGuideExamples/Multithreading/ThreadPerConnection/README


This directory contains a CORBA example illustrating a simple client and
a server with an interface Messenger.  This example is based on the
Getting Started example, but adds concurrent request processing
capabilities to the server using the thread-per-connection concurrency
model.


How to Run
----------

To start the server :
------------------
./MessengerServer -ORBSvcConf server.conf


To start the client:
------------------
./MessengerClient


Tip:
----
Run several clients simultaneously against the server.  Each client
should establish a separate connection to the server and each client's
requests should be handled on a separate thread in the server.  To
verify this, the server returns the thread ID that handled the request
in the reply message that is printed by the client.


Exeuction via Perl Script
-------------------------

A Perl script has been created to automate the steps shown
above.  This script can be run via the following command:

./run_test.pl

Here is sample output from the Perl script:

Starting MessengerServer
IOR written to file Messenger.ior


Starting 4 MessengerClients.
Each client should get a new connection
and its own thread in the server.

Reply: Message handled on thread 992
Reply: Message handled on thread 1952
Reply: Message handled on thread 1676
Reply: Message handled on thread 1016


NOTE:

  Since the Perl script starts several clients simultaneously, output
  may become garbled since each client writes its output to stdout.


NOTE:

   If you run on Windows platform, go to Debug or Release directory to run the
   script via following command:

   perl ../run_test.pl