Ingescape editor, take the tour !

Ingescape editor, take the tour !

This article presents the high-level features of the Ingescape editor. We do not go into details here but you will have a good overview of this application after your read.

Whereas the Ingescape library is dedicated to software developers, the Ingescape editor has been designed for all the other actors who require specific visualizations or tools. The editor leverages the benefits of a graphical application to accelerate or extend tasks that can be achieved through coding.

Systems built on Ingescape can contain a large number of agents and communication flows. The Ingescape editor introduces features to monitor and configure them dynamically. The editor exposes the agents definitions and the mappings between agents, which are key Ingescape concepts, detailed in your first Ingescape agent. Other concepts join them to provide new services to the platform users.

The current version of the editor offers the following services:

  • Supervision of agents and machines
  • Visualization and edition of mappings between agents
  • Scenarios edition and execution
  • Platform data record and replay

The Ingescape editor presents three major areas, one of them being hidden when the editor starts:

  1. The tabs gives access to the list of agents, machines and actions.
  2. The main central area presents the agents involved in the current mapping with all the actual mapping links between agents.
  3. The timeline, at the bottom, stores all the actions scheduled or executed in the current scenario.

We will now go through these services and provide more details.

Supervision of agents and machines

When executed on a given system, i.e. on a given network with a given network port, the editor collects and shows the list of all the active agents and offers to call various types of commands on them (stop, mute, freeze, etc.). The editor gives access to the details of a definition in a dedicated view.

The editor can also import agent definitions before an agent is actually available in the system. In the same way, agents that are not executed, but were before, are still listed as inactive agents. The editor is able to start inactive agents if their hosting computer is switched on and present on the network.

Agent definitions can be exported and imported with the editor using a simple JSON format. The Ingescape library supports the loading and dumping of these JSON files so that the developers do not have to always hardcode an agent definition but use an external resource file instead.

Here is an example of a simple agent definition:

{ "definition": { "name": "myAgent", "description": "myAgent is able to ...", "version": "0.1", "parameters": [{ "name": "param1", "type": "INTEGER", "value": -1 }], "inputs": [{ "name": "myImpulsion", "type": "IMPULSION", "value": "" }, { "name": "myInt", "type": "INTEGER", "value": 30 }, { "name": "myBool", "type": "BOOL", "value": "false" }, { "name": "myDouble", "type": "DOUBLE", "value": 15.5 }, { "name": "myString", "type": "STRING", "value": "string example" }, { "name": "myData", "type": "DATA", "value": "" }], "outputs": [{ "name": "value1", "type": "DOUBLE", "value": 3.14 }] } }
Code language: JSON / JSON with Comments (json)

Just like for definitions, the editor provides a list of active machines in the observed system. Such machines, that can operate on Linux, Windows or macOS, embed a specific software agent giving them capabilities regarding Ingescape and hosted agents. This software can be run as a daemon or system tray program.

Visualization and edition of mappings between agents

At startup, the Ingescape editor connects to a system on a given network port and IP domain and draws its global mapping, i.e. all the agents composing the system and all the links between the inputs and outputs. This global mapping is presented as a set of boxes representing the agents, and the “wires” connecting them.

The mapping view is a zoomable infinite workspace where users can draw and organize their agents and associated mapping links. When the editor is connected to a system, mapping links can be added or removed dynamically and the system updates itself automatically to implement the new mapping.

When agents exchange data, i.e. when an agent’s output is written, the existing mappings from this output to inputs of other agents are highlighted, providing a feedback of the circulating data. The editor is also able to show the actual values that are exchanged, whatever their format is (numbers, text, etc.).

Just like definitions, mappings can be hardcoded by developers or managed through JSON files.

Here is an example of a simple agent mapping:

{ "mapping": { "name": "myOtherAgentMapping", "description": "This mapping is the one for myOtherAgent", "version": "0.1", "mapping_out": [{ "input_name": "myImpulsion", "agent_name": "myAgent", "output_name": "myImpulsion" }, { "input_name": "myInt", "agent_name": "myAgent", "output_name": "myInt" }, { "input_name": "myBool", "agent_name": "myAgent", "output_name": "myBool" }, { "input_name": "myDouble", "agent_name": "myAgent", "output_name": "myDouble" }, { "input_name": "myString", "agent_name": "myAgent", "output_name": "myString" }, { "input_name": "myData", "agent_name": "myAgent", "output_name": "myData" } ] } }
Code language: JSON / JSON with Comments (json)

The example above shows the mappings of an agent called “myOtherAgent”, which consists in a strict one to one output to input mapping from the outputs of the “myAgent” agent. Note that mappings for each agent are expressed from its inputs to other agents’ outputs.

Any combination of mappings is allowed. An output can be connected to as many inputs as you like. An input can be fed by as many outputs as you like. You need to be careful though to avoid loops in your architecture and concurrency on a given input, if fed by several outputs at once. The Ingescape library has some advanced features enabling to deal with the most complex architectures in truly distributed and highly evolutive systems, based on state of the art network patterns.

Scenarios edition and execution

The previous paragraphs present how the Ingescape editor gives facilities for the core Ingescape concepts. Above this, the editor brings concepts of its own for non-developers wanting to create and execute behaviors on a given system.

The editor introduces the concept of action to be executed in your system. Actions are composed of effectsconditions and advanced parameters:

  • Effects are the actual results of an action in your system. They can be start/stop of an agent, creation or removal of a mapping, value writing on any agent’s IOP, etc.
  • Conditions are optional checks regarding an action that will set if the effects can be applied or not. Conditions are the presence/absence of an agent, value checks (=, >, <) on any IOP, etc.
  • Advanced parameters consist in the control over an action’s validity duration, reversibility or multiple triggers during a period of time and with a given periodicity.

Actions are usable either:

  • in an actions panel for manual trigger by the user of the editor,
  • or, in the timeline, in potentially very complex scenarios.

Support for actions and scenarios in the editor is still evolving quickly and will be enriched in the future.

Platform data record and replay

The editor embeds record and replay capabilities for any Ingescape system at any time. These capabilities are useful for functions testing, user experimentations and overall system validation.

Previous records are available for replay with several possibilities regarding the behavior of the agents and recorded data. Previous records can also be exported for exploitation and analysis in third-party tools, to help data scientists, engineers and human factors experts.