.. _architecture: ============ Architecture ============ Microservices ============= REST API Plugins and Sensors =================== Sensors must be groupped in plugins: the idea is that each plugin gives access to one or (typically) more sensors. Plugins are intended to be used by ``stevedore`` as extensions, i.e. ``stevedore.extension.Extension``, such that the plugins are automatically found and loaded. The plugin implementation is, of course, ``stevedore``-agnostic and they are just expected to behave as ``limonada.plugin.PluginBase`` although for now nothing is enforced, from the typing point of view, and all the mechanism of loading plugins is purely based on duck typing and on the ``stevedore`` machinery of defining extensions. A plugin must have an entry point in the ``pyptoject.toml`` file, or similar, and it should belong to the ``limonada.plugins`` namespace. One example of plugin is ``psutil``. It provides 22 sensors, such as ``CPUTimesSensor``, ``BatterySensor`` etc. .. note:: The plan is to have builtin plugins, optional plugins and third party plugins, each offering different sensors. Some sensor names could be masked by others! A mechanism to select which one to use in such situations must be still devised.