$Id: README 94654 2011-10-07 09:17:20Z msmit $

Real-Time Event Service


File: DevGuideExamples/EventServices/RTEC_Federated/README


This directory contains an example that shows how to create and
federate real-time event channels.

-------------------------------------------------------------------------

Note: To test this, you must first run the Naming Service, e.g.:

  $TAO_ROOT/orbsvcs/Naming_Service/Naming_Service -o ns.ior&

After running the naming service, start a couple of suppliers:

  ./EchoEventSupplier -ORBInitRef NameService=file://ns.ior -ORBSvcConf supplier.conf -ecname name1 -gateway name2
  ./EchoEventSupplier -ORBInitRef NameService=file://ns.ior -ORBSvcConf supplier.conf -ecname name2 -gateway name1

Now start some consumers:

  ./EchoEventConsumer -ORBInitRef NameService=file://ns.ior -ecname name1
  ./EchoEventConsumer -ORBInitRef NameService=file://ns.ior -ecname name2

It may be easiest to start these in separate windows.  You should
see events from both suppliers on both event channels.

-------------------------------------------------------------------------

EchoEventSupplerMain.cpp

  Main program for a PushSupplier.

    EchoEventSupplier -ORBInitRef NameService=file://ns.ior -ORBSvcConf supplier.conf -ecname <name> -gateway <rname> -iorfile <file>

  This will create a local RTEC event channel and bind it under
  the root context of the naming service with the name <name>.
  It will also create a gateway that links from the remote event
  channel bound under <rname> to the locally created event channel.
  After initializing the local event channel, it will idle until
  it locates the remote event channel, initialize the gateway,
  and then publish an event to the local event channel every 10
  milliseconds.  This event will contain the string <name> in the
  any_value field. When the gateway is initialized, you'll see a
  message stating "Gateway initialized".  If you pass the -iorfile
  parameter, this server also writes the EC's IOR to <file> when
  the gateway is initialized.

  Use Control-C to kill the process.

-------------------------------------------------------------------------

EchoEventConsumerMain.cpp

  Main program for a PushConsumer.

  To run it:

    EchoEventConsumer -ORBInitRef NameService=file://ns.ior -ecname <name>

  This will look for an event channel bound to <name> in the Root context
  of the Naming Service.  It will consume events from this channel and
  print the type, source, and string contents contained in any_value.

  Use Control-C to kill the process.

-------------------------------------------------------------------------

EchoEventConsumer_i.{h,cpp}

  Call which implements the RtecEventComm::PushConsumer interface.


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



