summaryrefslogtreecommitdiff
path: root/TAO/DevGuideExamples/AMH_AMI/README
blob: 572ec7ec4d6052ed307de52db693e15fee6076e1 (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
$Id$

File: DevGuideExamples/AMH_AMI/README

The example in this directory demonstrates how AMH can be coupled with
AMI to create very efficient and scalable middle components for
multi-tier applications. In this case, a client connects to a middle
server which in turn is connected to an inner server. the client
submits a question to the middle server, which forwards the question
on to the inner server. The inner server then waits a few seconds, to
simulate a busy process, then replies. The reply is handled
asynchronously by the middle server, using AMI, then forwarded to the
original client using AMH. Neither the client nor the inner server are
aware of the asynchronous nature of the middle server.

The inner server has a single startup option, -crash. When supplied,
the server will induce an exception when invoked, rather than
returning the answer.

The middle server also has a single option, -no_AMH. When run in this
mode, the IOR it publishes will refer to an object that does not use
AMH and AMI. This allows you to compare the behavior and source code
for these two modes of operation.

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

Start the inner server (writes inner.ior) :
------------------
./inner_server [-crash]


Then start the middle server (writes middle.ior):
------------------
./middle_server [-no_AMH]

Finally, run the client:
------------------
./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


NOTE:

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

   perl ../run_test.pl