Specification of DCP: ===================== The Distributed Configuration Protocol v1.1 =========================================== Date: October 5, 1999. Author: Fabio Kon (f-kon@cs.uiuc.edu) This is a description of the current version of the Distributed Configuration Protocol which is used to configure components and distributed component implementations across a distributed system. DCP can be used in client/server, peer-to-peer, and active agents situations. It is being implemented initially on ACE and it provides reconfiguration of dynamicTAO components and of servants running on top of dynamicTAO. It is also available to any 2K application or system module as a CORBA interface (dynamicConfigurator.idl). Note that, in the protocol operations, the term CATEGORY refers to a place holder to concrete implementations. It doesn't need to be a CORBA service, it might be any place holder to which an implementation is associated. Thus, it can refer to a dynamicTAO component, to an application internal component, to a servant running on top of the ORB, etc. 1) Getting information about a remote node's persistent implementation repository --------------------------------------------------------------------------------- LIST_CATEGORIES returns: list of strings (separated by "\r\n") representing the categories in the ORB persistent repository root directory LIST_IMPLEMENTATIONS returns: list of strings representing the implementations of a particular category in the persistent repository. It also lists "subcategories" inside a particular category. Note that, in the current implementation, there's no way to differentiate subcategories from implementations. category_name may be composed of a single word or of several words specifying a pathname in the server persistent repository. Note that, depending upon the server underlying OS, the separator character may vary (e.g., "/" for Unix, "\" for Windows). 1.1) Getting information about the runtime configuration --------------------------------------------------------- LIST_LOADED_IMPLEMENTATIONS returns: list of strings representing the implementations linked to the server process run-time. GET_LATEST_VERSION returns: a string of the form "C:V P" where C is the category_name V is the version number P is the pathname of the implementation in the persistent implementation repository. Note that C:V is exactly the in-memory name of the loaded_implementation. GET_IMPL_INFO returns: string containing a description of a particular loaded implementation. LIST_DOMAIN_COMPONENTS returns: list of strings representing the components registered with the DomainConfigurator. LIST_HOOKS returns: list of strings representing the hooks in a particular component in the domain. component_name may be the name of a component in the root DomainConfigurator or can be a pathname specifying the path to the component. For example, TAO/Concurrency_Strategy refers to the component attached to the hook "TAO/Concurrency_Strategy" of "TAO". Pathnames can have any depth and the separator is always '/' independently of the underlying OS. The root pathname "/" may be used to access the DomainConfigurator which is the object that holds references to the components in the domain. As a consequence of that, the command "LIST_HOOKS /" is equivalent to "LIST_DOMAIN_COMPONENTS". GET_COMP_INFO returns: a string describing a particular component in the domain. Note that the component_name may be a compound name as explained above in LIST_HOOKS. GET_HOOKED_COMP returns: a string containing the name of the component attached to the given hook. 2) Loading implementations and reconfiguring -------------------------------------------- LOAD_IMPLEMENTATION [] loads an implementation of a certain category into the runtime. Note that the category_name may look like a pathname, e.g., MYAPP/decoders/video. returns: ACK or NACK HOOK_IMPLEMENTATION attaches a loaded implementation to one of the hooks of the given component. Note that the component_name may be a compound name as explained above in LIST_HOOKS. returns: ACK or NACK ADD_HOOK returns: ACK or NACK REMOVE_HOOK returns: ACK or NACK SUSPEND_IMPLEMENTATION returns: ACK or NACK RESUME_IMPLEMENTATION returns: ACK or NACK REMOVE_IMPLEMENTATION unloads an implementation from the runtime returns: ACK or NACK CONFIGURE_IMPLEMENTATION returns: ACK or NACK RESTART returns: ACK or NACK 3) Accessing the node's persistent repository -------------------------------------------- UPLOAD_IMPLEMENTATION returns: ACK or NACK DELETE_IMPLEMENTATION returns: ACK or NACK DOWNLOAD_IMPLEMENTATION returns: the binary code corresponding to the requested implementation. IMPORTANT: Note that DOWNLOAD_IMPLEMENTATION is supported only through the CORBA DynamicConfigurator interface. The TCP-based interfaces don't support it. 4) Miscellaneous ---------------- QUIT returns: ACK HELP returns: string containing human-readable help and protocol version information. ................................................................................ Future Extensions ================= - SECURITY ................................................................................ DCP class interface and implementation: ======================================= The DCP.h and DCP.cpp files containing the implementation of this class in C++ is available at the 2K source tree. class DCP { public: static const char * const LIST_CATEGORIES; // implemented static const char * const LIST_IMPLEMENTATIONS; // implemented static const char * const GET_LATEST_VERSION; // implemented static const char * const LIST_LOADED_IMPLEMENTATIONS;// implemented static const char * const GET_IMPL_INFO; // implemented static const char * const LIST_DOMAIN_COMPONENTS; // implemented static const char * const LIST_HOOKS; // implemented static const char * const GET_COMP_INFO; // implemented static const char * const GET_HOOKED_COMP; // implemented static const char * const ADD_HOOK; // implemented static const char * const REMOVE_HOOK; // implemented static const char * const LOAD_IMPLEMENTATION; // implemented static const char * const HOOK_IMPLEMENTATION; // implemented static const char * const SUSPEND_IMPLEMENTATION; // implemented static const char * const RESUME_IMPLEMENTATION; // implemented static const char * const REMOVE_IMPLEMENTATION; // implemented static const char * const CONFIGURE_IMPLEMENTATION; static const char * const UPLOAD_IMPLEMENTATION; // implemented static const char * const DELETE_IMPLEMENTATION; // implemented static const char * const RESTART; // implemented static const char * const QUIT; // implemented static const char * const HELP; // implemented enum { major_version = 1, minor_version = 1, MAX_MESSAGE_SIZE = 1024}; }; class DCP_Reply { public: static const char * const ACK; static const char * const NACK; static const char * const UNKNOWN_REQUEST; static const char * const UNKNOWN_ENTITY; static const char * const EMPTY; static const char * const MALFORMED_REQUEST; };