COSMOS

,

LAKE – COSMOS: Continuum Optimization for Swarm-based Multi-tier Orchestration System

ID: R24 Licence:
Apache 2.0
Owner:
LAKE
Contacts:
schranz@lakeside-labs.com
Short DescriptionCOSMOS (Continuum Optimization for Swarm-based Multi-tier Orchestration System) is a simulation framework built specifically for MYRTUS to simulate local rules, i) inspired by swarm intelligence or ii) designed with evolutionary algorithms using FREVO, for the MYRTUS 360° edge-fog-cloud vision.
Key features– Agent-based modelling of incoming pods and of the devices on the edge, fog and cloud layers
– Resource demand simulation
– Two reference algorithms (random, greedy) and two swarm algorithms (ant colony optimization, hormone-based), as pluggable strategies
– Auto-generation of diverse edge-fog-cloud environments, and import of topologies modelled in TOSCA and of external network architectures
– Evaluation of fog and cloud dependencies
– Evaluation of communication cost for workload allocation
– Scalability in terms of the number of interacting agents
– Interface to FREVO for the evolutionary design of local rules
– Open-source, Python implementation
RequirePython, with the following modules (tested versions):
– mesa (3.0.3)
– matplotlib (3.5.1)
– numpy (1.21.5)
– networkx (3.3)
– protobuf (3.12.4)
– pyyaml (6.0)
Additional dependencies installed via mesa: pandas (2.0.3), tqdm (4.66.4), python-dateutil (2.8.2).
ProvideA simulation environment for agent-based scheduling in the edge-fog-cloud continuum, with exchangeable pod behaviour strategies (random walk, greedy, ant colony optimization, hormone-based, neural network) and an interface for the evaluation of candidates generated by FREVO.
InputA main configuration file where the user defines, among others: number of pods and pods per step, number of simulation steps, number of edge devices, fog nodes and cloud servers (or an imported network graph), pod behaviour type (random walk, ant colony optimization or neural network based decision-making), arrival interval and rate of the pods, and run mode (normal, generation of samples, training with FREVO). Topologies can be exported from Modelio TOSCA Designer in a dedicated YAML format.
OutputPlots and related data for:
– Evaluation of fog and cloud dependencies
– Evaluation of communication cost for workload allocation
– Resource utilization of the agents
In training mode, the evaluation results of each candidate, sent back to FREVO.
UserIn the context of MYRTUS, COSMOS is used to evaluate i) swarm-inspired and ii) evolutionary generated algorithms in simulation before integration into the real system: system designers and researchers working on distributed, self-organizing systems for edge-fog-cloud orchestration.
Benefits for the user– Experiment with the MYRTUS environment in the usage of swarm intelligence
– Configure new network topologies and evaluate the differences
– Run any kind of use case thanks to a high enough abstraction level
– Compare orchestration strategies on quantitative metrics, without a physical testbed
– Plug in new scheduling algorithms easily and obtain reproducible results
Downloadgithub.com/Incomprehensible/COSMOS
Role in MYRTUSStep 1 of the MYRTUS DPE (Continuum modelling, simulation and analysis): design space exploration for large-scale deployments, in both of its paths (swarm intelligence algorithms, and FREVO).
TRL@M01
TRL@M363-4

General description


COSMOS is a Python-based simulation framework developed in MYRTUS to implement and evaluate agent-based scheduling algorithms in a self-organizing context. It is built on Mesa, a multi-agent modelling library, and supports the exploration of swarm intelligence approaches for workload management.

COSMOS sees the edge-fog-cloud continuum as a dynamic landscape where swarming resource agents offer their computing resources to incoming service chain components, the pods. Each resource agent belongs to the edge, fog or cloud layer and provides a given amount of CPU power and memory, according to its profile. The agents are placed on a densely connected network graph of edge, fog and cloud devices, whose edges carry the communication costs. Pods, the demand agents, enter the network dynamically, with randomized arrival times, controlled arrival density and varying resource demands. The framework can generate diverse network topologies, so that load conditions and agent distributions can be adjusted.

A Simulation class manages the configuration, the runtime flow and the data collection, and creates the pods; a Model class builds the network graph with NetworkX and assigns the resource agents to its nodes. The scheduling algorithm of the pods is selected in the configuration and plugged in as a strategy, so new algorithms can be added without changing the rest of the framework.

Block diagram of the COSMOS architecture

Architecture of COSMOS.

Role in the MYRTUS DPE


In Step 1 of the MYRTUS DPE, COSMOS is part of the design space exploration block for large-scale deployments, which turns the simulated behaviour of the application into local rules that the agents use to place workloads at run time. COSMOS is used in both of the alternative paths of the block, and the choice depends on whether the placement logic is already known.

Swarm intelligence algorithms: rules as code

The scheduling behaviour is a known swarm intelligence algorithm, such as ant colony optimization or the hormone-based algorithm, implemented in COSMOS as a pluggable pod behaviour. COSMOS simulates it to evaluate the local rules for workload placement, which are then delivered as explicit, interpretable code.

Evolutionary design with FREVO: rules as weights

The right behaviour is not known in advance. FREVO runs an evolutionary training loop and COSMOS acts as its fitness evaluator: it receives each candidate, reconstructs it as a neural network, runs a parametrized simulation, evaluates the state of the model and sends the results back. The outcome is a set of learned parameters, delivered as weights.

Workflow between FREVO and COSMOS: candidate selection, simulation, evaluation and fitness calculation

Workflow between FREVO and COSMOS.

The topologies can be modelled in Modelio TOSCA Designer and imported into COSMOS through a dedicated YAML export. The local rules obtained in either path are exported, together with the TOSCA model, towards deployment, where they guide the swarm-based placement of workloads in the MIRTO cognitive engine.

MYRTUS Extension/Contribution


COSMOS is a new result of MYRTUS, added to the planned results during the project. It provides two baseline algorithms (random and greedy) and two swarm algorithms (ant-based and hormone-based), running and ready for evaluation. The ant colony optimization algorithm evaluated in COSMOS is the basis of the Swarm-based Workload Manager of the MIRTO cognitive engine.

Besides the generation of synthetic environments, an import mechanism was developed for TOSCA files and external network architectures, so that simulations and optimizations can run directly on topologies modelled with Modelio TOSCA Designer, and an interface to FREVO was implemented for design-time optimization. With this tooling, swarm-based placement strategies have been studied on large-scale scenarios, observing their behaviour dynamically over the simulation rather than as a single static snapshot.

Technology Benefits and Innovations


Agent-based modelling is well suited to swarm algorithms in decentralized systems: autonomous agents with local interactions produce emergent behaviours, and neighbour-based communication and spatial constraints can be represented explicitly, from dozens to thousands of agents. Established simulators for distributed computing focus on other aspects: CloudSim is a mature, extensible framework for cloud research, iFogSim targets fog environments with a strong focus on energy and latency, and EdgeCloudSim adds mobility and network latency for edge-cloud scenarios.

COSMOS differs from them through its integration of swarm intelligence and its modelling of the whole edge-fog-cloud continuum. Its modular design, based on Factory and Strategy patterns, gives a unified interface to plug in and compare scheduling algorithms and reuse code, and enables decentralized scheduling in real-time simulation, for research on adaptive distributed systems.

Testing decentralized orchestration on real infrastructures is costly and hard to observe, and comparing different scheduling paradigms in a fair way is difficult. COSMOS offers a common workflow for these experiments: the same metrics for every strategy, environments that can be generated or imported, and results that can be reproduced. It takes the place of a physical testbed in the early design stages; since a simulation cannot capture every aspect of a real deployment, the most promising strategies are then brought to the real system, as happened with the Swarm-based Workload Manager.

Users


System designers and researchers working on distributed, self-organizing systems for edge-fog-cloud orchestration. Their work includes simulating and evaluating local rules for workload placement, comparing the performance of different scheduling and orchestration strategies, analysing dependencies and communication costs across the layers, and integrating and testing swarm intelligence or evolutionary algorithms, with metrics and plots to support their conclusions.

Developers of decentralized schedulers can use COSMOS to implement and tune their algorithms on configurable topologies before testing them on real infrastructures, and system designers can use it to evaluate placement strategies for large-scale deployments at design time.

References


Competenze

Postato il

30 Gennaio 2025