Query application, service and interaction frames. Keep the seed and configuration
explicit when comparing scenarios.
- Read and query results →
@@ -216,7 +224,7 @@
Work with service graphs
Explore resource-aware deployment using abstract services, placement strategies and
update policies. No service implementation is needed.
- Start locally →
@@ -227,24 +235,24 @@
Run implemented services
Provide service logic and execute it through Ray with MPI-style or REST-style
communication. This requires additional runtime setup.
- Set up remote emulation →
diff --git a/docs/overrides/main.html b/docs/overrides/main.html
new file mode 100644
index 00000000..ea1e0e64
--- /dev/null
+++ b/docs/overrides/main.html
@@ -0,0 +1,25 @@
+{% extends "base.html" %}
+
+{% block extrahead %}
+
+
+
+
+{% endblock %}
+
+{% block scripts %}
+ {{ super() }}
+
+{% endblock %}
diff --git a/docs/overrides/partials/copyright.html b/docs/overrides/partials/copyright.html
new file mode 100644
index 00000000..05edd4df
--- /dev/null
+++ b/docs/overrides/partials/copyright.html
@@ -0,0 +1,8 @@
+
diff --git a/docs/overrides/partials/nav.html b/docs/overrides/partials/nav.html
new file mode 100644
index 00000000..cae8e0d5
--- /dev/null
+++ b/docs/overrides/partials/nav.html
@@ -0,0 +1,34 @@
+{% import "partials/nav-item.html" as item with context %}
+{% set class = "md-nav md-nav--primary" %}
+{% if "navigation.tabs" in features %}
+ {% set class = class ~ " md-nav--lifted" %}
+{% endif %}
+{% if "toc.integrate" in features %}
+ {% set class = class ~ " md-nav--integrated" %}
+{% endif %}
+
diff --git a/docs/overview/advanced/emulation/emulation.md b/docs/overview/advanced/emulation/emulation.md
new file mode 100644
index 00000000..4614534c
--- /dev/null
+++ b/docs/overview/advanced/emulation/emulation.md
@@ -0,0 +1,121 @@
+# Emulation
+
+ECLYPSE supports **emulation mode**, in which service logic is executed as real
+concurrent processes distributed over a physical or virtual cluster. This is
+built on top of [Ray](https://docs.ray.io/en/latest/).
+
+Unlike local simulation, where services can remain abstract application nodes,
+emulation requires you to implement the actual **runtime behaviour** of each
+service.
+
+In this page, we focus on the elements that differ from standard simulation.
+
+## Ray Overview
+
+Ray is based on the concept of **actors**: lightweight, stateful processes that live in a distributed cluster and interact via message passing.
+
+Each actor:
+
+- encapsulates state and behaviour,
+- runs in parallel with others,
+- persists across calls.
+
+Ray also provides a built-in **object store** that supports asynchronous, shared-memory communication across the cluster.
+
+ECLYPSE uses Ray actors to represent application services when running in emulation mode.
+
+
+## Enabling Emulation
+
+To activate emulation from a
+[simulation run](../../concepts/simulation-configuration.md),
+you must either:
+
+- set the flag `remote=True` when creating the simulation, or
+- pass a [RemoteBootstrap][eclypse.remote.bootstrap.bootstrap.RemoteBootstrap] object, which defines the **Ray cluster configuration**.
+
+Example:
+
+```python
+from eclypse.remote.bootstrap import RemoteBootstrap
+from eclypse.simulation import Simulation, SimulationConfig
+
+bootstrap = RemoteBootstrap()
+config = SimulationConfig(remote=bootstrap)
+simulation = Simulation(infrastructure, simulation_config=config)
+```
+
+## Implementing a Service { #implementing-a-service }
+
+To define a service in emulation, subclass
+[Service][eclypse.remote.service.service.Service] or
+[RESTService][eclypse.remote.service.rest.RESTService].
+
+These classes wrap a Ray actor that runs a loop on a remote node.
+
+You must implement the method:
+
+- [step][eclypse.remote.service.service.Service.step] -- defines one iteration of service behaviour.
+
+Optionally, you can override:
+
+- [on_deploy][eclypse.remote.service.service.Service.on_deploy] -- called just before the service starts executing.
+- [on_undeploy][eclypse.remote.service.service.Service.on_undeploy] -- called after the service stops.
+
+If the service is created with `store_step=True`, the return value of
+[step][eclypse.remote.service.service.Service.step] is pushed into the
+service's step buffer and can later be collected through the default
+`step_result` metric.
+
+??? example "Example: Echo Service"
+
+ The following example shows a simple service that sends a message to its
+ neighbours via MPI and stores one value per iteration.
+
+ ```python
+ import asyncio
+ from eclypse.remote.service import Service
+
+ class EchoService(Service):
+ def __init__(self, service_id: str):
+ super().__init__(service_id, store_step=True)
+ self.i = 0
+
+ async def step(self):
+ message = {"msg": f"Hello from {self.id}!"}
+ for neighbour in await self.mpi.get_neighbors():
+ await self.mpi.send(neighbour, message)
+ self.i += 1
+ await asyncio.sleep(1)
+ return self.i
+ ```
+
+ !!! note
+
+ The parameter `store_step=True` ensures that the return value of
+ [step][eclypse.remote.service.service.Service.step] can be collected
+ later by reporting tools.
+
+
+## Messaging Protocols
+
+ECLYPSE currently supports two service communication protocols:
+
+- a mock **MPI-like interface**, exposed as `self.mpi` inside a service,
+- a REST interface, via subclassing [RESTService][eclypse.remote.service.RESTService].
+
+In both cases, services may communicate with each other by sending structured messages. Routing and delivery are handled by the runtime.
+
+### Reporting emulation results
+
+The default metric `step_result` reports the values returned by the service's
+[step][eclypse.remote.service.service.Service.step] method, in the order
+they were produced. This is useful for monitoring application-level behaviour
+over time.
+
+The step buffer is a FIFO queue: each time `step_result` is triggered (by
+default, once per `enact`), it removes and reports the **oldest** stored
+value. If `step` runs more often than the metric is triggered, values
+accumulate and the report lags behind the service. The buffer holds up to
+`DEFAULT_STEP_QUEUE_SIZE` (1024) values; when it is full, the oldest ones are
+dropped.
diff --git a/docs/overview/advanced/emulation/index.md b/docs/overview/advanced/emulation/index.md
new file mode 100644
index 00000000..462e3c8c
--- /dev/null
+++ b/docs/overview/advanced/emulation/index.md
@@ -0,0 +1,19 @@
+# Emulation
+
+
+
+- :octicons-codespaces-16: **[Emulation](emulation.md)**
+
+ ---
+
+ Define the logic of your application services and run them as remote
+ services on a machine or a cluster.
+
+- :octicons-comment-discussion-16: **[Messaging](messaging.md)**
+
+ ---
+
+ Exchange messages between services in emulation mode using the MPI-like
+ and REST-style interfaces.
+
+
diff --git a/docs/overview/advanced/emulation/messaging.md b/docs/overview/advanced/emulation/messaging.md
new file mode 100644
index 00000000..6a6cb69c
--- /dev/null
+++ b/docs/overview/advanced/emulation/messaging.md
@@ -0,0 +1,200 @@
+# Messaging
+
+When running in [emulation mode](emulation.md), ECLYPSE allows services to communicate directly with one another using structured [EclypseCommunicationInterface][eclypse.remote.communication.interface.EclypseCommunicationInterface].
+
+Two communication models are currently supported:
+
+- an **MPI-like interface** ([EclypseMPI][eclypse.remote.communication.mpi.interface.EclypseMPI]), designed for low-latency message passing
+- a **REST-style interface** ([EclypseREST][eclypse.remote.communication.rest.interface.EclypseREST]), designed for loosely coupled HTTP interactions
+
+These APIs can be used from within emulated services to exchange information,
+coordinate behaviour, or simulate service-level protocols.
+
+
+## Communication at a glance
+
+=== "MPI"
+
+ ```mermaid
+ sequenceDiagram
+ participant A as Sending service
+ participant Q as Recipient queue
+ participant B as Receiving service
+ A->>Q: await mpi.send(recipient_id, data)
+ B->>Q: await mpi.recv()
+ Q-->>B: Message(source, data)
+ ```
+
+ The receiver consumes queued messages explicitly. A reply is another send.
+
+=== "REST"
+
+ ```mermaid
+ sequenceDiagram
+ participant A as Calling service
+ participant B as Registered endpoint
+ A->>B: await rest.post(service/route, ...)
+ B-->>A: Response status and body
+ ```
+
+ The caller addresses a registered endpoint and inspects the response.
+
+## MPI-style messaging
+
+The MPI interface provides basic primitives to send and receive messages among services deployed in the same application.
+
+Each [Service][eclypse.remote.service.service.Service] has access to an [mpi][eclypse.remote.service.service.Service.mpi] attribute (an instance of the internal communication layer), through which it can:
+
+- send messages to specific services ([send][eclypse.remote.communication.mpi.interface.EclypseMPI.send])
+- broadcast messages to all neighbours ([bcast][eclypse.remote.communication.mpi.interface.EclypseMPI.bcast])
+- receive incoming messages ([recv][eclypse.remote.communication.mpi.interface.EclypseMPI.recv])
+
+All methods are **asynchronous** and simulate network cost using the placement and topology of the infrastructure.
+The send and broadcast requests must be awaited explicitly.
+
+```python title="Example: Use MPI interface"
+""" ... inside the step() method of service-A """
+
+# Send to one neighbour
+await self.mpi.send("service-B", {"msg": "ping"})
+
+# Broadcast to all neighbours
+await self.mpi.bcast({"msg": "update"})
+
+# Receive next message
+message = await self.mpi.recv()
+
+# Wait at most 5 seconds; raises TimeoutError if nothing arrives
+message = await self.mpi.recv(timeout=5.0)
+
+# Receive immediately; raises queue.Empty if no matching message is queued
+message = await self.mpi.recv(source="service-B", block=False)
+
+# Receive this sender's oldest message; other senders stay queued
+message = await self.mpi.recv(timeout=5.0, source="service-B")
+```
+
+`recv()` returns the oldest queued message as a `Message` object.
+Its `source` attribute identifies the sending service, while `data` contains
+the application data unchanged, including any application-defined `source` key.
+For example, use `message.source` and `message.data["msg"]`. Pass `source` to receive
+the oldest message from a specific service, leaving other messages queued.
+By default, reception waits until a matching message arrives;
+`timeout` limits this wait in seconds and raises `TimeoutError` if it expires.
+Use `block=False` to receive immediately or raise `queue.Empty` if no matching
+message is available; in this mode, `timeout` is ignored. Cancelling or timing
+out a receive leaves later messages available for the next call.
+
+### @exchange() decorator
+
+In addition to direct calls, the
+[EclypseMPI][eclypse.remote.communication.mpi.interface.EclypseMPI] interface
+provides a decorator
+([`@exchange()`][eclypse.remote.communication.mpi.interface.exchange])
+to define communication behaviour declaratively inside service methods.
+
+You can decorate a method to:
+
+- receive a message before it runs (`receive=True`)
+- send the return value to a target (`send=True`)
+- broadcast the return value to all neighbours (`broadcast=True`)
+
+**Sending and broadcasting are mutually exclusive.**
+
+```python title="Example: Using the exchange decorator"
+from eclypse.remote.service import Service
+from eclypse.remote.communication.mpi import exchange
+
+class EchoService(Service):
+
+ @exchange(receive=True, send=True)
+ async def step(self, source, message):
+ reply = {"msg": f"Echo: {message['msg']}"}
+ return source, reply
+```
+
+## REST-style Messaging
+
+ECLYPSE also provides a REST-style communication interface for services. This
+mode models service interaction using HTTP-like semantics and is better suited
+for stateless, loosely coupled communication patterns.
+
+To use this style, your service must subclass
+[RESTService][eclypse.remote.service.rest.RESTService].
+
+### @register_endpoint() decorator
+
+You define REST endpoints inside your service by decorating methods with
+[`@register_endpoint()`][eclypse.remote.communication.rest.interface.register_endpoint].
+
+Each endpoint:
+
+- is associated with a URL pattern and an HTTP method (`GET`, `POST`, `PUT`, `DELETE`)
+- receives the request data as keyword arguments
+- must return a tuple: `(HTTPStatusCode, response_dict)`
+
+Example:
+
+```python
+from eclypse.remote.communication.rest.codes import HTTPStatusCode
+from eclypse.remote.communication.rest.interface import register_endpoint
+from eclypse.remote.service import RESTService
+
+class StoreService(RESTService):
+
+ def __init__(self, service_id: str):
+ super().__init__(service_id)
+ self.store = {}
+
+ @register_endpoint("/data", method="POST")
+ async def store_data(self, key: str, value: Any):
+ self.store[key] = value
+ return HTTPStatusCode.CREATED, {"status": "ok"}
+
+ @register_endpoint("/data", method="GET")
+ def get_data(self, key: str):
+ value = self.store.get(key, None)
+ return HTTPStatusCode.OK, {"value": value}
+```
+
+### Making Requests
+
+From within a service, you can send requests using:
+
+- [get][eclypse.remote.communication.rest.interface.EclypseREST.get]
+- [post][eclypse.remote.communication.rest.interface.EclypseREST.post]
+- [put][eclypse.remote.communication.rest.interface.EclypseREST.put]
+- [delete][eclypse.remote.communication.rest.interface.EclypseREST.delete]
+
+```python title="Example: Make a POST request to another service"
+""" ... inside the step() method of service-A """
+
+await self.rest.post("StoreService/data", key="item1", value=42)
+```
+
+Each method returns an HTTP request object. When awaited, the request is
+executed and the object exposes:
+
+- `status_code`
+- `body`
+- `response`
+- `route`
+
+For example:
+
+```python
+request = await self.rest.post("StoreService/data", key="item1", value=42)
+print(request.status_code)
+print(request.body)
+```
+
+### Endpoint Resolution
+
+When a REST service starts, it scans all decorated methods using
+[`@register_endpoint()`][eclypse.remote.communication.rest.interface.register_endpoint]
+and registers them dynamically. Endpoint URLs are scoped per service ID: the
+final URL is prefixed by the service name.
+
+For example, if a service `s1` exposes `/data`, the full URL is: `s1/data`.
+
+Routing and delivery are managed by the infrastructure runtime.
diff --git a/docs/overview/advanced/index.md b/docs/overview/advanced/index.md
new file mode 100644
index 00000000..02d4a12d
--- /dev/null
+++ b/docs/overview/advanced/index.md
@@ -0,0 +1,26 @@
+# Advanced topics
+
+
+
+- :octicons-workflow-16: **[Triggers](triggers.md)**
+
+ ---
+
+ Learn how to define and use **triggers** to activate complex workflows in your simulation.
+ Explore built-in triggers or create your own custom triggers to suit your simulation needs.
+
+- :octicons-codespaces-16: **[Emulation](emulation/index.md)**
+
+ ---
+
+ Move from abstract simulations to remote service execution with
+ real service logic and explicit communication interfaces.
+
+- :octicons-log-16: **[Reporting](reporting.md)**
+
+ ---
+
+ Define metrics, choose storage formats, and access results through
+ the report API and dataframe backends.
+
+
diff --git a/docs/overview/advanced/reporting.md b/docs/overview/advanced/reporting.md
new file mode 100644
index 00000000..0d8420d2
--- /dev/null
+++ b/docs/overview/advanced/reporting.md
@@ -0,0 +1,213 @@
+# Reporting
+
+ECLYPSE provides a reporting pipeline with three moving parts:
+
+1. **Define what to report** through metrics,
+2. **choose how to persist it** through report formats and reporters,
+3. **load and query the results** through [Report][eclypse.report.report.Report].
+
+## Defining Metrics
+
+Metrics are reportable events that collect and return structured data during the simulation.
+Technically, they are events with the
+[METRIC][eclypse.workflow.event.role.EventRole.METRIC] role, exposed through the
+`@metric.` decorators provided in [eclypse.report.metrics][eclypse.report.metrics].
+
+Metrics, callbacks, and regular events all share the same event engine, but they serve
+different purposes:
+
+- regular events drive the workflow,
+- callbacks attach post-event logic without making reporting the primary goal,
+- metrics attach post-event logic whose output is intended to be written by reporters.
+
+This distinction matters because a metric is both:
+
+- a post-event hook, so it can access the triggering event payload,
+- a reporting primitive, so its return value is prepared for the reporting pipeline.
+
+By contrast, a plain callback can inspect the same context, but it is mainly meant for
+workflow composition or transient post-processing.
+
+There are 7 decorators corresponding to different metric types:
+
+- [simulation][eclypse.report.metrics.metric.simulation]
+- [infrastructure][eclypse.report.metrics.metric.infrastructure]
+- [node][eclypse.report.metrics.metric.node]
+- [link][eclypse.report.metrics.metric.link]
+- [application][eclypse.report.metrics.metric.application]
+- [service][eclypse.report.metrics.metric.service]
+- [interaction][eclypse.report.metrics.metric.interaction]
+
+See [Scheduled event decorators](../concepts/events.md#event-decorator) for details on scheduled event helpers. A metric lets
+you specify:
+
+- **What data to collect**
+- **How often to report** (using [triggers](triggers.md))
+- **How to report it** (via the `report` argument)
+
+Example:
+
+```python title="Example of an application metric returning the number of its services"
+from eclypse.report.metrics import metric
+
+@metric.application(activates_on=["step"], report=["csv", "json"])
+def my_metric(application, placement, infrastructure):
+ return len(application.nodes)
+```
+
+!!! note
+
+ Metrics are executed like events, and use the same underlying logic, including support for cascade triggers and trigger conditions.
+
+### Custom metric recipe
+
+Use the metric decorator that matches the object you want to inspect, choose
+when it activates, and return a single scalar value.
+
+```python title="Custom service metric"
+from eclypse.report.metrics import metric
+
+@metric.service(activates_on="step", report=["csv"])
+def requested_cpu(service_id, requirements, placement, infrastructure):
+ return requirements["cpu"]
+```
+
+The reporting pipeline fills the identifier columns of the report itself (for a
+service metric, `application_id` and `service_id`), records the event
+metadata, and stores the returned value in the `value` column. Returning
+`None` skips the row.
+
+!!! warning
+
+ Every report has a single `value` column, so a metric must not return a
+ mapping or a tuple: their items would become extra fields that do not fit
+ the report schema. To report several quantities, define one metric for each.
+
+### Metric and callback types
+
+The metric decorators mirror the same event types used by regular events. The event type
+still determines what your logic receives:
+
+- `simulation` metrics receive `triggering_event`,
+- `application` metrics receive `application`, `placement`, and `infrastructure`,
+- `service` metrics receive `service_id`, `requirements`, `placement`, and
+ `infrastructure`,
+- `service` metrics with `remote=True` receive a remote
+ [Service][eclypse.remote.service.service.Service] instance,
+- `interaction` metrics receive `source_id`, `target_id`, `requirements`,
+ `placement`, and `infrastructure`,
+- `infrastructure` metrics receive `infrastructure` and `placement_view`,
+- `node` metrics receive `node_id`, `resources`, `placements`,
+ `infrastructure`, and `placement_view`,
+- `link` metrics receive `source_id`, `target_id`, `resources`,
+ `placements`, `infrastructure`, and `placement_view`.
+
+Callbacks follow the same type-based signatures. The difference is therefore not the
+arguments they receive, but the role they play in the workflow and whether their output
+is meant to be reported.
+
+
+## Report storage formats and reporters
+
+ECLYPSE separates **storage formats** from **reporters**.
+
+The storage format is selected through
+[SimulationConfig][eclypse.simulation.config.SimulationConfig] and controls how report
+frames are written on disk:
+
+- `csv` for human-readable tabular files,
+- `json` for JSONL outputs,
+- `parquet` for analytical workloads and larger runs.
+
+The `report` argument on an event or metric selects one or more reporter
+types for that specific event. Built-in reporter types cover the common sinks:
+
+- `csv` for human-readable tabular files,
+- `json` for JSONL outputs,
+- `parquet` for analytical workloads and larger runs,
+- `tensorboard` for TensorBoard-compatible metrics.
+
+For CSV, JSON, and Parquet, the reporter type usually matches the configured
+storage format. TensorBoard is different: it is a reporter sink, not a dataframe
+storage format loaded later through [Report][eclypse.report.report.Report].
+
+You can also implement your own
+[Reporter][eclypse.report.reporter.Reporter] subclass if you want to persist data
+to a different sink such as a database or a live dashboard.
+
+## Default Reporters
+
+ECLYPSE includes a set of built-in reporters:
+
+- [Reporter][eclypse.report.reporter.Reporter]
+- [CSVReporter][eclypse.report.reporters.csv.CSVReporter]
+- [JSONReporter][eclypse.report.reporters.json.JSONReporter]
+- [ParquetReporter][eclypse.report.reporters.parquet.ParquetReporter]
+- [TensorBoardReporter][eclypse.report.reporters.tensorboard.TensorBoardReporter]
+
+In most cases you do not instantiate them manually. Instead, you select the
+desired reporter types through metric/event configuration and let the
+simulation resolve the built-in reporters automatically.
+
+!!! info "Important"
+
+ When implementing custom reporters that write to the filesystem, use
+ [aiofiles](https://github.com/Tinche/aiofiles) for asynchronous file
+ operations. This keeps reporting from blocking the simulation loop.
+
+ ```python title="Example: usage of aiofiles"
+ import aiofiles
+
+ async with aiofiles.open(self.report_path / "data.csv", "a") as f:
+ await f.write("some,data,to,write\n")
+ ```
+
+## Choosing a report backend
+
+The [Report][eclypse.report.report.Report] class can use multiple dataframe
+backends:
+
+- `pandas`
+- `polars`
+- `polars_lazy`
+
+Choose the backend through
+[SimulationConfig][eclypse.simulation.config.SimulationConfig] or directly when loading a
+report from disk.
+
+## Accessing reports
+
+After the simulation, you can access the results using the
+[Report][eclypse.report.report.Report] object.
+
+Example usage:
+
+```python title="Accessing reported data"
+from eclypse.report import Report
+
+report = Report("./output")
+df = report.service(application_ids="app1", service_ids="srv2")
+```
+
+For a quick run summary, call
+[describe][eclypse.report.report.Report.describe]:
+
+```python
+print(report.describe())
+# 84 rows x 10 steps x 12 metrics | 5 applications | ...
+```
+
+Each accessor method supports filtering by:
+
+- `report_range` (e.g., only events between 10 and 100)
+- `report_step` (e.g., one point every N events)
+- event IDs, application IDs, node/service/link IDs, etc.
+
+!!! tip
+
+ If you need a generic entry point, use
+ [frame][eclypse.report.report.Report.frame]:
+
+ ```python
+ report.frame("application")
+ ```
diff --git a/docs/overview/advanced/triggers.md b/docs/overview/advanced/triggers.md
new file mode 100644
index 00000000..5c30a183
--- /dev/null
+++ b/docs/overview/advanced/triggers.md
@@ -0,0 +1,135 @@
+# Triggers
+
+Triggers are conditions that determine **when an event should fire** during the simulation.
+
+Each trigger must implement a [trigger][eclypse.workflow.trigger.trigger.Trigger.trigger]
+method that returns `True` if the event should be executed at that moment.
+Triggers that need internal state can also override
+[prepare][eclypse.workflow.trigger.trigger.Trigger.prepare] and
+[reset][eclypse.workflow.trigger.trigger.Trigger.reset].
+
+ECLYPSE provides both:
+
+- **basic triggers**, which depend on time, probability, or simulation conditions.
+- **cascade triggers**, which depend on the firing of **other events**.
+
+The tables below compares all available trigger types:
+
+**Base Triggers**
+
+| Type | Description | Parameters |
+| --- | --- | --- |
+| [Trigger][eclypse.workflow.trigger.trigger.Trigger] | Abstract base class. Must override `trigger()`. | *(none)* |
+| [PeriodicTrigger][eclypse.workflow.trigger.trigger.PeriodicTrigger] | Fires every fixed amount of wall-clock time. | `trigger_every_ms: float` |
+| [ScheduledTrigger][eclypse.workflow.trigger.trigger.ScheduledTrigger] | Fires at predefined wall-clock offsets. | `scheduled_timedelta: timedelta \| List[timedelta]` |
+| [RandomTrigger][eclypse.workflow.trigger.trigger.RandomTrigger] | Fires randomly with given probability at each evaluation. | `probability: float` `seed: int (optional)` |
+
+**Cascade Triggers**
+
+| Type | Description | Parameters |
+| --- | --- | --- |
+| [CascadeTrigger][eclypse.workflow.trigger.cascade.CascadeTrigger] | Fires when another event (by name) is triggered. | `trigger_event: str` |
+| [PeriodicCascadeTrigger][eclypse.workflow.trigger.cascade.PeriodicCascadeTrigger] | Fires every N times a specific event is triggered. | `trigger_event: str` `every_n_triggers: int` |
+| [ScheduledCascadeTrigger][eclypse.workflow.trigger.cascade.ScheduledCascadeTrigger] | Fires at specific counts of another event's triggers. | `trigger_event: str` `scheduled_times: List[int]` |
+| [RandomCascadeTrigger][eclypse.workflow.trigger.cascade.RandomCascadeTrigger] | Fires randomly when a specific event is triggered. | `trigger_event: str` `probability: float` `seed: int (optional)` |
+
+## Define triggers in scheduled decorators
+
+You can define cascade triggers more compactly, using the `activates_on` parameter
+in the [scheduled event decorators](../concepts/events.md#event-decorator):
+
+| Syntax | Equivalent trigger |
+| --- | --- |
+| `"event_name"` | CascadeTrigger("event_name") |
+| `("event_name", 3)` | PeriodicCascadeTrigger("event_name", 3) |
+| `("event_name", [5, 10])` | ScheduledCascadeTrigger("event_name", [5, 10]) |
+| `("event_name", 0.2)` | RandomCascadeTrigger("event_name", 0.2) |
+
+## Schedule helpers
+
+For the most common scheduling cases, import the helper decorators directly
+from [eclypse.workflow][eclypse.workflow]:
+
+```python
+from eclypse.workflow import after, every, once_at
+
+@every(steps=5, event_type="simulation")
+def heartbeat(triggering_event):
+ return {"value": triggering_event.n_triggers}
+
+@after(step=10)
+def warmup_complete():
+ return {"value": True}
+
+@once_at(step=60)
+def final_checkpoint():
+ return {"value": True}
+```
+
+`@every` creates a
+[PeriodicCascadeTrigger][eclypse.workflow.trigger.cascade.PeriodicCascadeTrigger] on the default
+simulation driving event.
+`@after` and `@once_at` create
+[ScheduledCascadeTrigger][eclypse.workflow.trigger.cascade.ScheduledCascadeTrigger] instances and
+default to one firing.
+
+## Trigger lifecycle
+
+The simulator prepares every registered trigger bucket before the run starts.
+The state machine is:
+
+1. `prepare()`: allocate state such as scheduled timestamps or random-number
+ generators.
+2. `trigger(...)`: evaluate whether the event should fire.
+3. event execution.
+4. `reset()`: update post-execution state before the next evaluation.
+
+If you implement a custom trigger that depends on prepared state, raise a clear
+error from `trigger()` when `prepare()` has not been called. This mirrors the
+built-in scheduled and random triggers.
+
+## Having multiple triggers
+
+When an event is associated with **multiple triggers**, the `activates_on` parameter determines how they combine to activate the event:
+
+- `any` (default): the event will fire if **at least one** of the triggers fires.
+- `all`: the event will fire **only if all** triggers fire at the same time.
+
+```python title="Example: Using multiple triggers with different conditions"
+from eclypse.workflow import every
+from eclypse.workflow.trigger import CascadeTrigger
+
+@every(
+ steps=5,
+ event_type="application",
+ triggers=[
+ CascadeTrigger("check_resources"),
+ ],
+ trigger_condition="any" # event fires on either
+)
+def log_app_health(application, placement, infrastructure, **event_data):
+ ...
+```
+
+For more particular workflows, subclass
+[EclypseEvent][eclypse.workflow.event.event.EclypseEvent] and pass custom triggers to
+`super().__init__`:
+
+```python
+from eclypse.workflow.event import EclypseEvent
+from eclypse.workflow.trigger import CascadeTrigger, PeriodicCascadeTrigger
+
+class Monitor(EclypseEvent):
+ def __init__(self):
+ super().__init__(
+ name="monitor",
+ triggers=[
+ PeriodicCascadeTrigger("enact", 5),
+ CascadeTrigger("step"),
+ ],
+ trigger_condition="all", # fires only if both trigger
+ )
+
+ def __call__(self, triggering_event):
+ return {"source": triggering_event.name}
+```
diff --git a/docs/overview/concepts/assets.md b/docs/overview/concepts/assets.md
new file mode 100644
index 00000000..a13b7bf3
--- /dev/null
+++ b/docs/overview/concepts/assets.md
@@ -0,0 +1,191 @@
+# Assets
+
+In ECLYPSE, an [Asset][eclypse.graph.assets.asset.Asset] represents either:
+
+- a *capability* of a network node or link (e.g. CPU, bandwidth, availability), or
+- a *requirement* of an application service or communication (e.g. latency constraint, required RAM)
+
+Assets are central to the simulation's logic, as they define how infrastructure and applications interact and match over time.
+
+There are two ways to choose which asset to use:
+
+
+
+- **[Extend the Asset class](#extend-assets)**
+
+ ---
+
+ Subclass the abstract [Asset][eclypse.graph.assets.asset.Asset] base class or one of the built-in specialisations.
+
+- **[Default assets](#default-assets)**
+
+ ---
+
+ Leverage ready-made implementations (e.g., CPU, RAM, latency, bandwidth, ...).
+
+
+
+## Extend the Asset class { #extend-assets }
+
+The base class [Asset][eclypse.graph.assets.asset.Asset] defines the interface and behaviour of all asset types. It provides:
+
+- **initialisation** via value, function, or sampling space.
+- a **total ordering** for comparison.
+- abstract methods for logic: [aggregate][eclypse.graph.assets.asset.Asset.aggregate], [satisfies][eclypse.graph.assets.asset.Asset.satisfies], [is_consistent][eclypse.graph.assets.asset.Asset.is_consistent].
+
+!!! info "Important"
+
+ When implementing the logic of a custom asset, always define it from the perspective of a **resource**, not a **requirement**.
+
+ This means you are modelling the available capability of a node or link. ECLYPSE automatically handles the dual interpretation—by calling [flip][eclypse.graph.assets.asset.Asset.flip], when assets are used as service requirements during placement.
+
+ Designing assets as requirements will lead to incorrect compatibility or aggregation behaviour.
+
+You can extend it to implement your own logic:
+
+```python
+from eclypse.graph.assets import Asset
+
+class ThresholdAsset(Asset):
+ def aggregate(self, *assets):
+ return max(assets)
+
+ def satisfies(self, asset, constraint):
+ return asset <= constraint
+
+ def is_consistent(self, asset):
+ return self.lower_bound <= asset <= self.upper_bound
+```
+
+The method [flip][eclypse.graph.assets.asset.Asset.flip] can be overridden to define how the asset changes perspective from *capability* to *requirement*, and vice versa.
+
+
+### Predefined types
+
+ECLYPSE provides several built-in asset classes, each modelling a specific kind of algebra:
+
+- [Additive][eclypse.graph.assets.additive.Additive]: values are aggregated via summation (e.g., cpu, ram).
+- [Multiplicative][eclypse.graph.assets.multiplicative.Multiplicative]: values are aggregated via product (e.g., availability).
+- [Concave][eclypse.graph.assets.concave.Concave]: models assets where the **largest value dominates** the aggregation (e.g. latency).
+- [Convex][eclypse.graph.assets.convex.Convex]: models assets where the **smallest value dominates**. For instance the ingress bandwidth on a node is the minimum of all the featured bandwidths of the links connected to it.
+- [Symbolic][eclypse.graph.assets.symbolic.Symbolic]: for categorical compatibility (e.g. region, label).
+
+??? example "Example: Using an additive asset"
+
+ ```python
+ from eclypse.graph.assets import Additive
+
+ cpu = Additive(
+ lower_bound=0.0,
+ upper_bound=16.0,
+ init_fn_or_value=2.0,
+ functional=False,
+ )
+ ```
+
+!!! tip
+
+ The `functional` flag indicates whether the asset must be considered in placement decisions.
+ By default it is set to `True`.
+
+
+### Initialisation
+
+When defining an asset, you must specify **how its initial value is generated** at the start of the simulation.
+
+This can be done in three ways:
+
+- by providing a **fixed value** (e.g., `2.0`)
+- by passing a **callable** with no arguments (e.g., `lambda: random.choice(...)`)
+- by using an [AssetSpace][eclypse.graph.assets.space.AssetSpace] (e.g.,
+ [Uniform][eclypse.graph.assets.space.Uniform],
+ [Choice][eclypse.graph.assets.space.Choice], etc.)
+
+??? example "Example: Using an AssetSpace"
+
+ ```python
+ from eclypse.graph.assets import Additive
+ from eclypse.graph.assets.space import Uniform
+
+ cpu = Additive(
+ lower_bound=0.0,
+ upper_bound=16.0,
+ init_fn_or_value=Uniform(2.0, 8.0),
+ )
+ ```
+
+Initialisers are used when the graph's initialisation policy (`resource_init` or `requirement_init`) is `"asset_init"`, the default. They are evaluated when a node or edge is added, using the graph's seeded random generator, so sampling is reproducible across runs.
+
+!!! tip
+
+ Values given explicitly to `add_node`/`add_edge` always take precedence. Any other asset takes its initialiser's value (`"asset_init"`, which requires every asset to have one), its lower bound (`"min"`) or its upper bound (`"max"`).
+
+
+### Asset Spaces
+
+An [AssetSpace][eclypse.graph.assets.space.AssetSpace] defines the domain from which an asset's initial value is sampled. These can be subclassed for custom behaviour, or you can use one of the predefined asset spaces included in ECLYPSE:
+
+- [Choice][eclypse.graph.assets.space.Choice]: pick a value from a list of options.
+- [Uniform][eclypse.graph.assets.space.Uniform]: pick a float from a continuous uniform distribution.
+- [IntUniform][eclypse.graph.assets.space.IntUniform]: pick an integer from a uniform range, with optional step.
+- [Sample][eclypse.graph.assets.space.Sample]: pick a sample (list of values) from a population.
+
+??? example "Example: Using a Choice"
+
+ ```python
+ from eclypse.graph.assets.space import Choice
+
+ storage_class = Choice(["fast", "standard", "archival"])
+
+ asset = Symbolic(
+ lower_bound="fast",
+ upper_bound="archival",
+ init_fn_or_value=storage_class,
+ )
+ ```
+
+These classes all implement the `__call__` interface and expect a
+`random.Random` generator, provided automatically by the simulation engine.
+
+!!! note
+
+ You can define your own asset spaces by subclassing [AssetSpace][eclypse.graph.assets.space.AssetSpace] and overriding the `__call__` method.
+
+## Default Assets { #default-assets }
+
+ECLYPSE provides out-of-the-box functions to obtain default asset sets for both nodes and links. These functions simplify the initial setup of simulations by supplying a standard collection of assets.
+
+The available default asset sets are:
+
+- **Node Assets** (provided by the function [get_default_node_assets][eclypse.graph.assets.defaults.get_default_node_assets]):
+
+ - [cpu][eclypse.graph.assets.defaults.cpu]
+ - [gpu][eclypse.graph.assets.defaults.gpu]
+ - [ram][eclypse.graph.assets.defaults.ram]
+ - [storage][eclypse.graph.assets.defaults.storage]
+ - [availability][eclypse.graph.assets.defaults.availability]
+ - [processing_time][eclypse.graph.assets.defaults.processing_time]
+
+- **Edge Assets** (provided by the function [get_default_edge_assets][eclypse.graph.assets.defaults.get_default_edge_assets]):
+
+ - [latency][eclypse.graph.assets.defaults.latency]
+ - [bandwidth][eclypse.graph.assets.defaults.bandwidth]
+
+??? example "Example: Retrieving default Assets"
+
+ ```python
+ from eclypse.graph.assets.defaults import (
+ get_default_node_assets,
+ get_default_edge_assets
+ )
+
+ # Retrieve default assets for a node (e.g. CPU, RAM, GPU, etc.)
+ node_assets = get_default_node_assets()
+
+ # Retrieve default assets for an edge (e.g. latency, bandwidth)
+ edge_assets = get_default_edge_assets()
+
+ # Access individual assets by name
+ print(node_assets["cpu"])
+ print(edge_assets["latency"])
+ ```
diff --git a/docs/overview/concepts/builders.md b/docs/overview/concepts/builders.md
new file mode 100644
index 00000000..8b8375c2
--- /dev/null
+++ b/docs/overview/concepts/builders.md
@@ -0,0 +1,75 @@
+# Builders
+
+Builders create ready-to-use infrastructures, applications, and workflow graphs
+without hiding the underlying model. They return regular
+[Infrastructure][eclypse.graph.infrastructure.Infrastructure] and
+[Application][eclypse.graph.application.Application] objects, so you can still add
+nodes, edges, assets, update policies, and flows afterwards.
+
+## Infrastructure builders
+
+Infrastructure builders live in [eclypse.builders.infrastructure][eclypse.builders.infrastructure]. They
+cover generic graph generators, cloud-edge architecture patterns, and reference
+topologies.
+
+| Category | Builders |
+| --- | --- |
+| Generic generators | [get_star][eclypse.builders.infrastructure.get_star], [get_random][eclypse.builders.infrastructure.get_random], [get_hierarchical][eclypse.builders.infrastructure.get_hierarchical], [get_fat_tree][eclypse.builders.infrastructure.get_fat_tree], [get_b_cube][eclypse.builders.infrastructure.get_b_cube], [get_small_world][eclypse.builders.infrastructure.get_small_world], [get_scale_free][eclypse.builders.infrastructure.get_scale_free] |
+| Architecture patterns | [get_continuum_tiered][eclypse.builders.infrastructure.get_continuum_tiered], [get_mec_5g][eclypse.builders.infrastructure.get_mec_5g], [get_multi_region_wan][eclypse.builders.infrastructure.get_multi_region_wan], [get_industrial_tsn][eclypse.builders.infrastructure.get_industrial_tsn], [get_factory_cells][eclypse.builders.infrastructure.get_factory_cells], [get_vehicular_edge][eclypse.builders.infrastructure.get_vehicular_edge] |
+| References | [get_orion_cev][eclypse.builders.infrastructure.get_orion_cev], [get_topohub][eclypse.builders.infrastructure.get_topohub], [get_topology_zoo][eclypse.builders.infrastructure.get_topology_zoo], [get_sndlib][eclypse.builders.infrastructure.get_sndlib], [get_backbone][eclypse.builders.infrastructure.get_backbone], [get_caida][eclypse.builders.infrastructure.get_caida], [get_gabriel][eclypse.builders.infrastructure.get_gabriel] |
+
+Example:
+
+```python
+from eclypse.builders.infrastructure import get_hierarchical
+
+infrastructure = get_hierarchical(
+ n=30,
+ include_default_assets=True,
+ seed=42,
+)
+```
+
+## Application builders
+
+Application builders live in [eclypse.builders.application][eclypse.builders.application]. They provide
+reference microservice applications and domain-specific pipelines.
+
+Sock Shop is the main reference application used in examples:
+
+```python
+from eclypse.builders.application import get_sock_shop
+
+application = get_sock_shop(
+ include_default_assets=True,
+ seed=42,
+)
+```
+
+For emulation, choose the communication interface when the builder supports
+runtime services:
+
+```python
+application = get_sock_shop(
+ communication_interface="mpi",
+ include_default_assets=True,
+)
+```
+
+## Workflow builders
+
+For simulation-only task DAGs, ECLYPSE also provides
+[get_workflow][eclypse.builders.workflow.get_workflow] in
+[eclypse.builders.workflow][eclypse.builders.workflow]. These builders use WfCommons to generate
+workflow-shaped applications and normalise file-size-derived `storage` and
+dependency `bandwidth` values from bytes to MiB before assigning them to the
+default ECLYPSE assets.
+
+## When to use builders
+
+Use builders when you need a stable scenario quickly: a benchmark, a smoke
+test, or a baseline for policy and placement experiments.
+
+Use manual graph construction when the topology itself is the object of study,
+or when you need exact control over node identities, edge attributes, and asset
+definitions.
diff --git a/docs/overview/concepts/events.md b/docs/overview/concepts/events.md
new file mode 100644
index 00000000..40673555
--- /dev/null
+++ b/docs/overview/concepts/events.md
@@ -0,0 +1,217 @@
+# Events
+
+In ECLYPSE, the simulation workflow is fully driven by **events**.
+Events define units of logic that are executed when one or more **triggers** activate.
+They can be used to update the simulation state, compute metrics, or execute callbacks.
+
+An event can be periodic, conditionally activated, or triggered by another event.
+
+```mermaid
+flowchart TD
+ T["Trigger conditions met"] --> E["Regular event executes"]
+ E --> D["Event payload"]
+ D --> C["Activated callbacks"]
+ D --> M["Activated metrics"]
+ M --> R["Configured reporters"]
+ R --> Q["Report queries"]
+```
+
+An update event can apply configured policies. Callbacks and metrics run after
+the event that activates them. This diagram shows their roles, not a fixed
+ordering between individual callbacks and metrics.
+
+
+ECLYPSE distinguishes between an event's **role** and its **type**:
+
+- the **role** defines *how the event participates in the workflow*,
+- the **type** defines *which objects are passed to the event logic*.
+
+## Roles: events, callbacks, and metrics
+
+Every [EclypseEvent][eclypse.workflow.event.event.EclypseEvent] has an
+[EventRole][eclypse.workflow.event.role.EventRole].
+
+| Role | Meaning |
+| --- | --- |
+| [EVENT][eclypse.workflow.event.role.EventRole.EVENT] | The default role for regular workflow logic. These events are triggered directly by the simulation or by other triggers, and their payload can be consumed by downstream callbacks and metrics. |
+| [CALLBACK][eclypse.workflow.event.role.EventRole.CALLBACK] | A post-event hook. It runs immediately after the event that activated it and has access to that triggering event through `triggering_event` and `**event_data`. Callbacks are primarily useful for chaining logic or reacting to another event. |
+| [METRIC][eclypse.workflow.event.role.EventRole.METRIC] | A reportable post-event hook. Metrics share the same execution model as callbacks, but they are intended to produce rows that reporters can persist and that [Report][eclypse.report.report.Report] can load afterwards. |
+
+In practice:
+
+- use a regular event when you want to drive the workflow,
+- use a callback when you want post-event logic that is mainly internal to the
+ simulation,
+- use a metric when you want post-event logic whose output should be reported.
+
+## Defining an Event
+
+An event can be defined by:
+
+- decorating a function or a class with a `__call__` method
+- subclassing [EclypseEvent][eclypse.workflow.event.event.EclypseEvent] and overriding the `__call__` method
+
+!!! note "See also"
+
+ Events are activated by **Triggers**, which define *when* and *under what
+ conditions* an event should fire, thus at least one trigger must be defined
+ for an event to be activated.
+
+ You can use built-in triggers (e.g., cascade or periodic) or define your own.
+
+ See the [Triggers](../advanced/triggers.md) page for more on how to configure and combine them.
+
+### Event Parameters
+
+Here are the most relevant parameters to control event behaviour:
+
+- `name` *(str)*: The event name.
+- `event_type`: The context where the event executes, such as `"node"` or
+ `"service"`. It can also be `None`.
+- `triggers`: A list of [Trigger][eclypse.workflow.trigger.trigger.Trigger]
+ objects, modelling the conditions that can activate the event.
+- `activates_on`: A more compact way to specify triggers, using a list of strings and tuples
+- `trigger_condition`: Whether all triggers must activate or just one (*"all"* or *"any"*).
+- `role`: The workflow role of the event, chosen from
+ [EventRole][eclypse.workflow.event.role.EventRole].
+- `remote`: If `True`, the event is executed on remote infrastructure nodes or services.
+- `report`: Types of reports to generate for this event, such as `"csv"` or `"json"`.
+ In practice, this is mainly relevant for metrics.
+- `verbose`: If `True`, log detailed event triggering and firing info.
+
+The event **type** determines the arguments passed to its logic function.
+The role does not change the signature; it changes *when* the event runs and *how*
+its output is interpreted.
+
+Specifically:
+
+| Event Type | Parameters |
+| --- | --- |
+| simulation (or None) | `triggering_event` ([EclypseEvent][eclypse.workflow.event.event.EclypseEvent]) |
+| application | `application` ([Application][eclypse.graph.application.Application]) `placement` ([Placement][eclypse.placement.placement.Placement]) `infrastructure` ([Infrastructure][eclypse.graph.infrastructure.Infrastructure]) `**event_data` (*Dict[str, Any]*) |
+| service | `service_id` (*str*) `requirements` (*Dict[str, Any]*) `placement` ([Placement][eclypse.placement.placement.Placement]) `infrastructure` ([Infrastructure][eclypse.graph.infrastructure.Infrastructure]) `**event_data` (*Dict[str, Any]*) |
+| service (with `remote=True`) | `service` ([Service][eclypse.remote.service.service.Service]) |
+| interaction | `source_id` (*str*) `target_id` (*str*) `requirements` (*Dict[str, Any]*) `placement` ([Placement][eclypse.placement.placement.Placement]) `infrastructure` ([Infrastructure][eclypse.graph.infrastructure.Infrastructure]) `**event_data` (*Dict[str, Any]*) |
+| infrastructure | `infrastructure` ([Infrastructure][eclypse.graph.infrastructure.Infrastructure]) `placement_view` ([PlacementView][eclypse.placement.view.PlacementView]) `**event_data` (*Dict[str, Any]*) |
+| node | `node_id` (*str*) `resources` (*Dict[str, Any]*) `placements` (*Dict[str,* [Placement][eclypse.placement.placement.Placement] *]*) `infrastructure` ([Infrastructure][eclypse.graph.infrastructure.Infrastructure]) `placement_view` ([PlacementView][eclypse.placement.view.PlacementView]) `**event_data` (*Dict[str, Any]*) |
+| link | `source_id` (*str*) `target_id` (*str*) `resources` (*Dict[str, Any]*) `placements` (*Dict[str,* [Placement][eclypse.placement.placement.Placement] *]*) `infrastructure` ([Infrastructure][eclypse.graph.infrastructure.Infrastructure]) `placement_view` ([PlacementView][eclypse.placement.view.PlacementView]) `**event_data` (*Dict[str, Any]*) |
+
+!!! note
+
+ `**event_data` contains the payload produced by the event that triggered the
+ current callback or metric. It is therefore most relevant for post-event roles.
+
+When an event is defined for a specific component type, it is automatically executed **once for each matching component** in the model.
+For instance, an `application` event is called once per application in the simulation; a `node` event is called once per infrastructure node, ...
+
+As a result, the event logic should be written as if it handles a **single instance** of the component, not a collection.
+This behavior applies to all events and is especially relevant when defining [metrics](../advanced/reporting.md).
+
+Regular events, callbacks, and metrics can all use the same event types. For example:
+
+- an `application` event can mutate application-level state,
+- an `application` callback can react to the payload of another event,
+- an `application` metric can return application-level report rows.
+
+### Scheduled event decorators { #event-decorator }
+
+The public decorator API exposes the common scheduling shapes directly:
+
+- [`@every(steps=...)`][eclypse.workflow.event.decorator.every] for periodic events,
+- [`@after(step=...)`][eclypse.workflow.event.decorator.after] for delayed events,
+- [`@once_at(step=...)`][eclypse.workflow.event.decorator.once_at] for one-shot events.
+
+These decorators allow you to register both functions and callable classes as
+**simulation events**. You can apply them to:
+
+- a **function**, which becomes the logic of the event,
+- a **class** with a `__call__` method, to maintain internal state.
+
+```python title="Example: Decorating a function"
+from eclypse.workflow.event import every
+
+@every(steps=5, name="step_logger", event_type="simulation")
+def log_step():
+ print("Simulation step")
+```
+
+```python title="Example: Decorating a class"
+from eclypse.workflow.event import once_at
+
+@once_at(step=10, name="step_counter", event_type="simulation")
+class StepCounter:
+ def __init__(self):
+ self.counter = 0
+
+ def __call__(self):
+ self.counter += 1
+ print(f"Step: {self.counter}")
+```
+
+## Callbacks
+
+Callbacks use the same scheduled decorators as regular events, but with a
+different role:
+
+```python title="Example: Defining a callback"
+from eclypse.workflow.event import EventRole, after
+
+@after(
+ step=0,
+ name="after_step",
+ event_type="simulation",
+ activates_on=["step"],
+ role=EventRole.CALLBACK,
+)
+def after_step(triggering_event):
+ print(f"{triggering_event.name} produced {triggering_event.data}")
+```
+
+Callbacks are best suited for:
+
+- chaining workflow logic after another event,
+- deriving transient information from the triggering event,
+- reacting to another event without necessarily reporting the result.
+
+If the scheduling decorators do not fit a particular workflow, define a custom
+event by subclassing [EclypseEvent][eclypse.workflow.event.event.EclypseEvent] and
+overriding `__call__`. This gives full control over construction, state, and
+trigger configuration:
+
+```python title="Example: Custom event class"
+from eclypse.workflow.event import EclypseEvent
+from eclypse.workflow.trigger import CascadeTrigger
+
+class StepAudit(EclypseEvent):
+ def __init__(self):
+ super().__init__(
+ name="step_audit",
+ event_type="simulation",
+ triggers=[CascadeTrigger("step")],
+ )
+
+ def __call__(self, triggering_event):
+ return {"source": triggering_event.name}
+```
+
+## Metrics { #event-metrics }
+
+Metrics are a specialized type of event used to collect simulation data at
+different levels of abstraction (e.g., per iteration, per application, per
+node). Under the hood they are post-event events with the
+[METRIC][eclypse.workflow.event.role.EventRole.METRIC] role, but the
+recommended public API is the set of convenience decorators in
+[eclypse.report.metrics][eclypse.report.metrics].
+
+Compared with callbacks, metrics differ mainly in their intent:
+
+- callbacks are primarily workflow hooks,
+- metrics are reporting hooks and are meant to produce persistable output.
+
+For the practical metric API, built-in report types, custom reporters, and
+report loading, see [Reporting](../advanced/reporting.md).
+
+!!! note "See also"
+
+ - [Reporting](../advanced/reporting.md)
+ - [Triggers](../advanced/triggers.md)
diff --git a/docs/overview/concepts/import-export.md b/docs/overview/concepts/import-export.md
new file mode 100644
index 00000000..19ac6736
--- /dev/null
+++ b/docs/overview/concepts/import-export.md
@@ -0,0 +1,277 @@
+# Import and Export
+
+ECLYPSE provides an import/export layer for moving
+[Infrastructure][eclypse.graph.infrastructure.Infrastructure] and
+[Application][eclypse.graph.application.Application] objects between simulations,
+external tools, and standard infrastructure descriptions.
+
+The IO package is intentionally separated from reporting. Reporters persist data
+produced *during* a simulation. Importers and exporters persist the graph objects
+that are needed *to build* a simulation.
+
+## Basic usage
+
+The public API exposes specialised functions for applications and
+infrastructures:
+
+=== "Application"
+
+ ```python
+ from eclypse.io import dump_application, load_application
+
+ dump_application(application, "application.json")
+ loaded = load_application("application.json")
+ ```
+
+=== "Infrastructure"
+
+ ```python
+ from eclypse.io import dump_infrastructure, load_infrastructure
+
+ dump_infrastructure(infrastructure, "infrastructure.graphml")
+ loaded = load_infrastructure("infrastructure.graphml")
+ ```
+
+In most cases, ECLYPSE infers the format from the file extension. You can also
+select a format explicitly with the `using` argument:
+
+```python
+dump_application(application, "application.yaml", using="docker-compose")
+application = load_application("application.yaml", using="docker-compose")
+
+dump_infrastructure(infrastructure, "infrastructure.yaml", using="tosca")
+infrastructure = load_infrastructure("infrastructure.yaml", using="tosca")
+```
+
+## Supported formats
+
+The built-in [eclypse.io.defaults][eclypse.io.defaults] registry provides default importers and
+exporters for common graph and cloud-edge formats.
+
+| Format | Application | Infrastructure | Main use |
+| --- | --- | --- | --- |
+| [`eclypse-json`][eclypse.io.defaults.json] | :octicons-check-16: | :octicons-check-16: | Lossless ECLYPSE round-trip through [JSONImporter][eclypse.io.defaults.json.JSONImporter] and [JSONExporter][eclypse.io.defaults.json.JSONExporter]. |
+| [`node-link-json`][eclypse.io.defaults.node_link] | :octicons-check-16: | :octicons-check-16: | Portable NetworkX-style graph data. |
+| [`gml`][eclypse.io.defaults.gml] | :octicons-check-16: | :octicons-check-16: | Graph exchange with simple attributes. |
+| [`graphml`][eclypse.io.defaults.graphml] | :octicons-check-16: | :octicons-check-16: | Graph exchange with XML-based tooling. |
+| [`docker-compose`][eclypse.io.defaults.docker_compose] | :octicons-check-16: | :octicons-x-16: | Import or export service-level applications. |
+| [`tosca`][eclypse.io.defaults.tosca] | :octicons-check-16: | :octicons-check-16: | Import or export cloud/service topology templates. |
+
+[`eclypse-json`][eclypse.io.defaults.json] is the canonical ECLYPSE format.
+It stores the graph kind, identifier, graph attributes, node and edge assets,
+nodes, edges, and kind-specific metadata such as application flows or
+infrastructure path aggregators.
+
+Graph formats such as GML, GraphML, and node-link JSON focus on topology and
+serialisable graph attributes. They are useful for interoperability, but they do
+not carry the complete ECLYPSE model in the same way as
+[`eclypse-json`][eclypse.io.defaults.json].
+
+## Docker Compose
+
+Docker Compose files are imported as
+[Application][eclypse.graph.application.Application] objects.
+
+```yaml title="docker-compose.yaml"
+name: video-pipeline
+
+services:
+ camera:
+ image: camera-gateway:latest
+
+ inference:
+ image: inference-service:latest
+ depends_on:
+ - camera
+```
+
+When loaded, each service becomes an application node. The service `image` is
+stored as a node attribute, and Docker Compose `depends_on` becomes a
+directed interaction:
+
+```python
+from eclypse.io import load_application
+
+application = load_application("docker-compose.yaml", using="docker-compose")
+
+application.nodes["camera"]["image"]
+# "camera-gateway:latest"
+
+list(application.edges)
+# [("inference", "camera")]
+```
+
+When exporting to Docker Compose, each application node must define either an
+`image`, a `container_image`, or a `build` attribute. This mirrors the
+operational nature of Docker Compose: ECLYPSE does not silently invent container
+images by default.
+
+```python
+application.add_node("frontend", image="nginx:latest", strict=False)
+dump_application(application, "docker-compose.yaml", using="docker-compose")
+```
+
+If you explicitly want to use the node identifier as a fallback image, pass a
+[DockerComposeContext][eclypse.io.context.DockerComposeContext]:
+
+```python
+from eclypse.io import DockerComposeContext
+
+dump_application(
+ application,
+ "docker-compose.yaml",
+ using="docker-compose",
+ application_context=DockerComposeContext(allow_image_fallback_to_node=True),
+)
+```
+
+ECLYPSE writes optional `x-eclypse` extension fields to preserve metadata such
+as graph attributes, flows, and edge attributes. These fields are standard
+Compose extension fields and are ignored by Docker Compose implementations that
+do not understand them.
+
+## TOSCA
+
+TOSCA files are exported using standard TOSCA Simple Profile YAML types.
+ECLYPSE-specific metadata is stored only under optional `x-eclypse` extension
+fields.
+
+Applications are represented as software components with dependency
+requirements:
+
+```yaml title="application.tosca.yaml"
+tosca_definitions_version: tosca_simple_yaml_1_3
+metadata:
+ template_name: app
+topology_template:
+ node_templates:
+ frontend:
+ type: tosca.nodes.SoftwareComponent
+ requirements:
+ - dependency:
+ node: worker
+ relationship: tosca.relationships.DependsOn
+ worker:
+ type: tosca.nodes.SoftwareComponent
+```
+
+Infrastructures are represented with TOSCA compute, network, and port node
+templates:
+
+```yaml title="infrastructure.tosca.yaml"
+tosca_definitions_version: tosca_simple_yaml_1_3
+metadata:
+ template_name: infra
+topology_template:
+ node_templates:
+ node_a:
+ type: tosca.nodes.Compute
+ capabilities:
+ host:
+ properties:
+ num_cpus: 4
+ mem_size: 8 GB
+ private_net:
+ type: tosca.nodes.network.Network
+ port_a:
+ type: tosca.nodes.network.Port
+ requirements:
+ - binding:
+ node: node_a
+ relationship: tosca.relationships.HostedOn
+ - link:
+ node: private_net
+ relationship: tosca.relationships.network.LinksTo
+```
+
+By default, [TOSCAImporter][eclypse.io.defaults.tosca.TOSCAImporter] validates fields
+required by the service template: `tosca_definitions_version` must be present,
+and each node template must define a `type`.
+
+## Contexts
+
+Contexts customise import and export without changing the graph classes. Common
+options live in [IOContext][eclypse.io.context.IOContext]; application and
+infrastructure-specific options live in specialised contexts.
+
+| Context | Purpose |
+| --- | --- |
+| [ApplicationContext][eclypse.io.context.ApplicationContext] | Application import/export defaults, including services and requirement initialisation. |
+| [InfrastructureContext][eclypse.io.context.InfrastructureContext] | Infrastructure import/export defaults, including resource initialisation and path aggregators. |
+| [DockerComposeContext][eclypse.io.context.DockerComposeContext] | Docker Compose validation and image/build fallback behaviour. |
+| [TOSCAApplicationContext][eclypse.io.context.TOSCAApplicationContext] | TOSCA validation options for applications. |
+| [TOSCAInfrastructureContext][eclypse.io.context.TOSCAInfrastructureContext] | TOSCA validation options for infrastructures. |
+
+For example, a TOSCA file without the mandatory version can be accepted only by
+making that choice explicit:
+
+```python
+from eclypse.io import TOSCAApplicationContext, load_application
+
+application = load_application(
+ "legacy.yaml",
+ using="tosca",
+ application_context=TOSCAApplicationContext(
+ require_definitions_version=False,
+ ),
+)
+```
+
+## Custom importers and exporters
+
+Importers and exporters are regular classes based on abstract base classes:
+
+- [GraphImporter][eclypse.io.base.GraphImporter]
+- [GraphExporter][eclypse.io.base.GraphExporter]
+
+An exporter converts a graph to an intermediate representation and writes it to
+a target. An importer reads a source into an intermediate representation and
+builds a graph from it.
+
+```python
+from eclypse.io import GraphExporter
+
+class MyApplicationExporter(GraphExporter):
+ def to_data(self, graph, *, context=None):
+ return {"nodes": list(graph.nodes)}
+
+ def write_data(self, data, target, *, context=None):
+ ...
+```
+
+You can pass custom classes directly, without registering them globally:
+
+```python
+dump_application(application, "application.myfmt", using=MyApplicationExporter)
+```
+
+If you want reusable names, create or extend an
+[IORegistry][eclypse.io.registry.IORegistry]. Registries are immutable: methods such
+as [with_exporter][eclypse.io.registry.IORegistry.with_exporter] return a new
+registry instead of changing the existing one. The default registry stores
+handler classes rather than handler instances, so importers and exporters are
+created only when they are used.
+
+```python
+from eclypse.io import IORegistry, dump_application
+
+registry = IORegistry().with_exporter(
+ "application",
+ "my-format",
+ MyApplicationExporter,
+)
+
+dump_application(
+ application,
+ "application.myfmt",
+ using="my-format",
+ registry=registry,
+)
+```
+
+!!! tip
+
+ Use [`eclypse-json`][eclypse.io.defaults.json] when you need a complete
+ ECLYPSE round-trip. Use Docker Compose, TOSCA, GraphML, GML, or node-link
+ JSON when interoperability with external tools matters more than preserving
+ every simulator-specific detail.
diff --git a/docs/overview/concepts/index.md b/docs/overview/concepts/index.md
new file mode 100644
index 00000000..b3264f89
--- /dev/null
+++ b/docs/overview/concepts/index.md
@@ -0,0 +1,64 @@
+# Concepts
+
+This section collects the building blocks of ECLYPSE.
+
+Use these pages once you already know the basic workflow and want to customise
+how a simulation behaves, what it models, and how it is configured.
+
+
+
+- **[Topology](topology.md)**
+
+ ---
+
+ Build graph-based infrastructures and applications, either manually or
+ through builders.
+
+- **[Assets](assets.md)**
+
+ ---
+
+ Understand how capabilities and requirements are represented, validated,
+ and sampled.
+
+- **[Builders](builders.md)**
+
+ ---
+
+ Start from built-in infrastructures, applications, and workflow-shaped
+ task graphs.
+
+- **[Import and export](import-export.md)**
+
+ ---
+
+ Persist, exchange, and reload infrastructures and applications using
+ ECLYPSE-native and standard graph formats.
+
+- **[Placement strategies](placement-strategy.md)**
+
+ ---
+
+ Control how services are mapped onto the available infrastructure.
+
+- **[Update policies](update-policy.md)**
+
+ ---
+
+ Model how infrastructure and application resources evolve during the run.
+
+- **[Events, callbacks, and metrics](events.md)**
+
+ ---
+
+ Learn the event model, event roles, event types, and trigger-based
+ execution.
+
+- **[Simulation configuration](simulation-configuration.md)**
+
+ ---
+
+ Configure timing, reporting, logging, remote execution, and the event
+ set used by a simulation run.
+
+
diff --git a/docs/overview/concepts/placement-strategy.md b/docs/overview/concepts/placement-strategy.md
new file mode 100644
index 00000000..0adebe16
--- /dev/null
+++ b/docs/overview/concepts/placement-strategy.md
@@ -0,0 +1,127 @@
+# Placement Strategy
+
+In ECLYPSE, a [PlacementStrategy][eclypse.placement.strategies.PlacementStrategy]
+defines how application services are assigned to infrastructure nodes.
+Placement can be performed globally across the infrastructure, or separately
+for each application.
+
+Placement strategies are responsible for implementing the logic that maps application *requirements* to infrastructure *capabilities*. These strategies are executed during the simulation setup or runtime to compute service-to-node allocations.
+
+There are two ways to choose which strategy to use:
+
+
+
+- **[Extend the PlacementStrategy class](#extend-strategy)**
+
+ ---
+
+ Subclass the abstract
+ [PlacementStrategy][eclypse.placement.strategies.PlacementStrategy] base
+ class or one of the built-in specialisations.
+
+- **[Default strategies](#default-strategies)**
+
+ ---
+
+ Leverage ready-made strategies for common placement scenarios.
+
+
+
+## Extend the PlacementStrategy class { #extend-strategy }
+
+To define a custom placement strategy, subclass the base class
+[PlacementStrategy][eclypse.placement.strategies.PlacementStrategy] and override
+the
+[place][eclypse.placement.strategies.PlacementStrategy.place]
+method.
+
+This method must return a mapping from **service IDs** to **node IDs**,
+representing where each service in the application should be deployed.
+
+```python
+from eclypse.placement.strategies import PlacementStrategy
+
+class RandomStrategy(PlacementStrategy):
+ def place(self, infrastructure, application, placements, placement_view):
+ import random
+ candidate_nodes = list(placement_view.residual.nodes)
+ return {
+ service_id: random.choice(candidate_nodes)
+ for service_id in application.nodes
+ }
+
+ # Optionally override feasibility check
+ def is_feasible(self, infrastructure, application):
+ return len(list(infrastructure.available.nodes)) > 0
+```
+
+!!! info "Important"
+
+ The `infrastructure` parameter passed to the
+ [place][eclypse.placement.strategies.PlacementStrategy.place]
+ method is **already filtered** to include only the available portion of the
+ infrastructure.
+
+ This corresponds to calling the
+ [available][eclypse.graph.infrastructure.Infrastructure.available] property
+ on the [Infrastructure][eclypse.graph.infrastructure.Infrastructure] instance.
+ Therefore, you do not need to manually filter out unavailable resources.
+
+## Default strategies { #default-strategies }
+
+ECLYPSE provides a collection of predefined placement strategies that can be
+used out of the box. These strategies implement common policies and heuristics
+for mapping application services onto available nodes.
+
+The available default strategies are:
+
+- [RoundRobinStrategy][eclypse.placement.strategies.RoundRobinStrategy] — assigns services to nodes in a round-robin fashion.
+- [RandomStrategy][eclypse.placement.strategies.RandomStrategy] — randomly selects a node for each service.
+- [StaticStrategy][eclypse.placement.strategies.StaticStrategy] — expects service-to-node mappings to be provided statically.
+- [FirstFitStrategy][eclypse.placement.strategies.FirstFitStrategy] — places services on the first node that satisfies their requirements.
+- [BestFitStrategy][eclypse.placement.strategies.BestFitStrategy] — selects the node with the tightest fit (smallest surplus) for each service.
+
+## Attaching a Placement Strategy
+
+To use a placement strategy during simulation, provide it either as the
+simulation default or for a specific application registration.
+
+There are two ways to attach a strategy:
+
+- **Via
+ [default_strategy][eclypse.simulation.config.SimulationConfig.default_strategy]:**
+ Use this when most applications should share the same placement policy:
+
+ ```python
+ from eclypse.placement.strategies import RandomStrategy
+ from eclypse.simulation import Simulation, SimulationConfig
+
+ config = SimulationConfig(default_strategy=RandomStrategy())
+ sim = Simulation(infrastructure, config)
+ sim.register(application)
+ ```
+
+- **Via the application registration:**
+ You can associate a strategy when registering the application with the
+ simulation using the
+ [register][eclypse.simulation.simulation.Simulation.register]
+ method:
+
+ ```python
+ from eclypse.simulation import Simulation
+ from eclypse.placement.strategies import FirstFitStrategy
+
+ sim = Simulation(...)
+ sim.register(application, FirstFitStrategy())
+ ```
+
+!!! info "Important"
+
+ If no strategy is provided through
+ [default_strategy][eclypse.simulation.config.SimulationConfig.default_strategy] or
+ [register][eclypse.simulation.simulation.Simulation.register], the
+ simulation raises an error.
+
+ If both are provided, the strategy passed to
+ [register][eclypse.simulation.simulation.Simulation.register] takes
+ precedence for that application.
diff --git a/docs/overview/concepts/simulation-configuration.md b/docs/overview/concepts/simulation-configuration.md
new file mode 100644
index 00000000..00d9948e
--- /dev/null
+++ b/docs/overview/concepts/simulation-configuration.md
@@ -0,0 +1,212 @@
+# Simulation configuration
+
+The simulation represents the environment where you can deploy and emulate your
+application on the given infrastructure.
+
+After you [define your application(s) and infrastructure](topology.md), a
+simulation run is controlled through
+[SimulationConfig][eclypse.simulation.config.SimulationConfig].
+
+At a high level, the configuration answers four questions:
+
+- how the run advances and stops,
+- which events and metrics are included,
+- how logs and reports are written,
+- whether execution is local or remote.
+
+## Typical workflow
+
+The usual flow is:
+
+1. create a [SimulationConfig][eclypse.simulation.config.SimulationConfig],
+2. create a [Simulation][eclypse.simulation.simulation.Simulation],
+3. register one or more applications with a placement strategy,
+4. run the simulation and wait for completion.
+
+```python
+from eclypse.placement.strategies import RandomStrategy
+from eclypse.simulation import Simulation, SimulationConfig
+
+config = SimulationConfig(
+ max_steps=50,
+ include_default_metrics=True,
+ report_format="parquet",
+ report_backend="polars",
+ path="my-simulation",
+ seed=42,
+)
+
+simulation = Simulation(example_infra, config)
+simulation.register(example_app, RandomStrategy(seed=42))
+
+simulation.run()
+
+application_frame = simulation.report.application()
+```
+
+## Configuration reference
+
+The table below summarises every public parameter of
+[SimulationConfig][eclypse.simulation.config.SimulationConfig].
+
+| Parameter | Default | Meaning |
+| --- | --- | --- |
+| `step_every_ms` | `"auto"` | Controls how the driving `enact` event is scheduled. Use `"auto"` for continuous local progression, `"manual"` or `None` for fully manual stepping, or a numeric value for a fixed periodic step. In remote mode, `"auto"` resolves to manual stepping unless a numeric cadence is provided. |
+| `timeout` | `None` | Stops the simulation after the given number of seconds. |
+| `max_steps` | `None` | Stops the simulation after the given number of driving-event triggers. |
+| `reporters` | `None` | Additional reporter classes to merge with the built-in reporter set. This is mainly useful when writing custom reporting sinks. |
+| `events` | `None` | Explicit event list for the simulation. Default lifecycle events are still added automatically when missing. |
+| `include_default_metrics` | `False` | Adds the built-in metrics shipped by ECLYPSE to the event set. |
+| `default_strategy` | `None` | Placement strategy used for applications registered without an explicit strategy. Per-application strategies passed to [register][eclypse.simulation.simulation.Simulation.register] take precedence. |
+| `seed` | random | Seed used for deterministic sampling and reproducible scenarios. |
+| `path` | default simulation path | Output directory used for logs, reports, and `config.json`. |
+| `log_to_file` | `False` | If enabled, runtime logs are also written to the simulation output path. |
+| `log_level` | `"ECLYPSE"` | Minimum log level used by the runtime logger. |
+| `report_chunk_size` | `100` | Number of report entries buffered before each reporter flush. |
+| `report_format` | `"csv"` | On-disk report format. Built-in options are `"csv"`, `"json"`, and `"parquet"`. |
+| `report_backend` | `"pandas"` | Dataframe backend used when querying reports through [Report][eclypse.report.report.Report]. |
+| `remote` | `False` | Enables emulation mode. It can be a boolean or a [RemoteBootstrap][eclypse.remote.bootstrap.bootstrap.RemoteBootstrap] instance for custom remote cluster setup. |
+
+### Timing and stopping
+
+Use `step_every_ms`, `timeout`, and `max_steps` together to control how a
+run advances and when it stops.
+
+```python
+config = SimulationConfig(
+ step_every_ms=500,
+ timeout=60,
+ max_steps=120,
+)
+```
+
+This configuration asks the simulation to:
+
+- progress every half second,
+- stop after one minute,
+- or stop earlier if 120 steps are reached first.
+
+If you want manual progression instead, opt in explicitly:
+
+```python
+config = SimulationConfig(step_every_ms=None)
+```
+
+and then advance the run explicitly with
+[step][eclypse.simulation.simulation.Simulation.step].
+
+### Events and metrics
+
+By default, you can supply your own event list through `events` and decide
+whether to include the built-in metrics:
+
+```python
+from eclypse.report.metrics.defaults import get_default_metrics
+
+config = SimulationConfig(
+ events=[my_event, my_callback, my_metric],
+ include_default_metrics=False,
+)
+```
+
+If you prefer the default metrics as a starting point:
+
+```python
+config = SimulationConfig(include_default_metrics=True)
+```
+
+For more on event roles and event types, see [Events](events.md).
+
+### Logging and output paths
+
+The output path and logging parameters are useful when you want reproducible,
+inspectable runs:
+
+```python
+config = SimulationConfig(
+ path="runs/baseline-a",
+ log_level="INFO",
+ log_to_file=True,
+ seed=42,
+)
+```
+
+!!! tip
+
+ ECLYPSE uses [Loguru](https://loguru.readthedocs.io/) under the hood for
+ logging. It preserves the standard levels (`DEBUG`, `INFO`,
+ `WARNING`, etc.) and adds `ECLYPSE` between `DEBUG` and `INFO` for
+ framework-specific runtime messages.
+
+### Reporting
+
+Two parameters shape the reporting workflow:
+
+- `report_format` controls what is written to disk,
+- `report_backend` controls what kind of frame object you get back later.
+
+```python
+config = SimulationConfig(
+ report_format="parquet",
+ report_backend="polars_lazy",
+ report_chunk_size=500,
+ include_default_metrics=True,
+)
+```
+
+This is a good fit for larger runs where you want efficient on-disk storage and
+lazy analytical queries afterwards.
+
+See also:
+
+- [Inspect the results](../getting-started/inspect-results.md)
+- [Reporting](../advanced/reporting.md)
+
+### Remote execution
+
+Set `remote=True` to enable the default emulation bootstrap:
+
+```python
+config = SimulationConfig(remote=True)
+```
+
+If you need more control, pass a
+[RemoteBootstrap][eclypse.remote.bootstrap.bootstrap.RemoteBootstrap] instance:
+
+```python
+from eclypse.remote.bootstrap import RemoteBootstrap
+
+bootstrap = RemoteBootstrap()
+config = SimulationConfig(remote=bootstrap)
+```
+
+This is the entry point for running remote services over Ray. For the runtime
+details, see [Emulation](../advanced/emulation/emulation.md).
+
+## Using the configuration in a simulation
+
+Once the configuration is ready, pass it to
+[Simulation][eclypse.simulation.simulation.Simulation], then register your
+applications together with a placement strategy:
+
+```python
+from eclypse.placement.strategies import RandomStrategy
+from eclypse.simulation import Simulation
+
+simulation = Simulation(example_infra, config)
+simulation.register(example_app, RandomStrategy(seed=42))
+
+simulation.run()
+```
+
+When the run finishes, the [report][eclypse.simulation.simulation.Simulation.report]
+property exposes a [Report][eclypse.report.report.Report] object:
+
+```python
+application_frame = simulation.report.application()
+generic_frame = simulation.report.frame("service")
+```
+
+!!! note
+
+ Looking for complete runnable scenarios? See [Examples](../examples/index.md).
diff --git a/docs/overview/concepts/topology.md b/docs/overview/concepts/topology.md
new file mode 100644
index 00000000..c4779aec
--- /dev/null
+++ b/docs/overview/concepts/topology.md
@@ -0,0 +1,200 @@
+# Infrastructure and Application(s)
+
+In ECLYPSE, both the **infrastructure** and **applications** are modelled as graphs enriched with resource-related attributes ([assets](assets.md)) and dynamic behaviour (update policies). These are represented using two core classes:
+
+- [Infrastructure][eclypse.graph.infrastructure.Infrastructure] -- models a multi-layered infrastructure, made of nodes and links with their capabilities
+- [Application][eclypse.graph.application.Application] -- models a multi-service application, made of services and interactions with their requirements
+
+The two classes share many structural similarities, but differ in purpose and in the parameters used at initialisation.
+
+```mermaid
+flowchart TD
+ I["Infrastructure: nodes, links and capabilities"] --> P["Placement strategy"]
+ A["Application: services, interactions and requirements"] --> P
+ P --> M["Placement: services mapped to nodes"]
+```
+
+Placement matches application requirements against infrastructure capabilities.
+
+
+=== "Infrastructure"
+
+ ```python
+ from eclypse import policies
+ from eclypse.graph.infrastructure import Infrastructure
+
+ infrastructure = Infrastructure(
+ infrastructure_id="infra",
+ include_default_assets=True,
+ update_policies=[
+ policies.failure.availability_flap(0.01, up_probability=0.2),
+ policies.distribution.uniform(
+ node_assets=["cpu", "ram"],
+ edge_assets=["latency", "bandwidth"],
+ node_distribution=(0.95, 1.05),
+ edge_distribution=(0.95, 1.05),
+ ),
+ ],
+ resource_init="min",
+ seed=42,
+ )
+ ```
+
+ **Key parameters:**
+
+ - `infrastructure_id`: identifier of the infrastructure
+ - `update_policies`: list of [update policies](update-policy.md) for infrastructure resources
+ - `node_assets` / `edge_assets`: available capabilities ([asset](assets.md) values) of nodes and links
+ - `include_default_assets`: include the built-in CPU, RAM, storage, availability, latency, and bandwidth assets
+ - `resource_init`: initialisation of resources not given explicitly (*min*, *max* or *asset_init*, see [assets](assets.md))
+ - `seed`: random seed for reproducibility
+ - `path_assets_aggregators`: aggregators for *each link asset* evaluation across paths
+
+=== "Application"
+
+ ```python
+ from eclypse import policies
+ from eclypse.graph.application import Application
+
+ application = Application(
+ application_id="app",
+ include_default_assets=True,
+ update_policies=[
+ policies.after(
+ 50,
+ policies.degrade.reduce(
+ factor=0.6,
+ epochs=200,
+ node_assets=["cpu", "ram"],
+ edge_assets=["bandwidth"],
+ ),
+ ),
+ policies.after(
+ 50,
+ policies.degrade.increase(
+ factor=1.6667,
+ epochs=200,
+ edge_assets=["latency"],
+ ),
+ ),
+ ],
+ requirement_init="min",
+ seed=42,
+ flows=[["frontend", "worker"]],
+ )
+ ```
+
+ **Key parameters:**
+
+ - `application_id`: identifier of the application. Defaults to `"Application"`
+ - `update_policies`: list of [update policies](update-policy.md) for application requirements
+ - `node_assets` / `edge_assets`: resource requirements ([asset](assets.md) values) of services and links
+ - `include_default_assets`: include the built-in requirement assets
+ - `requirement_init`: initialisation of requirements not given explicitly (*min*, *max* or *asset_init*, see [assets](assets.md))
+ - `seed`: random seed for reproducibility
+ - `flows`: list of service chains or communication flows
+
+These classes inherit from a common base ([AssetGraph][eclypse.graph.asset_graph.AssetGraph]) and can be extended or composed via utility functions and default builders.
+
+## Defining the topologies { #define-topology }
+
+Once you have defined an Infrastructure or an Application object, you can incrementally add **nodes** (or services) and **edges** (or interactions) to describe its structure.
+
+Both classes expose two methods:
+
+- [add_node][eclypse.graph.asset_graph.AssetGraph.add_node] — to add a node or service
+- [add_edge][eclypse.graph.asset_graph.AssetGraph.add_edge] — to add a link or interaction
+
+These methods allow you to associate assets and automatically validate their values, according to the asset definitions you provided during initialisation.
+
+=== "Infrastructure"
+
+ ```python
+ from eclypse.graph.infrastructure import Infrastructure
+ from eclypse.graph.assets.defaults import cpu, ram, latency, bandwidth
+
+ infra = Infrastructure(
+ infrastructure_id="my-infra",
+ node_assets={"cpu": cpu(), "ram": ram()},
+ edge_assets={"latency": latency(), "bandwidth": bandwidth()},
+ path_assets_aggregators={"latency": sum, "bandwidth": min},
+ resource_init="min", # these assets have no initialiser
+ )
+
+ # Add two compute node
+ infra.add_node("node-1", cpu=4.0, ram=8.0)
+ infra.add_node("node-2", cpu=8.0, ram=16.0, strict=False)
+
+ # Add a link with latency and bandwidth
+ infra.add_edge(
+ "node-1", "node-2",
+ latency=10.0,
+ bandwidth=100.0,
+ symmetric=True # optional bidirectional link
+ )
+ ```
+
+ - `strict=True` (default): raises an error if asset values are inconsistent
+ - `symmetric=True`: adds the edge in both directions
+
+=== "Application"
+
+ ```python
+ from eclypse.graph.application import Application
+ from eclypse.graph.assets.defaults import cpu, ram, latency, bandwidth
+
+ app = Application(
+ application_id="my-app",
+ node_assets={"cpu": cpu(), "ram": ram()},
+ edge_assets={"latency": latency(), "bandwidth": bandwidth()},
+ requirement_init="min", # these assets have no initialiser
+ )
+
+ # Add a service with specific resource requirements
+ app.add_node("service-A", cpu=1.0, ram=0.5)
+ app.add_node("service-B", cpu=2.0, ram=1.0, strict=False)
+
+ # Add a directional communication between services
+ app.add_edge(
+ "service-A", "service-B",
+ latency=5.0,
+ bandwidth=10.0,
+ symmetric=False
+ )
+ ```
+
+ - `strict=True` (default): raises an error if requirements are outside defined bounds
+ - `symmetric=False` (default): adds the edge in one direction only
+
+ If you're building an application to run in **emulation mode** rather than *simulation*,
+ each service must be implemented with actual logic and remote execution support.
+
+ See the [Emulation guide](../advanced/emulation/index.md) for details.
+
+!!! note
+
+ All assets passed to [add_node][eclypse.graph.asset_graph.AssetGraph.add_node] or [add_edge][eclypse.graph.asset_graph.AssetGraph.add_edge] are checked against the declared asset definitions.
+ If validation fails and `strict` is `True`, an exception is raised. Otherwise, a warning is logged.
+
+## Default builders
+
+ECLYPSE provides several built-in builder functions that allow you to quickly
+instantiate commonly used topologies and reference applications.
+They return mutable [Application][eclypse.graph.application.Application] or
+[Infrastructure][eclypse.graph.infrastructure.Infrastructure] objects with sensible
+asset defaults and, for applications, representative flows.
+
+```python
+from eclypse.builders.application import get_sock_shop
+from eclypse.builders.infrastructure import get_fat_tree
+
+infra = get_fat_tree(k=4, include_default_assets=True)
+app = get_sock_shop(include_default_assets=True)
+```
+
+!!! tip
+
+ Builders are useful for prototyping or benchmarking standard scenarios. All
+ returned graphs are mutable and can be extended using the
+ [standard interface](#define-topology). See [Builders](builders.md) for the
+ available builder families.
diff --git a/docs/overview/concepts/update-policy.md b/docs/overview/concepts/update-policy.md
new file mode 100644
index 00000000..b7c34f2f
--- /dev/null
+++ b/docs/overview/concepts/update-policy.md
@@ -0,0 +1,284 @@
+# Update policies
+
+In ECLYPSE, an update policy is a function that defines how the state of the
+infrastructure or application evolves over time. It enables dynamic
+simulations by modifying node or edge assets at each simulation step.
+
+Unlike assets, update policies are not tied to separate node- or edge-specific
+interfaces. They are simple graph-oriented callables that receive the graph
+being updated.
+
+## Function Signature
+
+```python
+from eclypse.graph import AssetGraph
+
+def my_policy(graph: AssetGraph):
+ ...
+```
+
+The graph exposes the standard NetworkX views through `graph.nodes` and
+`graph.edges`. Each node or edge has an associated data dictionary containing
+its current asset values.
+
+## Built-in Policies
+
+ECLYPSE also provides a catalogue of off-the-shelf policies in
+[eclypse.policies][eclypse.policies]. The module groups reusable policies into a few common
+families:
+
+- **failure**: node and edge failures, availability flapping, correlated
+ failures, partitions, resource exhaustion, and latency spikes
+- **noise**: bounded and momentum random walks, additive or multiplicative
+ jitter, Gaussian jitter, correlated noise, seasonal noise, dropout, and
+ impulse shocks
+- **distribution**: uniform, normal, lognormal, triangular, beta, gamma,
+ truncated-normal, categorical, constant, Bernoulli, Poisson, exponential,
+ Weibull, Pareto, empirical, and weighted discrete multiplicative
+ perturbations
+- **degrade**: progressive increase or reduction, direct assignment, scaling,
+ and ramping of selected assets
+- **replay**: replay of node, edge, graph, and event values from records,
+ dataframes, CSV files, or parquet files, with optional cyclic replay
+- **schedule**: wrappers such as [every][eclypse.policies.schedule.every],
+ [after][eclypse.policies.schedule.after],
+ [between][eclypse.policies.schedule.between],
+ [at][eclypse.policies.schedule.at],
+ [until][eclypse.policies.schedule.until],
+ [repeat][eclypse.policies.schedule.repeat],
+ [with_probability][eclypse.policies.schedule.with_probability],
+ [jittered_every][eclypse.policies.schedule.jittered_every], and
+ [cooldown][eclypse.policies.schedule.cooldown]
+- **compose**: reusable policy composition with
+ [chain][eclypse.policies.compose.chain],
+ [one_of][eclypse.policies.compose.one_of],
+ [weighted_choice][eclypse.policies.compose.weighted_choice], and
+ [conditional][eclypse.policies.compose.conditional]
+- **workload**: arrival processes, traffic matrices, and diurnal load
+- **topology**: graph mutation policies for adding, removing, rewiring, and
+ churn
+- **constraints**: invariant-enforcing policies such as clamping,
+ normalisation, and rounding
+
+For most simulations, the easiest workflow is to compose a few built-in
+policies and only fall back to a custom callable when the behaviour is
+scenario-specific.
+
+## Using Built-in Policies
+
+Built-in policies are regular graph callables, so you use them exactly like any
+custom update policy.
+
+```python title="Example: Infrastructure policies composed from eclypse.policies"
+from eclypse import policies
+from eclypse.graph import Infrastructure
+
+infrastructure = Infrastructure(
+ "edge-cloud",
+ update_policies=[
+ policies.failure.availability_flap(
+ down_probability=0.02,
+ up_probability=0.5,
+ node_filter=lambda _, data: data["availability"] > 0,
+ ),
+ policies.distribution.uniform(
+ node_assets=["cpu", "ram", "storage"],
+ edge_assets=["latency", "bandwidth"],
+ node_asset_distributions={
+ "cpu": (0.95, 1.05),
+ "ram": (0.9, 1.1),
+ "storage": (0.98, 1.02),
+ },
+ edge_asset_distributions={
+ "latency": (0.95, 1.05),
+ "bandwidth": (0.98, 1.02),
+ },
+ ),
+ ],
+)
+```
+
+## Selectors and Assets
+
+Most built-in policies separate **what** to change from **where** to change it.
+
+- `node_assets` / `edge_assets` select which graph assets are updated
+- `node_ids` / `edge_ids` target specific nodes or links
+- `node_filter` / `edge_filter` let you target assets dynamically
+
+```python title="Example: Apply noise only to edge nodes and WAN links"
+from eclypse import policies
+
+policy = policies.distribution.uniform(
+ node_assets=["cpu", "ram"],
+ edge_assets=["latency"],
+ node_filter=lambda node_id, data: data.get("tier") == "edge",
+ edge_filter=lambda source, target, data: data.get("kind") == "wan",
+)
+```
+
+## Scheduling Policies
+
+Scheduling wrappers let you activate a policy only during part of the run.
+
+```python title="Example: Start value adjustments after step 100"
+from eclypse import policies
+
+update_policies = [
+ policies.after(
+ 100,
+ policies.degrade.reduce(
+ factor=0.5,
+ epochs=200,
+ node_assets=["cpu", "ram", "storage"],
+ edge_assets=["bandwidth"],
+ ),
+ ),
+ policies.after(
+ 100,
+ policies.degrade.increase(
+ factor=2.0,
+ epochs=200,
+ edge_assets=["latency"],
+ ),
+ ),
+ policies.with_probability(
+ 0.2,
+ policies.failure.resource_exhaustion(
+ factor=0.75,
+ node_assets=["cpu", "ram"],
+ ),
+ ),
+ policies.jittered_every(
+ 10,
+ policies.noise.additive_jitter(
+ edge_ranges={"latency": (-1.0, 2.0)},
+ lower=0.0,
+ ),
+ jitter=2,
+ ),
+]
+```
+
+## Replay Policies
+
+Replay helpers are useful when you want the simulation to follow observed
+or synthetic measurements over time.
+
+```python title="Example: Replay node load from a parquet trace"
+from eclypse import policies
+
+replay_users = policies.replay.from_parquet(
+ "examples/user_distribution/dataset.parquet",
+ target="nodes",
+ node_id_column="node_id",
+ time_column="time",
+ value_columns=["user_count"],
+ start_step=0,
+ cyclic=True,
+)
+```
+```python title="Example: Replay node and edge values together"
+from eclypse import policies
+
+replay_trace = policies.replay.replay_graph(
+ node_records=[
+ {"time": 0, "node_id": "edge-1", "users": 10},
+ {"time": 1, "node_id": "edge-1", "users": 18},
+ ],
+ edge_records=[
+ {"time": 0, "source": "edge-1", "target": "cloud", "latency": 12},
+ {"time": 1, "source": "edge-1", "target": "cloud", "latency": 20},
+ ],
+ node_value_columns=["users"],
+ edge_value_columns=["latency"],
+ cyclic=True,
+)
+```
+
+## Composition, Workloads, Topology, and Constraints
+
+The higher-level families help keep scenario code small when multiple effects
+must be combined.
+
+```python title="Example: Compose workload, topology, and constraints"
+from eclypse import policies
+
+update_policy = policies.compose.chain(
+ policies.workload.arrival_process(
+ rate=20,
+ node_assets="users",
+ node_filter=lambda node_id, data: data.get("tier") == "edge",
+ ),
+ policies.workload.traffic_matrix(
+ {("edge-1", "cloud"): 120.0},
+ asset="traffic",
+ ),
+ policies.constraints.clamp_values(
+ lower=1.0,
+ edge_assets="bandwidth",
+ ),
+ policies.topology.churn(
+ add_probability=0.1,
+ candidate_nodes={
+ "burst-edge": {"cpu": 16, "ram": 32, "availability": 1.0},
+ },
+ ),
+)
+```
+
+## Current vs Initial Basis
+
+Numeric policies that can compound over repeated calls accept `basis`:
+
+- `basis="current"` uses the value at each call. This preserves cumulative
+ drift and is the default.
+- `basis="initial"` uses the first value seen by that policy for each selected
+ asset. ECLYPSE stores only those touched asset values, not a copy of the graph.
+
+Use `basis="initial"` for oscillations or shocks around a nominal value:
+
+```python
+stable_latency_noise = policies.noise.seasonal_noise(
+ amplitude=2.0,
+ period=24,
+ edge_assets="latency",
+ basis="initial",
+)
+```
+
+## Writing Custom Policies
+
+You can define your own update policies by modifying the relevant asset values
+within the graph.
+
+```python title="Example: A node policy that caps CPU to a fixed maximum"
+from eclypse.graph import AssetGraph
+
+def cap_cpu(graph: AssetGraph):
+ for _, data in graph.nodes.items():
+ if "cpu" in data:
+ data["cpu"] = min(data["cpu"], 2.0)
+```
+```python title="Example: An edge policy that increases latency"
+from eclypse.graph import AssetGraph
+
+def add_latency(graph: AssetGraph):
+ for _, _, data in graph.edges.data():
+ if "latency" in data:
+ data["latency"] += 1.0
+```
+
+## Custom vs built-in
+
+Built-in policies are ideal for common patterns such as failures, distributions,
+explicit value adjustments, and replay from traces. When an example or scenario couples
+multiple effects in a very specific way, keeping a custom callable is still the
+right choice. Several examples in the repository intentionally do that to
+preserve their original behaviour.
+
+!!! info "Important"
+
+ Update policies must always ensure that modified asset values remain consistent.
+ Use the asset's [is_consistent()][eclypse.graph.assets.asset.Asset.is_consistent] method if needed.
+ Otherwise, placement and simulation logic may occur on inconsistent data.
diff --git a/docs/source/overview/examples/echo.rst b/docs/overview/examples/echo.md
similarity index 60%
rename from docs/source/overview/examples/echo.rst
rename to docs/overview/examples/echo.md
index 8e1d0b73..152ac654 100644
--- a/docs/source/overview/examples/echo.rst
+++ b/docs/overview/examples/echo.md
@@ -1,5 +1,4 @@
-Echo
-====
+# Echo
The Echo example showcases a small service-based application in which messages
are exchanged repeatedly among neighbouring services.
@@ -7,85 +6,82 @@ are exchanged repeatedly among neighbouring services.
Use it when you want to understand:
- how to build an application and an infrastructure from Python code,
-- how to run a local simulation end to end,
+- how to run a remote emulation end to end,
- how MPI-style communication behaves in a simple topology.
The full code lives in the
-`examples/echo `_
+[examples/echo](https://github.com/eclypse-org/eclypse/tree/main/examples/echo)
directory.
Run it from the repository root with:
-.. code-block:: bash
+```bash
+uv run python -m examples.echo.main
+```
- uv run python -m examples.echo.main
-
-Application
------------
+## Application
The Echo Application consists of several identical services, each of which receives a message and echoes it back to all of its neighbors. This symmetrical architecture ensures that each service behaves identically.
As each service echoes messages both by broadcasting to all neighbors and unicasting individually to each neighbour, it is useful to compare the expected results of these two communication methods.
Broadcasting is expected to be faster than unicasting, as it involves sending messages to all neighbors simultaneously. Unicasting, on the other hand, requires sending a separate message to each neighbor, which can result in a longer total communication time.
-.. dropdown:: Application code
-
- .. literalinclude:: ../../../../examples/echo/application.py
- :language: python
+??? example "Application code"
+ ```python
+ --8<-- "examples/echo/application.py"
+ ```
-Echo Service
-------------
+## Echo Service
-The ``EchoService`` class is the runtime component responsible for sending
+The `EchoService` class is the runtime component responsible for sending
messages to neighbour services and measuring the difference between unicast and
broadcast communication.
-.. dropdown:: Service code
+??? example "Service code"
- .. literalinclude:: ../../../../examples/echo/echo.py
- :language: python
- :linenos:
+ ```python linenums="1"
+ --8<-- "examples/echo/echo.py"
+ ```
The service inherits from
-:class:`~eclypse.remote.service.service.Service` and implements
-:py:meth:`~eclypse.remote.service.service.Service.step`, which is the unit of
+[Service][eclypse.remote.service.service.Service] and implements
+[step][eclypse.remote.service.service.Service.step], which is the unit of
behaviour executed during emulation.
-
-Infrastructure
---------------
+## Infrastructure
The Echo application is deployed on a small infrastructure made of heterogeneous
nodes connected through links with different latency and bandwidth values.
-.. dropdown:: Infrastructure code
+??? example "Infrastructure code"
- .. literalinclude:: ../../../../examples/echo/infrastructure.py
- :language: python
+ ```python
+ --8<-- "examples/echo/infrastructure.py"
+ ```
The infrastructure is also updated at each iteration through a graph update
policy that mutates both nodes and links to simulate changing runtime
conditions.
-.. dropdown:: Update policy code
+??? example "Update policy code"
- .. literalinclude:: ../../../../examples/echo/update_policy.py
- :language: python
+ ```python
+ --8<-- "examples/echo/update_policy.py"
+ ```
-Simulation
-----------
+## Simulation
The example configures a reproducible run with metrics enabled and stores the
results under the default simulation path.
-.. dropdown:: Simulation code
+??? example "Simulation code"
- .. literalinclude:: ../../../../examples/echo/main.py
- :language: python
+ ```python
+ --8<-- "examples/echo/main.py"
+ ```
-What to inspect
----------------
+## What to inspect
After the run, compare the communication metrics produced by unicast and
broadcast exchanges. This example is a good template when you want to test a
@@ -93,5 +89,5 @@ small emulated service loop before moving to a larger application.
Related concepts:
-- :doc:`../advanced/emulation/messaging`
-- :doc:`../advanced/reporting`
+- [Messaging](../advanced/emulation/messaging.md)
+- [Reporting](../advanced/reporting.md)
diff --git a/docs/overview/examples/grid_analysis.md b/docs/overview/examples/grid_analysis.md
new file mode 100644
index 00000000..1999481a
--- /dev/null
+++ b/docs/overview/examples/grid_analysis.md
@@ -0,0 +1,55 @@
+# Grid analysis
+
+The grid analysis example runs a Ray Tune sweep over infrastructure topology,
+load, failure policy, random seed, and placement strategy choices.
+
+Use it when you want to understand:
+
+- how to wrap an ECLYPSE simulation in a parameter-search function,
+- how to compare placement strategies across many generated infrastructures,
+- how to write custom infrastructure assets and policies for experiments.
+
+The full code lives in the
+[examples/grid_analysis](https://github.com/eclypse-org/eclypse/tree/main/examples/grid_analysis)
+directory.
+
+Run it from the repository root with:
+
+```bash
+uv run --with-requirements examples/grid_analysis/requirements.txt python -m examples.grid_analysis.main
+```
+
+## Simulation sweep
+
+??? example "Main sweep code"
+
+ ```python
+ --8<-- "examples/grid_analysis/main.py"
+ ```
+
+## Infrastructure
+
+??? example "Infrastructure code"
+
+ ```python
+ --8<-- "examples/grid_analysis/infrastructure.py"
+ ```
+
+## Placement strategy
+
+??? example "Strategy code"
+
+ ```python
+ --8<-- "examples/grid_analysis/strategy.py"
+ ```
+
+## What to inspect
+
+Use this example as a template for repeated experiments. The main result is not
+a single simulation trace, but a grid of runs that lets you compare placement
+strategies and infrastructure choices under the same sweep logic.
+
+Related concepts:
+
+- [Placement Strategy](../concepts/placement-strategy.md)
+- [Update policies](../concepts/update-policy.md)
diff --git a/docs/overview/examples/image_prediction.md b/docs/overview/examples/image_prediction.md
new file mode 100644
index 00000000..1c362bec
--- /dev/null
+++ b/docs/overview/examples/image_prediction.md
@@ -0,0 +1,56 @@
+# Image prediction
+
+The image prediction example shows a remote application with trainer,
+predictor, and end-user services. It combines service implementations, custom
+metrics, and a degradation policy in emulation mode.
+
+Use it when you want to understand:
+
+- how to attach concrete service implementations to an application,
+- how to configure a remote simulation,
+- how to collect custom metrics from remote service behaviour.
+
+The full code lives in the
+[examples/image_prediction](https://github.com/eclypse-org/eclypse/tree/main/examples/image_prediction)
+directory.
+
+Run it from the repository root with:
+
+```bash
+uv run --with-requirements examples/image_prediction/requirements.txt python -m examples.image_prediction.main
+```
+
+## Application
+
+??? example "Application code"
+
+ ```python
+ --8<-- "examples/image_prediction/application.py"
+ ```
+
+## Simulation
+
+??? example "Simulation code"
+
+ ```python
+ --8<-- "examples/image_prediction/main.py"
+ ```
+
+## Metrics
+
+??? example "Metrics code"
+
+ ```python
+ --8<-- "examples/image_prediction/metrics.py"
+ ```
+
+## What to inspect
+
+This example is useful when the application behaviour matters, not only the
+placement. Inspect the custom metrics together with the service implementations
+to see how emulated runtime state becomes reportable simulation data.
+
+Related concepts:
+
+- [Emulation](../advanced/emulation/emulation.md)
+- [Reporting](../advanced/reporting.md)
diff --git a/docs/overview/examples/index.md b/docs/overview/examples/index.md
new file mode 100644
index 00000000..7fdec303
--- /dev/null
+++ b/docs/overview/examples/index.md
@@ -0,0 +1,62 @@
+# Examples
+
+The examples section complements the getting-started guides with runnable
+scenarios you can inspect and adapt.
+
+The code for the documented examples is available in the
+:fontawesome-brands-github:
+[examples](https://github.com/eclypse-org/eclypse/tree/main/examples/)
+subdirectory of the repository.
+
+
+
+- :octicons-megaphone-16: **[Echo](echo.md)**
+
+ ---
+
+ A small service-based application that compares unicast and broadcast
+ communication patterns.
+
+- :octicons-tools-16: **[Off-the-shelf](off_the_shelf.md)**
+
+ ---
+
+ A local simulation composed only from built-in builders, policies,
+ and placement logic.
+
+- :octicons-package-dependents-16: **[SockShop](sock_shop.md)**
+
+ ---
+
+ A microservices application that simulates an online shop and is
+ provided in both MPI and REST variants.
+
+- :octicons-graph-16: **[Grid analysis](grid_analysis.md)**
+
+ ---
+
+ A Ray Tune sweep over infrastructure topologies, update policies, and
+ placement strategies.
+
+- :octicons-iterations-16: **[IO round trip](io_round_trip.md)**
+
+ ---
+
+ An import/export matrix that loads graph files through the default
+ IO importers and writes them back through every compatible exporter.
+
+- :octicons-image-16: **[Image prediction](image_prediction.md)**
+
+ ---
+
+ A remote image-prediction pipeline with custom services, metrics, and
+ degradation policies.
+
+- :octicons-people-16: **[User distribution](user_distribution.md)**
+
+ ---
+
+ A custom metric and update-policy example driven by changing user
+ distributions.
+
+
diff --git a/docs/overview/examples/io_round_trip.md b/docs/overview/examples/io_round_trip.md
new file mode 100644
index 00000000..916031b8
--- /dev/null
+++ b/docs/overview/examples/io_round_trip.md
@@ -0,0 +1,115 @@
+# IO round trip
+
+This example focuses on the [eclypse.io][eclypse.io] package. It is not a simulation
+scenario. Instead, it shows how ECLYPSE graph objects can move between external
+files and the in-memory [Application][eclypse.graph.application.Application] and
+[Infrastructure][eclypse.graph.infrastructure.Infrastructure] classes.
+
+Use it when you want to inspect the default importers and exporters side by
+side, compare what each format preserves, or create a starting point for your
+own graph exchange workflow.
+
+The full code lives in the
+[examples/io_round_trip](https://github.com/eclypse-org/eclypse/tree/main/examples/io_round_trip)
+directory.
+
+Run it from the repository root with:
+
+```bash
+uv run python -m examples.io_round_trip.main
+```
+
+## What it shows
+
+The example ships small input files under `examples/io_round_trip/input` and
+loads each one with the matching default importer:
+
+- application inputs: ECLYPSE JSON, Docker Compose, GML, GraphML, node-link JSON,
+ and TOSCA
+- infrastructure inputs: ECLYPSE JSON, GML, GraphML, node-link JSON, and TOSCA
+
+Each loaded graph is then exported to every compatible default output format.
+Docker Compose is only available for applications, so the grid contains:
+
+- `6 x 6` application conversions
+- `5 x 5` infrastructure conversions
+- `61` generated output files in total
+
+The generated files are written under `examples/io_round_trip/output` using a
+path that makes each conversion explicit:
+
+```text
+output//from-/to-.
+```
+
+For example:
+
+```text
+output/application/from-gml/to-tosca.yaml
+output/application/from-eclypse_json/to-docker_compose.yaml
+output/infrastructure/from-graphml/to-node_link_json.json
+output/infrastructure/from-tosca/to-eclypse_json.json
+```
+
+The example also writes `output/manifest.json` with one row per generated
+conversion.
+
+## Input cases
+
+The input cases are declared once and reused by the grid runner. The case name
+is the input format in snake case, while the parent folder carries the graph
+kind.
+
+??? example "Input case definitions"
+
+ ```python
+ --8<-- "examples/io_round_trip/cases.py"
+ ```
+
+## Conversion grid
+
+The grid does the same thing for every case:
+
+1. load the source file through [load_application][eclypse.io.load_application] or
+ [load_infrastructure][eclypse.io.load_infrastructure]
+2. ask [default_registry][eclypse.io.default_registry] for compatible output formats
+3. dump the loaded graph through [dump_application][eclypse.io.dump_application] or
+ [dump_infrastructure][eclypse.io.dump_infrastructure]
+
+The example uses only default importers and exporters. It does not register
+custom handlers.
+
+??? example "Grid code"
+
+ ```python
+ --8<-- "examples/io_round_trip/grid.py"
+ ```
+
+## Entrypoint
+
+The entrypoint runs the grid, writes the manifest, and prints a short summary of
+the available formats and generated files.
+
+??? example "Entrypoint code"
+
+ ```python
+ --8<-- "examples/io_round_trip/main.py"
+ ```
+
+## What to inspect
+
+Start from `output/manifest.json` to see the full conversion matrix. Then
+compare the outputs for the same input format, for example
+`output/application/from-tosca` or `output/infrastructure/from-graphml`.
+
+The canonical ECLYPSE JSON output is the most complete round-trip format. Graph
+formats such as GML, GraphML, and node-link JSON are useful for graph tooling and
+topology exchange. Docker Compose and TOSCA show how ECLYPSE applications and
+infrastructures can be projected into cloud-edge oriented formats.
+
+Related concepts:
+
+- [Import and Export](../concepts/import-export.md)
+- [Application][eclypse.graph.application.Application]
+- [Infrastructure][eclypse.graph.infrastructure.Infrastructure]
+- [eclypse.io][eclypse.io]
diff --git a/docs/source/overview/examples/off_the_shelf.rst b/docs/overview/examples/off_the_shelf.md
similarity index 54%
rename from docs/source/overview/examples/off_the_shelf.rst
rename to docs/overview/examples/off_the_shelf.md
index 1f20b29c..f98002d6 100644
--- a/docs/source/overview/examples/off_the_shelf.rst
+++ b/docs/overview/examples/off_the_shelf.md
@@ -1,72 +1,68 @@
-Off-the-shelf
-=============
+# Off-the-shelf
This example shows a complete local simulation built only from reusable ECLYPSE
components:
-- the :func:`~eclypse.builders.application.get_hotel_reservation` application builder
-- an infrastructure builder from :mod:`eclypse.builders.infrastructure`
-- built-in update policies from :mod:`eclypse.policies`
+- the [get_hotel_reservation][eclypse.builders.application.get_hotel_reservation] application builder
+- an infrastructure builder from [eclypse.builders.infrastructure][eclypse.builders.infrastructure]
+- built-in update policies from [eclypse.policies][eclypse.policies]
- a built-in placement strategy
Use it when you want a minimal reference for composing existing building blocks
without writing custom services, topologies, or policy callables.
The full code lives in the
-`examples/off_the_shelf `_
+[examples/off_the_shelf](https://github.com/eclypse-org/eclypse/tree/main/examples/off_the_shelf)
directory.
Run it from the repository root with:
-.. code-block:: bash
+```bash
+uv run python -m examples.off_the_shelf.main
+```
- uv run python -m examples.off_the_shelf.main
-
-Application
------------
+## Application
The application is the built-in hotel reservation graph, paired with built-in
uniform-distribution and degradation policies that progressively make
placement harder.
ECLYPSE also provides several other ready-made application builders collected
-in :mod:`eclypse.builders.application`.
-
-.. dropdown:: Application code
+in [eclypse.builders.application][eclypse.builders.application].
- .. literalinclude:: ../../../../examples/off_the_shelf/application.py
- :language: python
+??? example "Application code"
+ ```python
+ --8<-- "examples/off_the_shelf/application.py"
+ ```
-Infrastructure
---------------
+## Infrastructure
The infrastructure is a generated hierarchical topology using the default
assets and a built-in policy mix for flapping availability, uniform
perturbations, periodic latency spikes, and scheduled degradation. ECLYPSE also
provides several other off-the-shelf infrastructure builders collected in
-:mod:`eclypse.builders.infrastructure`. Together with ``BestFitStrategy``, this
+[eclypse.builders.infrastructure][eclypse.builders.infrastructure]. Together with `BestFitStrategy`, this
example exercises repeated placement under a changing environment.
-.. dropdown:: Infrastructure code
-
- .. literalinclude:: ../../../../examples/off_the_shelf/infrastructure.py
- :language: python
+??? example "Infrastructure code"
+ ```python
+ --8<-- "examples/off_the_shelf/infrastructure.py"
+ ```
-Simulation
-----------
+## Simulation
The simulation registers the built-in application on the generated
infrastructure with a built-in placement strategy and runs it locally.
-.. dropdown:: Simulation code
+??? example "Simulation code"
- .. literalinclude:: ../../../../examples/off_the_shelf/main.py
- :language: python
+ ```python
+ --8<-- "examples/off_the_shelf/main.py"
+ ```
-What to inspect
----------------
+## What to inspect
This example is the quickest template for a local experiment built from
existing components. Inspect placement changes and application-level metrics as
@@ -74,6 +70,6 @@ the infrastructure policies make resources less stable.
Related concepts:
-- :doc:`../concepts/builders`
-- :doc:`../concepts/update-policy`
-- :doc:`../concepts/placement-strategy`
+- [Builders](../concepts/builders.md)
+- [Update policies](../concepts/update-policy.md)
+- [Placement Strategy](../concepts/placement-strategy.md)
diff --git a/docs/overview/examples/sock_shop.md b/docs/overview/examples/sock_shop.md
new file mode 100644
index 00000000..a594bdfb
--- /dev/null
+++ b/docs/overview/examples/sock_shop.md
@@ -0,0 +1,89 @@
+# SockShop
+
+[SockShop](https://github.com/ocp-power-demos/sock-shop-demo) is a
+microservices-based e-commerce application that simulates an online sock store.
+It is composed of multiple services responsible for catalog browsing, user
+management, cart updates, payment, shipping, and order handling.
+
+ECLYPSE provides two versions of the application that share the same abstract
+application model and infrastructure, but differ in the communication
+interface used by the services:
+
+1. **MPI**: this version uses the Message Passing Interface (MPI) for communication between services. MPI is a high-performance communication protocol that is well-suited for distributed computing environments, enabling efficient message passing and synchronization between services.
+
+2. **REST**: this version uses Representational State Transfer (REST) for communication between services. RESTful APIs promote simplicity and standardization, making it easier to develop, maintain, and integrate services within the microservices architecture.
+
+Below, we focus on the `FrontendService` implementation in both variants,
+because it highlights the practical differences between MPI and REST
+communication in ECLYPSE.
+
+The full code lives in the
+[examples/sock_shop/mpi.py](https://github.com/eclypse-org/eclypse/blob/main/examples/sock_shop/mpi.py)
+and
+[examples/sock_shop/rest.py](https://github.com/eclypse-org/eclypse/blob/main/examples/sock_shop/rest.py)
+directories.
+
+Run either variant from the repository root with:
+
+```bash
+uv run python -m examples.sock_shop.mpi
+uv run python -m examples.sock_shop.rest
+```
+
+!!! warning
+
+ Both interfaces are asynchronous. When you call the low-level request APIs
+ directly, await the returned request object so that route and delivery
+ failures surface immediately.
+
+## FrontendService (MPI version)
+
+```python linenums="1"
+--8<-- "eclypse/builders/application/sock_shop/mpi_services/frontend.py"
+```
+
+The MPI interface revolves around the methods `send`, `bcast`, and
+`recv`. It is useful when you want to model explicit message passing between
+services.
+
+We can notice two ways of sending a message:
+
+- At lines 64 -- 72 we use the
+ [exchange][eclypse.remote.communication.mpi.interface.exchange] decorator.
+ This is convenient for common `recv`/`send` patterns.
+
+ A complete example of such a pattern is the following, where the service receives a message and sends a response to the sender:
+
+ ```python
+ @mpi.exchange(receive=True, send=True)
+ def my_request(self, sender_id, body):
+
+ response = ... # process the body
+
+ return sender_id, response
+ ```
+
+- At lines 36, 44, and 58 we use `mpi.send` directly, specifying the
+ recipient and the message body.
+- `recv` waits for the next message in the internal queue.
+
+## FrontendService (REST version)
+
+```python linenums="1"
+--8<-- "eclypse/builders/application/sock_shop/rest_services/frontend.py"
+```
+
+In this example, the REST interface uses endpoint-oriented methods such as
+`get` and `post`. This style is a better fit when you want to model
+request/response interactions explicitly.
+
+## What to inspect
+
+Use Sock Shop to compare the same abstract application under two communication
+interfaces. The MPI variant is useful for explicit message-passing workflows;
+the REST variant is useful for endpoint-oriented microservice interactions.
+
+Related concepts:
+
+- [Messaging](../advanced/emulation/messaging.md)
+- [Run a remote emulation](../getting-started/remote-emulation.md)
diff --git a/docs/overview/examples/user_distribution.md b/docs/overview/examples/user_distribution.md
new file mode 100644
index 00000000..9637f540
--- /dev/null
+++ b/docs/overview/examples/user_distribution.md
@@ -0,0 +1,57 @@
+# User distribution
+
+The user distribution example customises a generated infrastructure with a
+`user_count` asset and updates latency and placement conditions as the user
+distribution evolves.
+
+Use it when you want to understand:
+
+- how to add a custom infrastructure asset,
+- how to write metrics around domain-specific infrastructure state,
+- how update policies can drive a longer-running simulation.
+
+The full code lives in the
+[examples/user_distribution](https://github.com/eclypse-org/eclypse/tree/main/examples/user_distribution)
+directory.
+
+Run it from the repository root with:
+
+```bash
+uv run --with-requirements examples/user_distribution/requirements.txt python -m examples.user_distribution.main
+```
+
+## Infrastructure
+
+??? example "Infrastructure code"
+
+ ```python
+ --8<-- "examples/user_distribution/infrastructure.py"
+ ```
+
+## Metrics
+
+??? example "Metrics code"
+
+ ```python
+ --8<-- "examples/user_distribution/metric.py"
+ ```
+
+## Simulation
+
+??? example "Simulation code"
+
+ ```python
+ --8<-- "examples/user_distribution/main.py"
+ ```
+
+## What to inspect
+
+Use this example when the infrastructure has domain-specific state. The
+`user_count` asset shows how custom node attributes can drive metrics and
+update policies without changing the core simulator.
+
+Related concepts:
+
+- [Assets](../concepts/assets.md)
+- [Update policies](../concepts/update-policy.md)
+- [Reporting](../advanced/reporting.md)
diff --git a/docs/overview/getting-started/index.md b/docs/overview/getting-started/index.md
new file mode 100644
index 00000000..62940fa8
--- /dev/null
+++ b/docs/overview/getting-started/index.md
@@ -0,0 +1,41 @@
+# Getting started
+
+Let's get started with ECLYPSE.
+
+If you want to get to a first successful run quickly, begin with one of the
+guided paths below. Once you are comfortable with the workflow, move to the
+[concept pages](../concepts/index.md) to customise assets, placement
+strategies, events, infrastructure models, and simulation parameters.
+
+## Happy paths
+
+
+
+- **[1. Run a minimal local simulation](minimal-local-run.md)**
+
+ ---
+
+ Build a small scenario with the built-in builders, run it locally,
+ and retrieve the resulting report.
+
+- **[2. Inspect and query the report](inspect-results.md)**
+
+ ---
+
+ Learn how to load report frames, choose a backend, and work with the
+ collected metrics.
+
+- **[3. Move to remote emulation](remote-emulation.md)**
+
+ ---
+
+ Run remote services with the MPI or REST communication interfaces and
+ understand how the setup differs from a local simulation.
+
+
+
+!!! tip
+
+ If you have not yet installed ECLYPSE, refer to the [Installation](../install.md) page.
+ If you want the conceptual map after your first run, continue with
+ [Concepts](../concepts/index.md).
diff --git a/docs/overview/getting-started/inspect-results.md b/docs/overview/getting-started/inspect-results.md
new file mode 100644
index 00000000..dd63806f
--- /dev/null
+++ b/docs/overview/getting-started/inspect-results.md
@@ -0,0 +1,88 @@
+# Inspect the results
+
+ECLYPSE stores simulation outputs on disk and exposes them through the
+[Report][eclypse.report.report.Report] interface.
+
+The report API gives you two main choices:
+
+- the **report format**, which controls how data is written to disk,
+- the **report backend**, which controls the dataframe implementation returned
+ when you query the report.
+
+## Choose the report format
+
+Use the `report_format` parameter of
+[SimulationConfig][eclypse.simulation.config.SimulationConfig] to choose how the raw data
+is written:
+
+- `"csv"`: easy to inspect manually,
+- `"json"`: useful for structured debugging and integration,
+- `"parquet"`: best suited to larger runs and analytical workloads.
+
+```python
+from eclypse.simulation import SimulationConfig
+
+config = SimulationConfig(
+ report_format="parquet",
+ include_default_metrics=True,
+)
+```
+
+## Choose the report backend
+
+Use `report_backend` to control the in-memory dataframe implementation used
+by [Report][eclypse.report.report.Report]:
+
+- `"pandas"`
+- `"polars"`
+- `"polars_lazy"`
+
+```python
+config = SimulationConfig(
+ report_backend="polars",
+ report_format="parquet",
+ include_default_metrics=True,
+)
+```
+
+## Query report frames
+
+Once a simulation has completed, you can retrieve report frames either through
+the convenience methods or through the generic
+[frame][eclypse.report.report.Report.frame] entry point:
+
+```python
+report = simulation.report
+
+application_frame = report.application()
+service_frame = report.service()
+generic_frame = report.frame("interaction")
+```
+
+You can also restrict the data by report range:
+
+```python
+recent_steps = report.service(report_range=(10, 20))
+```
+
+## Standalone report loading
+
+Reports can also be loaded later from disk:
+
+```python
+from eclypse.report import Report
+
+report = Report("path/to/simulation")
+frame = report.application()
+```
+
+If needed, you can explicitly set the format when loading:
+
+```python
+report = Report("path/to/simulation", report_format="parquet")
+```
+
+!!! note "See also"
+
+ - [Simulation configuration](../concepts/simulation-configuration.md)
+ - [Reporting](../advanced/reporting.md)
diff --git a/docs/overview/getting-started/minimal-local-run.md b/docs/overview/getting-started/minimal-local-run.md
new file mode 100644
index 00000000..1679f38a
--- /dev/null
+++ b/docs/overview/getting-started/minimal-local-run.md
@@ -0,0 +1,96 @@
+# Run a local simulation
+
+This page shows the shortest path to a first successful ECLYPSE run.
+
+We will:
+
+1. create an infrastructure with a built-in builder,
+2. create an application with a built-in builder,
+3. configure a local simulation,
+4. run it and inspect the report.
+
+This path uses only local simulation components. No remote services or
+communication interfaces are required.
+
+## Build the scenario
+
+The following example uses:
+
+- [get_hierarchical][eclypse.builders.infrastructure.get_hierarchical] to build a
+ small infrastructure,
+- [get_sock_shop][eclypse.builders.application.sock_shop.application.get_sock_shop] to
+ build a reference application,
+- [RandomStrategy][eclypse.placement.strategies.RandomStrategy] for placement.
+
+```python
+from eclypse.builders.application import get_sock_shop
+from eclypse.builders.infrastructure import get_hierarchical
+from eclypse.placement.strategies import RandomStrategy
+from eclypse.simulation import Simulation, SimulationConfig
+
+seed = 22 # (1)!
+
+infrastructure = get_hierarchical(
+ n=20,
+ include_default_assets=True, # (2)!
+ seed=seed,
+)
+
+application = get_sock_shop(
+ include_default_assets=True,
+ seed=seed,
+)
+
+config = SimulationConfig(
+ seed=seed,
+ max_steps=20,
+ include_default_metrics=True, # (3)!
+ default_strategy=RandomStrategy(seed=seed), # (4)!
+)
+
+simulation = Simulation(infrastructure, simulation_config=config)
+simulation.register(application)
+```
+
+1. Reuse the same seed in builders and placement to make repeated runs reproducible.
+2. Include the built-in resource assets instead of defining CPU, RAM and link assets yourself.
+3. Collect the default metrics so the report contains data to inspect after the run.
+4. Choose how services are placed on infrastructure nodes; replace this strategy to compare placement decisions.
+
+## Run the simulation
+
+Once the infrastructure, application, and configuration are ready, start the
+simulation and wait for it to finish:
+
+```python
+simulation.run()
+```
+
+## Inspect the report
+
+After the run, the [report][eclypse.simulation.simulation.Simulation.report]
+property exposes the collected data through the
+[Report][eclypse.report.report.Report] interface:
+
+```python
+application_frame = simulation.report.application()
+service_frame = simulation.report.service()
+
+print(application_frame.head())
+print(service_frame.head())
+```
+
+The exact object type depends on the selected report backend. By default,
+ECLYPSE uses the backend configured in
+[SimulationConfig][eclypse.simulation.config.SimulationConfig].
+
+!!! note "See also"
+
+ - [Inspect the results](inspect-results.md)
+ - [Infrastructure and Application(s)](../concepts/topology.md)
+ - [Simulation configuration](../concepts/simulation-configuration.md)
+
+!!! note
+
+ Looking for a larger runnable example? See the [Echo](../examples/echo.md) and
+ [SockShop](../examples/sock_shop.md) pages.
diff --git a/docs/overview/getting-started/remote-emulation.md b/docs/overview/getting-started/remote-emulation.md
new file mode 100644
index 00000000..3f0b473d
--- /dev/null
+++ b/docs/overview/getting-started/remote-emulation.md
@@ -0,0 +1,77 @@
+# Run a remote emulation
+
+Remote emulation is the next step after a local simulation.
+
+In this mode, application services are instantiated as remote services and can
+communicate through one of the supported interfaces:
+
+- `"mpi"`
+- `"rest"`
+
+The overall simulation flow remains the same, but the application must be built
+with remote-capable services and the simulation configuration must enable
+`remote=True`.
+
+## Minimal setup
+
+```python
+from eclypse.builders.application import get_sock_shop
+from eclypse.builders.infrastructure import get_hierarchical
+from eclypse.placement.strategies import RandomStrategy
+from eclypse.simulation import Simulation, SimulationConfig
+
+seed = 22
+
+infrastructure = get_hierarchical(
+ n=30,
+ include_default_assets=True,
+ seed=seed,
+)
+
+application = get_sock_shop(
+ communication_interface="mpi",
+ include_default_assets=True,
+ seed=seed,
+)
+
+config = SimulationConfig(
+ remote=True,
+ seed=seed,
+ max_steps=100,
+ step_every_ms=500,
+ include_default_metrics=True,
+ default_strategy=RandomStrategy(seed=seed),
+)
+
+simulation = Simulation(infrastructure, simulation_config=config)
+simulation.register(application)
+simulation.run()
+```
+
+## Choosing the communication interface
+
+Use `communication_interface="mpi"` or `communication_interface="rest"`
+when building the application.
+
+The two interfaces remain intentionally different:
+
+- MPI models explicit message passing with `send` and `recv` semantics.
+- REST models endpoint-oriented request/response interactions.
+
+Choose the one that best matches the system you want to emulate.
+
+## What changes compared to a local run
+
+Compared to the [Run a local simulation](minimal-local-run.md) path:
+
+- services are remote service objects instead of plain application nodes,
+- the simulation configuration must set `remote=True`,
+- communication failures and deployment issues become part of the emulation
+ behaviour,
+- remote messaging patterns depend on the chosen interface.
+
+!!! note "See also"
+
+ - [Emulation](../advanced/emulation/emulation.md)
+ - [Messaging](../advanced/emulation/messaging.md)
+ - [SockShop](../examples/sock_shop.md)
diff --git a/docs/overview/index.md b/docs/overview/index.md
new file mode 100644
index 00000000..b0c6d93d
--- /dev/null
+++ b/docs/overview/index.md
@@ -0,0 +1,42 @@
+# Overview
+
+
+
+- :octicons-desktop-download-16: **[Installation](install.md)**
+
+ ---
+
+ Learn how to install ECLYPSE.
+
+- :octicons-repo-16: **[Getting Started](getting-started/index.md)**
+
+ ---
+
+ Start your first simulation with ECLYPSE.
+
+- :octicons-book-16: **[Concepts](concepts/index.md)**
+
+ ---
+
+ Learn the core building blocks behind assets, events, placement, and
+ simulation configuration.
+
+- :octicons-terminal-16: **[Advanced](advanced/index.md)**
+
+ ---
+
+ Learn more about advanced features of ECLYPSE.
+
+- :octicons-code-16: **[Examples](examples/index.md)**
+
+ ---
+
+ Explore example simulations to use ECLYPSE effectively.
+
+- :octicons-history-16: **[Changelog](https://github.com/eclypse-org/eclypse/blob/main/CHANGELOG.md)**
+
+ ---
+
+ Track released versions and the latest published framework changes.
+
+