Modern software must continually adapt to changing operating contexts such as hardware/software platforms. This adaptation involves detection of context, mapping of context to a software configuration which is a set of appropriate software components and parameters, followed by seamless execution of this software configuration. All this happens while minimizing the impact of dynamic adaptation on user experience. Can we provide a generic software platform to build dynamically adaptive software for scientific computing? This is the question we answer with Girgit, an ultra-lightweight (~70KB) open-source Python based framework, to develop component-based dynamically/self adaptive systems.
Girgit allows creation of software components with a well defined interface which may encode its logic in any programming language accessible using Python wrappers. These components and their parameters can be configured in a number of ways and connected in various orchestrations. This gives rise to a large set of software configurations. Girgit provides a model-based specification to specify configurations of the system that are triggered by events. The core of Girgit provides a module manager that loads and caches instances of components, a dynamic configurator that executes the reconfiguration of the system, an event manager that manages incoming events and suggests actions such as changing of components or complete orchestrations, and a service layer to connect a dynamically adaptive system to external services or systems.The model of how Girgit maps events to configurations itself can change at runtime without halting the system.
Our current application of Girgit is in the domain of building adaptive vision system. A typical use case involves using Girgit to orchestrate vision components for human intrusion detection. An intrusion event triggers a change in configuration to detect faces(s) that ascertain humans in the scene. In such as scenario, Girgit triggers an adaptation rule that replaces the image segmentation component and adds a new component for detecting facial features at runtime. We perform rigorous experiments to demonstrate that Girgit has a very low adaptation time between configurations which we believe is effective for real-time vision sytems. We expect to extrapolate similar results in other scientific computing applications. From an usability point of view, Girgit provides a minimalistic API exposed as a service. Girgit is provided under the MIT licence.