# sdabis/mls_experimental_analysis architecture

> Architecture diagram of the GitHub repository sdabis/mls_experimental_analysis, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sdabis/mls_experimental_analysis
- Repository: https://github.com/sdabis/mls_experimental_analysis

## Overview

This is an MLS protocol emulation testbed. Its main workflow configures autonomous clients, which perform MLS group operations and exchange messages through either MQTT or GossipSub delivery services; a rendezvous server supports the documented GossipSub setup. OpenMLS supplies the protocol implementation, with provider traits and storage beneath it. The README documents these capabilities, but many runtime modules were not sampled, so uncertain implementation links are omitted. The analysis scripts are supporting tools rather than part of the client runtime.

Main entry points: [`emulated_client/emulated_client/src/user.rs`](https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/emulated_client/src/user.rs) (MLS user), [`emulated_client/openmls/src/group/mls_group/application.rs`](https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/openmls/src/group/mls_group/application.rs) (MLS groups), [`emulated_client/traits/src/storage.rs`](https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/traits/src/storage.rs) (Provider traits), [`emulated_client/emulated_client/src/client_agent/orchestrated.rs`](https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/emulated_client/src/client_agent/orchestrated.rs) (Client behavior)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Emulated clients"]
  node_settings["Client settings<br/>[user_parameters.rs]"]
  node_agent["Client behavior<br/>[orchestrated.rs]"]
  node_orchestrator["Commit coordination<br/>[orchestrator.rs]"]
  node_user["MLS user<br/>[user.rs]"]
end

subgraph group_delivery["Delivery services"]
  node_mqtt["MQTT delivery<br/>[mqtt_broker.rs]"]
  node_gossip["GossipSub delivery"]
  node_ds["Delivery service<br/>[main.rs]"]
  node_ds_lib["Delivery service library<br/>[lib.rs]"]
  node_rendezvous["Rendezvous server<br/>[main.rs]"]
end

subgraph group_protocol["MLS protocol"]
  node_keypackages["Key packages<br/>[mod.rs]"]
  node_groups["MLS groups<br/>[application.rs]"]
  node_framing["Message framing"]
  node_schedule["Key schedule<br/>[mod.rs]"]
  node_treesync["Tree synchronization<br/>[mod.rs]"]
end

subgraph group_providers["Crypto and storage"]
  node_traits["Provider traits<br/>[storage.rs]"]
  node_storage["MLS storage API<br/>[storage.rs]"]
  node_memory[("Memory storage<br/>[lib.rs]")]
  node_rustcrypto["Rust crypto provider<br/>[provider.rs]"]
  node_libcrux["Libcrux crypto<br/>[crypto.rs]"]
end

subgraph group_analysis["Experiment analysis"]
  node_logs["Log parser<br/>[log_parser.py]"]
  node_plots["Analysis plots<br/>[latency_plot.py]"]
end

node_operator(("Simulation operator"))

node_operator -->|"configures"| node_settings
node_settings -->|"sets behavior"| node_agent
node_agent -->|"drives"| node_user
node_agent -->|"coordinates commits"| node_orchestrator
node_user -->|"sends messages"| node_mqtt
node_user -->|"sends messages"| node_gossip
node_operator -->|"deploys service"| node_ds
node_operator -.->|"enables optionally"| node_rendezvous
node_mqtt -.->|"uses delivery service"| node_ds
node_gossip -.->|"discovers peers"| node_rendezvous
node_user -.->|"performs MLS operations"| node_groups
node_groups -.->|"uses packages"| node_keypackages
node_groups -->|"creates messages"| node_framing
node_groups -->|"persists state"| node_storage
node_storage -->|"specializes"| node_traits
node_memory -.->|"implements"| node_traits
node_rustcrypto -.->|"provides crypto"| node_traits
node_libcrux -.->|"provides crypto"| node_traits
node_operator -->|"analyzes logs"| node_logs
node_logs -.->|"produces data for"| node_plots

click node_settings "https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/emulated_client/src/config/user_parameters.rs"
click node_agent "https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/emulated_client/src/client_agent/orchestrated.rs"
click node_orchestrator "https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/emulated_client/src/orchestrator.rs"
click node_user "https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/emulated_client/src/user.rs"
click node_mqtt "https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/emulated_client/src/pubsub/mqtt_broker.rs"
click node_gossip "https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/emulated_client/src/pubsub/gossipsub_broker.rs"
click node_ds "https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/delivery-service/ds/src/main.rs"
click node_ds_lib "https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/delivery-service/ds-lib/src/lib.rs"
click node_rendezvous "https://github.com/sdabis/mls_experimental_analysis/blob/main/environment/client/rendezvous/main.rs"
click node_keypackages "https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/openmls/src/key_packages/mod.rs"
click node_groups "https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/openmls/src/group/mls_group/application.rs"
click node_framing "https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/openmls/src/framing/mls_auth_content.rs"
click node_schedule "https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/openmls/src/schedule/mod.rs"
click node_treesync "https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/openmls/src/treesync/mod.rs"
click node_traits "https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/traits/src/storage.rs"
click node_storage "https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/openmls/src/storage.rs"
click node_memory "https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/memory_storage/src/lib.rs"
click node_rustcrypto "https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/openmls_rust_crypto/src/provider.rs"
click node_libcrux "https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/libcrux_crypto/src/crypto.rs"
click node_logs "https://github.com/sdabis/mls_experimental_analysis/blob/main/environment/log_scripts/log_parser.py"
click node_plots "https://github.com/sdabis/mls_experimental_analysis/blob/main/environment/log_scripts/latency_plot.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_settings,node_agent,node_orchestrator,node_user toneBlue
class node_mqtt,node_gossip,node_ds,node_ds_lib,node_rendezvous toneAmber
class node_keypackages,node_groups,node_framing,node_schedule,node_treesync toneMint
class node_traits,node_storage,node_memory,node_rustcrypto,node_libcrux toneRose
class node_logs,node_plots,node_operator toneIndigo
```

## Components

### Emulated clients

- [Client settings](https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/emulated_client/src/config/user_parameters.rs): `emulated_client/emulated_client/src/config/user_parameters.rs`
- [Client behavior](https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/emulated_client/src/client_agent/orchestrated.rs): `emulated_client/emulated_client/src/client_agent/orchestrated.rs`
- [Commit coordination](https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/emulated_client/src/orchestrator.rs): `emulated_client/emulated_client/src/orchestrator.rs`
- [MLS user](https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/emulated_client/src/user.rs): `emulated_client/emulated_client/src/user.rs`

### Delivery services

- [MQTT delivery](https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/emulated_client/src/pubsub/mqtt_broker.rs): `emulated_client/emulated_client/src/pubsub/mqtt_broker.rs`
- [GossipSub delivery](https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/emulated_client/src/pubsub/gossipsub_broker.rs): `emulated_client/emulated_client/src/pubsub/gossipsub_broker.rs`
- [Delivery service](https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/delivery-service/ds/src/main.rs): `emulated_client/delivery-service/ds/src/main.rs`
- [Delivery service library](https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/delivery-service/ds-lib/src/lib.rs): `emulated_client/delivery-service/ds-lib/src/lib.rs`
- [Rendezvous server](https://github.com/sdabis/mls_experimental_analysis/blob/main/environment/client/rendezvous/main.rs): `environment/client/rendezvous/main.rs`

### MLS protocol

- [Key packages](https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/openmls/src/key_packages/mod.rs): `emulated_client/openmls/src/key_packages/mod.rs`
- [MLS groups](https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/openmls/src/group/mls_group/application.rs): `emulated_client/openmls/src/group/mls_group/application.rs`
- [Message framing](https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/openmls/src/framing/mls_auth_content.rs): `emulated_client/openmls/src/framing/mls_auth_content.rs`
- [Key schedule](https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/openmls/src/schedule/mod.rs): `emulated_client/openmls/src/schedule/mod.rs`
- [Tree synchronization](https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/openmls/src/treesync/mod.rs): `emulated_client/openmls/src/treesync/mod.rs`

### Crypto and storage

- [Provider traits](https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/traits/src/storage.rs): `emulated_client/traits/src/storage.rs`
- [MLS storage API](https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/openmls/src/storage.rs): `emulated_client/openmls/src/storage.rs`
- [Memory storage](https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/memory_storage/src/lib.rs): `emulated_client/memory_storage/src/lib.rs`
- [Rust crypto provider](https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/openmls_rust_crypto/src/provider.rs): `emulated_client/openmls_rust_crypto/src/provider.rs`
- [Libcrux crypto](https://github.com/sdabis/mls_experimental_analysis/blob/main/emulated_client/libcrux_crypto/src/crypto.rs): `emulated_client/libcrux_crypto/src/crypto.rs`

### Experiment analysis

- [Log parser](https://github.com/sdabis/mls_experimental_analysis/blob/main/environment/log_scripts/log_parser.py): `environment/log_scripts/log_parser.py`
- [Analysis plots](https://github.com/sdabis/mls_experimental_analysis/blob/main/environment/log_scripts/latency_plot.py): `environment/log_scripts/latency_plot.py`

### Other components

- **Simulation operator**

## Connections

- Simulation operator → Client settings: configures
- Client settings → Client behavior: sets behavior (evidence: `emulated_client/emulated_client/src/client_agent/orchestrated.rs`)
- Client behavior → MLS user: drives (evidence: `emulated_client/emulated_client/src/client_agent/orchestrated.rs`)
- Client behavior → Commit coordination: coordinates commits (evidence: `emulated_client/emulated_client/src/orchestrator.rs`)
- MLS user → MQTT delivery: sends messages (evidence: `emulated_client/emulated_client/src/user.rs`)
- MLS user → GossipSub delivery: sends messages (evidence: `emulated_client/emulated_client/src/user.rs`)
- Simulation operator → Delivery service: deploys service
- Simulation operator → Rendezvous server: enables optionally
- MQTT delivery → Delivery service: uses delivery service
- GossipSub delivery → Rendezvous server: discovers peers
- MLS user → MLS groups: performs MLS operations
- MLS groups → Key packages: uses packages
- MLS groups → Message framing: creates messages (evidence: `emulated_client/openmls/src/group/mls_group/application.rs`)
- MLS groups → MLS storage API: persists state (evidence: `emulated_client/openmls/src/group/mls_group/application.rs`)
- MLS storage API → Provider traits: specializes (evidence: `emulated_client/openmls/src/storage.rs`)
- Memory storage → Provider traits: implements
- Rust crypto provider → Provider traits: provides crypto
- Libcrux crypto → Provider traits: provides crypto
- Simulation operator → Log parser: analyzes logs
- Log parser → Analysis plots: produces data for
