Page Tools

    Adage internals

    This page roughly documents some of the internals of Adage (mostly creation/lifecycle/destruction), nothing is ordered/cleared. Corresponds to svn r2061. You can also have a look at the browsable doxygen version of the code.

    Namespaces & classes


    • dispatcher : Created by listener constructor. Receives events from listeners, and dispatchs them to dpl_info/execute_plan/resourcer instances.
    • automate : Created by dispatcher constructor, keeps track of adage daemon state and transitions.
    • commandline : Created by factory constructor if argv[1] != -d. Parses commandline options using getopt(), then send all events to dispatcher. Dump documents in the end.
    • tcpsocket : Created by factory constructor if argv[1] == -d. Receives commands from, then sends events to dispatcher.


    • dpl_info : instance created in dispatcher constructor, holds pointers to all documents. Main 'infocenter' for deployment, encapsulates all appl_fragments and plugins. make_generic_document() is called by dispatcher::rcv_prepare(), add_generic() is called by plugin::convert().
    • ctrlparams : Created by dpl_info::set_ctrlparams(), destroyed by dpl_info::wipe(). Handles ctrl params document. Gives access to specific ctrl params file too.
    • generic : handles generic document representing the generic description of the appl to be launched. Can be a fragment of the whole appl. Main document is created by dpl_info::make_generic_document() and destroyed by dpl_info::wipe(). Other fragments are created by plugin::convert().
    • plan : created by dpl_info::get_plan(), filled/updated by metaplanner::make_plan(), destroyed by dpl_info::wipe().
    • resources : created (and destroyed if dirty) by resourcer::make_resources_document().
    • status : created by dpl_info::get_status(), filled/updated by state_mgt::fill_status(), destroyed by dpl_info::wipe().


    • callbacks_listener : instance created in execute_plan constructor, has a pointer to state_mgt instance. has a thread which listens to callbacks coming from satellite, and calls state_mgt→set_entity_is_acked()/update_dependencies(). Also calls plugin→get_specific_deployment()→cb_acked(callback_t).
    • state_mgt : instance created in execute_plan constructor, destroyed in execute_plan::wipe(). Creates/fills/updates status looping on plan, and reads dependencies from generic. Responsible of choosing the state_mgt::get_candidate_entity_to_launch(), called by execute_plan::deploy().
    • execute_plan : instance created in dispatcher constructor. Constructor creates state_mgt, callbacks_listener, file_transfer, remote_caller and scripts_generator. Responsible of executing the processes not launched in the plan.
    • commandline : instance created in execute_plan constructor. Builds the commandline executed to contact the remote node and launch the satellite with arguments representing the processes to launch.
    • file_transfer : instance created in execute_plan constructor. Two main methods, populate_local_tree() and transfer_files() called in execute_plan::deploy() before deployment. Builds prestage-tree in /tmp/$USER, then $cmd it on each node. Reads ctrl params for destdir and binlib_in_commondir settings.
    • scripts_generator : instance created in execute_plan constructor. Creates the and scripts. Main method generate() called by execute_plan::deploy() after deployment if !dryrun.
    • tcpsocket : replaces commandline with a daemonized adage-satellite, working but doesn't provide much more.


    • planner : base classe for real planners, holds a pointer to resourcer.
    • metaplanner : acts as a proxy between dispatcher (which will call make_plan()) and the real planners. It is also used as a planner shared object loader.


    • plugin : Base class for all planners, inherits from all the interfaces a plugin has to implement.
    • loader : Used to dynamically load plugin shared objects, records which plugin is used to handle which type of application.

    External Planners

    • simple : created by planner::metaplanner(), destroyed by metaplanner::wipe(). make_plan() is called by metaplanner::make_plan(). Handles rr-greedy, roundrobin and random planner types.
    • heuristics : created by planner::metaplanner(), destroyed by metaplanner::wipe(). make_plan() is called by metaplanner::make_plan().

    External Plugins


    • oar : oar-based input_handler, created by dispatcher::get_oar_resourcer() as a singleton. Receives oar(grid/file) ids from dispatcher, process() (called by resourcer::make_resources_document()) creates the resources document.
    • file : file-based input_handler, created by dispatcher::rcv_*res. Constructor creates a resources document.
    • resourcer : Created by dispatcher constructor. Used by planner to search available/matching nodes. Handles multiple input_handler. make_resource_document() is called by dispatcher::rcv_make_plan().
    • constraints : handles placement and arch constraints, created by planner constructor.


    Powered by Heliovista - Création site internet