5 This directory contains source code for a prototype CORBA-based
6 distributed notification mechanism. This mechanism implements a
7 "publish/subscribe" communication protocol. It allows Suppliers to
8 pass messages containing object references to a dynamically managed
9 group of Consumers. This is similar to the OMG COS Events Service,
10 though not as sophisticated. For more examples on the COS Events
11 Service check out $TAO_ROOT/orbsvcs/orbsvcs/.
15 There are 3 executables:
19 -- The Notifier supplies events from Suppliers to Consumers
20 It which must be started first.
21 It has an instance of an IDL Notifier
22 object. This object accepts subscriptions from Consumers
23 and forwards events sent to it either via Consumers or
25 The Notifier object is registered with a naming service
26 so that it can be located by other objects.
27 To run the Notifier, type:
30 To exit the Notifier press CTRL-C.
31 All consumers registered with the Notifier will shutdown.
32 Suppliers should however, be shutdown beforehand.
34 On startup the Supplier gets hold of the Notifier object from
35 the naming service and registers itself with it.
36 The Supplier accepts strings from the user and sends them to
38 To run the supplier type:
41 To exit the supplier type CTRL-C or type "quit".
42 To send strings to the Consumers, type the string on the prompt
46 It has an instance of an IDL Consumer object.
47 This object is used to receive notifications from the
49 When the Consumer starts up, it gets an object reference to
51 It then subscribes its Consumer object with
52 the Notifier by passing an object reference.
54 In addition to passing an object reference to a
55 Notifier, the Consumer also may specify a
56 filtering criteria, which is a regular expression. If
57 the filtering criteria is the string "" then the Notifier
58 will send all Notifications to the Consumer (i.e., "" is
59 treated as a "wildcard"). Otherwise, the filtering
60 criteria is considered to be a regular expression,
61 and only those Notification tags that match the regular
62 expression will be forwarded to the Consumer. The regular
63 expressions are those used by ed(1) (see the regexp(5)
64 manual page for more info).
66 To run the Consumer, type:
67 consumer <filtering_criteria>
70 will accept the following strings: ab , b, aaaab.
72 To send strings to other Consumers, type the string on the prompt
77 To run the tests do the following:
79 1. Compile everything.
81 2. Start the Notifier as described above.
83 3. Start the Supplier executable.
85 4. Start up as many copies of the Consumer as you'd like.
86 Typically, I run each one in its own window.
88 5. Once the Consumers have subscribed you can send them info by typing
89 commands in the Supplier window. These will be sent to all the
90 Consumers who have subscribed. Likewise, you can send messages
91 from a Consumer to all other Consumers by typing messages in a
94 Note that if you type "quit" or ^C in a Consumer window the
95 Consumer will unsubscribe and shutdown its handlers and exit.
96 Likewise, if you type ^C in the Notifier window
97 the Notifier will disconnect all of its Consumers and exit.
99 6. When you want to terminate a Consumer or a Supplier, just type ^C
100 or "quit" and the process will shut down gracefully.