Implementation Repository User's Guide

In order for a server to make use of the Implementation Repository, it must communicate with the IR to keep it up to date on such things as the server's running status. These actions are currently encapsulated in the IR_Helper class that is located in the orbsvcs library.


How is the IR used?

The main steps for the lifetime of a server that uses the IR are generally the following:

  1. Register name and startup commands with the IR using tao_ir
    Example: tao_ir -ORBImplRepoServiceIOR file://implrepo.ior add plane -c "airplane_server -i -ORBImplRepoServiceIOR file://implrepo.ior"
  2. Start the server once to generate an IR-ified IOR
  3. Start clients and pass them the above IOR
  4. Clients will use the IOR, which will automatically go through the IR
  5. The IR will start the server if it is not already running
  6. At any time when the server is not currently in use by a client, it can be shut down using tao_ir
    Example: tao_ir -ORBImplRepoServiceIOR file://implrepo.ior shutdown plane
  7. After the server isn't needed anymore, it can be removed from the IR database using tao_ir
    Example: tao_ir -ORBImplRepoServiceIOR file://implrepo.ior remove plane

So what does the server need to do?

The server will need to do the following things in order to work correctly with the IR.

  1. Create an ImplementationRepository::ServerObject
  2. Change the IOR given to clients to use the host/port of the Implementation Repository
  3. Notify the IR when the server is starting up
  4. Notify the IR when the server is shutting down

The details of how to do this can be found in the IR_Helper class, which has methods to perform these actions.


The IR_Helper class

The IR_Helper class is a class intended for use by the server to communicate with the IR. It does some of the work by keeping a reference to the IR and a ServerObject and hiding much of the work of registration in methods.

Following is the public interface for IR_Helper


To use, or not to use the IR

If you look at the two tests, they use -i flags to determine how to use the IR. The -i flag turns on the use of the Implementation Repository. This allows the server to be tested without the IR, to help track down problems..


The Future

What does the future hold for the IR? In addition to supporting the "not fully supported yet" items listed above, the functionality of IR_Helper will be moved into TAO's POA and ORB. This will help make the use of the IR in a server easier, since less changes will have to be made to the server code itself.


Last update to this document: $Date$

Back to Implementation Repository