Simple CIAO tutorial

Note:

Example Description

This Hello example is contructed in the following ways:

Step-By-Step

Hello_Base


For Every Components

  1. Use:

    $CIAO_ROOT/bin/generate_component_mpc.pl -p Hello_Base Sender
    $$CIAO_ROOT/bin/generate_component_mpc.pl -p Hello_Base Receiver

    Note:

  2. Use the export script to generate the export files. (3 files per component).
  3. Write an idl file for every compoent. Here you can put the component specific IDL definitions in this file. In this example we have a interface trigger specific to the Sender. Please note that the Sender component "supports" (IDL keyword) this interface.
  4. Write the CIDL file for every component.
  5. Write _exec.h and _exec.cpp files which actually implement the component.
Writing all those files could be troublesome to a new CCM user. The best way of learning this is to read the example source code. If you are familliar with CORBA programming, it should not take too much time before you can declare yourself as a CCM programmer.


The Entry Point

After both components are implemented we still need a small program to initialize the process. In Sender.idl there is a Sender specific interface with a single method in it created for this purpose. Hence there is a CORBA client application called starter. The starter will make a invocation on a supported interface called trigger on the Sender component to get the whole distributed application started. The starter will first the Sender component object reference through the ior string. Please see the the last part of Hello/Sender/Sender.mpc file for details.


Make


Assemble

Now we can step forward to build the assembly. Here we are going to build the simplest case only, which is 1 Receiver and 1 Sender. If you are interested in CIAO you could try 1 Sender with multiple Receiver. However, you need to change the Sender.idl to make it publishes timeout event instead of emits event.
  1. Make a new directory with name descriptors in your workspace
  2. Construct the CIAO_Installation_Data.ini file. You can use uuidgen to generate the UUIDs
  3. For every component generate the .csd and .ssd files. Follow the example carefully and make sure that you use the right UUIDs
  4. Write the .cad file which describes the assembly. You can choose to use CADML to generate the file.

    Note: Please pay attention to the inter-relationship among different files, especially the relationship between the .cad file and idl file.


Run

Finally you are ready to test the application you have made.

1. Run the example with a single CIAO_Daemon 2. Run the example with 2 CIAO_Daemons but on the same machine. 3. Run the example with 2 CIAO_Daemons on two different hosts. 4. Run the example with 2 receivers deployed on the same ComponentServer.
Email: ciao-users@cse.wustl.edu