DockNet
Container Orchestration for Reproducible Distributed System Research

Abstract
DockNet is a containerized network emulation platform that enables researchers and engineers to prototype, benchmark, and stress-test distributed system algorithms. By leveraging Docker containers, DockNet provides isolated, reproducible environments for simulating arbitrary network topologies. The system features a three-tier architecture with a central orchestration node, real-time dashboard visualization, and dynamic worker nodes. This paper presents the system architecture, implementation details, API reference, and performance characteristics of the DockNet platform.
Problem Statement
Development and testing of distributed system algorithms requires consistent, reproducible environments that can simulate complex network topologies. Manual setup is error-prone, environments drift between machines, and observing system behavior in real-time is challenging.
Key Challenges
- ●Environment inconsistency across development machines
- ●Difficulty simulating network topologies and latency
- ●Lack of real-time visibility into distributed node behavior
- ●Complex setup procedures for each experiment
- ●No standardized way to collect and analyze telemetry
Solution
DockNet addresses these challenges through a containerized approach: Docker containers provide isolation and reproducibility, a central orchestration node manages the lifecycle of worker containers, WebSocket connections enable real-time telemetry streaming, and a React-based dashboard provides live visualization of the distributed system state.
System Architecture
The system follows a three-tier architecture pattern: Central Node (Orchestration), Dashboard (Visualization), and Worker Nodes (Execution). Each tier communicates via WebSocket and REST APIs within an isolated Docker network.
1. Central Node (Orchestration Layer)
- Container
- docknet-central
- IP Address
- 172.25.0.10
- Port
- 8000 (HTTP API + WebSocket)
- Technology Stack
- Express.js, Node.js WebSocket, SQLite, dockerode
The Central Node serves as the orchestration hub, managing worker node lifecycle, persisting telemetry data to SQLite, and broadcasting real-time updates to connected dashboards.
2. Dashboard (Visualization Layer)
A React 19 application built with Vite, providing real-time transaction DAG visualization using react-force-graph, live telemetry streaming via WebSocket, and simulation control interface.
3. Worker Nodes (Execution Layer)
Dynamic containers running the tangle_poc binary, each executing the distributed protocol and reporting telemetry via WebSocket to the Central Node.
Architecture
Data Flow Architecture
The system implements three primary data flow patterns: simulation startup, real-time telemetry streaming, and bulk telemetry upload.
Implementation
Implementation Details
Key Design Decisions
WebSocket Protocol
The system uses a custom WebSocket protocol with three message types: telemetry (worker to central), telemetry broadcast (central to dashboard), and node status updates. Heartbeat mechanism uses 5-second intervals with 10-second timeout.
1interface TelemetryMessage {2node_id: string;3tx_id: string;4tx_time_ms: number;5pow_time_ms: number;6}78interface NodeStatusMessage {9type: 'node_status';10payload: {11online_nodes: string[];12offline_nodes: string[];13};14}
Docker Configuration
1version: '3.8'23networks:4docknet:5driver: bridge6ipam:7config:8- subnet: 172.25.0.0/24910services:11docknet-central:12build: ./central13container_name: docknet-central14networks:15docknet:16ipv4_address: 172.25.0.1017ports:18- "8000:8000"19volumes:20- ./central/data:/data21- /var/run/docker.sock:/var/run/docker.sock
API Reference
API Reference
Start Workers
1GET /api/start?node_count=5&tx_count=100&tx_delay=50&max_peers=5&pow=3&run=0&wait=30023# Query Parameters:4# node_count (required): Number of worker nodes (≥1)5# tx_count (required): Transactions per node (≥1)6# tx_delay (required): Delay between transactions in ms (≥0)7# max_peers (required): Max peer connections (≥1)8# pow (optional): PoW difficulty 1-5 (default: 3)9# run (optional): Run ID (default: 0)10# wait (optional): Wait period in seconds (default: 300)1112Response:13{14"message": "5 workers started"15}
Upload Telemetry
1POST /api/telemetry2Content-Type: application/json34{5"nodeId": "worker1",6"tangle": [...],7"peers": [...],8"metrics": {9"total_transactions": 100,10"avg_tx_time_ms": 45,11"avg_pow_time_ms": 12012},13"runId": 0,14"metadata": {...}15}1617Response:18{19"message": "success",20"run": "run0",21"nodeId": "worker1",22"saved": {23"tangle": "tangle.json",24"peers": "peers.json",25"metrics": "metrics.json"26}27}
Results
DockNet successfully enables reproducible distributed system research with containerized network emulation. The platform achieves 80% reduction in setup time, eliminates environment drift, and provides real-time observability into distributed algorithm behavior.
Research Impact
Key Metrics
Conclusion
DockNet demonstrates that containerized network emulation is a viable approach for distributed systems research. The three-tier architecture provides clear separation of concerns, while WebSocket-based telemetry enables real-time observability. Future work could address network simulation limitations (latency, packet loss) and explore Kubernetes-based deployment for larger-scale experiments.
