summaryrefslogtreecommitdiff
path: root/examples/ASX/Event_Server/README
blob: f54d724e1fe3e37b6545ba271ef0a52a813d7bd3 (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
The subdirectory illustrates a number of the ACE ASX framework
features using an ACE_Stream application called the Event Server.  For
more information on the design and use of the ACE ASX framework please
see http://www.cs.wustl.edu/~schmidt/C++-USENIX-94.ps.gz and
http://www.cs.wustl.edu/~schmidt/DSEJ-94.ps.gz

The Event Server example works as follows:

1. When the ./Event_Server/event_server executable is run it
   creates two SOCK_Acceptors, which listen for and accept incoming
   connections from Consumers and Suppliers.

2. The ./Event_Server/Transceiver/transceiver application plays
   the role of either a Consumer or a Supplier (but with the current
   implementation it can only play one role at a time).  The
   transceiver process can be started multiple times.  Each call
   should be either:

   # Consumer
   % transceiver -p 10002 -h hostname -C

   or 

   # Supplier
   % transceiver -p 10003 -h hostname -S

   where 10002 and 10003 are the default Consumer listening port and
   the Supplier listening port, respectively, on the event server,
   "hostname" is the name of the machine the event_server is running,
   and -C and -S indicate that the transceiver plays the role of a
   Consumer or Supplier, respectively.  I typically run the
   Consumer(s) and Supplier(s) in different windows to make it easier
   to understand the output.

3. Once the Consumer(s) and Supplier(s) are connected, you can 
   type data from any Supplier window.  This data will be routed
   through the Modules/Tasks in the event_server's Stream and be
   forwarded to the Consumer(s).

   Since the transceivers are full-duplex you can also send messages
   from the Consumer(s) to Supplier(s), but the Event Server will warn
   you about this since it's not really kosher to have Consumers
   sending to Suppliers ;-)

4. When you want to shut down the tranceivers or event server
   just type ^C (which generates a SIGINT) or type any input in the
   window running the Event Server.

What makes this example particularly interesting is that once you've
got the hang of the ASX Streams architecture, you can "push" new
filtering Modules onto the event_server Stream and modify the
application's behavior transparently.