Client Manager

Interaction with elos externally are through clients. The clients are provided as elos-plugins. The Client Manager is responsible for loading all plugins via the generic Plugin Manager Plugin Manager, starting, stopping and unloading them. The Client Manager also determine the configuration which is used to search for plugins.

Static structure

The Client Manager is a typical elos component (Components). It uses the PluginManager to run client plugins.

PluginManager

Detailed documentation about PluginManager is here Plugin Manager

Dynamic behavior

See below the lifecycle and control flow of the Storage Manager.

== Initialization ==
-> ClientManager: elosClientManagerInitialize()
ClientManager -[#red]> ElosConfig: fetch ClientInputs plugin configurations

== Start ==
-> ClientManager: elosClientManagerStart()
ClientManager -[#red]> PluginManager: elosPluginManagerLoad()
ClientManager <[#blue]-- PluginManager: Return plugin loaded and started
ClientManager -[#red]> "Client Plugin": load and set client event filters

== Stop ==
-> ClientManager: elosClientManagerStop()
ClientManager -[#red]> "Client Plugin": cleanup client event filters
ClientManager -[#red]> PluginManager: elosPluginManagerUnload()
ClientManager <[#blue]-- PluginManager: Returns result

== Cleanup ==
-> ClientManager: elosClientManagerDeleteMembers()
ClientManager -[#red]> ClientManager: free resources

The lifecycle of the Client Manager

Data

The client manager expects a configuration object under the path /root/elos/ClientInputs. The object must follow the specification required by the PluginManager. Each Plugin needs a configuration that specifies port to connect, connection interface tcp/unix etc, event blacklist filters and process authorization filters for determining which process are allowed to be published by which processes.

{
    "root": {
        "elos": {
            "ClientInputs": {
                "PluginSearchPath": "/usr/local/lib/elos/client",
                "Plugins": {
                    "a Plugin name": {
                     "File": "plugin_file.so",
                     "Run": "always",
                     "Config": {
                         "Port": 54321,
                         "Interface": "127.0.0.1",
                         "EventBlacklist": ".event.messageCode 2000 EQ",
                         "authorizedProcesses": [
                             ".process.uid 0 EQ .process.gid 0 EQ .process.exec '/bin/elosc' STRCMP AND",
                             ".process.gid 200 EQ .process.exec '/bin/elosc' STRCMP AND",
                             ".process.pid 1 EQ"
                         ]
                       }
                    }
                }
            }
        }
    }
}

Error

If the configuration for Client Plugins is not found or invalid the initialization of the ClientManager will fail. The ClientManager will fail to start if the PluginManager reports error on loading plugins. But will continue to start if some clients have no or broken filter rules. In that case errors are reported but elos continues operation. Events generated by this plugins might not be properly stored as intended by the plugin. On errors during stopping and freeing memory the ClientManager try to cleanup as far as possible. An ClientManager instance that has failed to stop or to delete its members shall not be restarted or reinitialized.