Quoter example README
To download the source codes of this example please refer to the SVN
component would be monitoring a real-time stock database. When the
values of particular stocks change, it pushes a CCM eventtype
that contains the stock's name via a CCM event source to the
event sink implemented by one or
more StockBroker components. If these components are interested
in the stock they can obtain more information about it by invoking a
request/response operation via their CCM receptacle on a CCM facet
exported by the StockDistributor component. The diagram of this
example is shown in fig 1.
The files you will find
The interfaces, data types and exceptions shared by the components
application are specified in the
from Stock_Base.idl is linked to all the components of this example.
mpc files for each of the components are available in the
directories. We use the MPC
generate makefiles and Visual C++ project/solutions files for all ACE, TAO and CIAO
idl and cidl files for each component are placed in
are the actual
implementation of the components.
Navigate to the directory
$ACE_ROOT/bin/mwc.pl -type gnuace (use different -type option
if you are using a
compiler/IDE other than GNU make)
For example, use
%ACE_ROOT%/bin/mwc.pl -type vc71 if you
Visual C++ 7.1 IDE.
Then build/make the generated project/make files. Correct errors in the
source codes if necessary.
Now we can step forward to build the assembly.
In the descriptor subdirectory, you'll find a XML descriptor file
describes your deployment plan, the
flattened_deploymentplan.cdp. This file declaratively specifies how the
component assembly is
Specifically, it defines the component types, component instances,
connections and implementation artifact descriptions.
Please make sure that the Modified_Deployment.xsd and XMI.xsd
are in the Display/descriptors directory. The former file could be
found in $CIAO_ROOT/docs/schema
Note: Creating the deployment plan descriptor is a tedious and
you can download CoSMIC
assist you in this step. Please refer to this tutorial
to see how you can use CoSMIC to automatically generate the descriptor
Running the program
>From different shells in
- Start NodeManagers (NodeDameon) by running runNodeDaemon.pl
- Start the execution manager
$CIAO_ROOT/DAnCE/ExecutionManager/Execution_Manager -o ior -i
The Stock.dat file describes the deployment daemons CIAO's
will contact to instantiate ComponentServer's, home's, and component
Each line specify the name of a installation "destination" and the
corresponding corbaloc IOR for the CIAO_Daemon.
- NOTE: As one can see, we use the "Stock.dat" file to
instruct the Execution_Manager how to find the endpoint of each
individual NodeManager (i.e., Node Daemon) where component(s) will be
deployed, so this is non-standard. We plan to use Naming Service to do
this in the future.
- Start the plan_launcher by running
flattened_deploymentplan.cdp -k file://ior
- By now the components should be successfully deployed. You may
run the driver program to start the application. Open a new shell, keep
in the /Quoter/descriptors directory, and try the following
commands, see what happens in the component server
Start the distributor
service at a frequency of 3 hertz:
Use the broker program to
subscribe to MSFT stock
../Broker/Broker.exe -s MSFT
Subscribe to IBM stock
../Broker/Broker.exe -s IBM
Unsubscribe to MSFT stock
../Broker/Broker -u MSFT
Turn off the distribution
Please contact [email protected] if you have any questions.