In my last blog entry I've posted a small video showing the dynamic nature of the Devil Framework system. Now I what to describe what happens behind the scenes when a new/updated plugin into an Application Server instance.
The user selects the plugin(s) to install from the IceBridge console. Plugin packages can be installed from local file-systems or remote-repositories.
The console sends the selected package(s) to the master node of the Devil Framework Application Server distributed system.
The Application Server extracts packages data:
Hook scripts: scripts that are executed by the server at defined stages of its life (at start, stop, update, etc.), and are executed always, and not only when the plugin is or has to be instantiated.
Install/upgrade scripts: the scripts are used to perform pre/post install/upgrade/un-install operations specific to the installed plugins.
Server side code and data: this is the code that will be executed on the server side.
Client side code and data: this is the code and data used by the IceBridge consoles. There are two "types" of code and data here: the one that is automatically downloaded and executed when the console connects to the server, and the one that is downloaded and instantiated on-demand.
Languages data: translations for the text used in the package.
Documentation: documentation modules that will be integrated into the documentation sub-system.
Periodically the nodes of the system query the MCP for synchronization (i.e.: for new/updated packages, new configurations). The master node sends the new package to all the nodes that match the package's configuration. A package can be designed to be installed only on specific node types (MCP, Collectors, Agents, Devices).
For each node that has received the new package and if the package is a "required" one or is used by the active Policy:
Shut down the plugin, if active.
Start the plugin: plugin's configuration is retrieved from the global configuration system or from the Policy that instantiated it.
On the client side, when a console connects to a server:
The server is checked if new libraries are available: new libraries are downloaded and stored in a permanent cache. An example library is the standard Python "site-packages" directory.
For each installed plugin the console automatically downloads and executes its "auto-install" code and data, if any.
Connected consoles are notified that new plugins have been installed. Code can be binded to this events to perform automatic actions.
Whenever the console tries to access some plugin's code (that is stored in a permanent cache on the client host) the server is checked for a new version of it: if a new version is available, it is downloaded and used.