summaryrefslogtreecommitdiff
path: root/apps/Gateway/Gateway/README
blob: 4e986354aaa66f129c6af316860e90ec8da0141b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
This application illustrates an application-level Gateway which routes
messages between Consumer and Suppliers in a distributed environment.

The default configuration is single-threaded, i.e., all
Supplier_Handlers and Consumer_Handlers are multiplexed via the ACE
Reactor within a single thread of control.  To obtain a version that
multi-threads both Consumer_Handlers and Supplier_Handlers simply set
the following flag in the Makefile:

DEFFLAGS += -DUSE_OUTPUT_MT -DUSE_INPUT_MT

To get a version that uses single-threading for all Supplier_Handlers,
but a separate thread per-Consumer_Handler set the following flag in
the Makefile:

DEFFLAGS += -DUSE_OUTPUT_MT 

If you examine the source code, you'll see that very few changes are
required in the source code to switch between single-threading and
multi-threading.  The ACE Task class is primarily responsible for
enabling the flexible modification of concurrency strategies with only
minor changes required to the source code, design, and system
architecture.