Implementing Quoter Components with DAnCE

We discuss this section after the PICML modeling only because we would like to focus our attention more on the modeling stage. It does not indicate that the implementation of components has to be subsequent to the work we've done under GME. They are totally orthogonal to each other. In fact, they are so orthogonal  that we won't go into details as to how DAnCE programming should be done. We'll briefly go through the functionality of each component and provides the links to their implementations respectively. For a hands on experience on DAnCE programming, please refer to $CIAO_ROOT/examples/Hello.

Broker Component
   
The Broker component waits to be notified by the Distributor component about stock changes. When a stock change event arrives,  it will go back to Distributor component and retrieve the information it interest in and output them to the console. The users are allowed to subscribe to the interested stock value through the interface supported by Broker component. Here's the complete version of Broker_exec.h and Broker_exec.cpp.

Distributor Component
  
The Distributor component monitors the real time stock database and publishes events whenever it detects stock change. In our program, we use a ACE_Task  to simulate this real-life activity. The task will run in a separate thread and periodically increment the stock value by 1. In the same time the stock value is incremented, an StockName event along with the name of the changed stock will be sent. Here's the complete version of Distributor_exec.h and Distributor_exec.cpp

Broker client
   
The Broker client program is the driver program for client to control Broker component, subscribe and unsubscribe to a specific stock. Here's the complete version of Broker.cpp

Distributor client
     The Distributor client program is the driver program for client to control Distributor component, turn on and off the distribution service, set up the frequency, etc. Here's the complete version of Distributor.cpp


Ming Xiong
Last modified: