Decorative Crystal
DevOpsInfrastructureDockerDistributed SystemsWebSocketResearch

DockNet

Container Orchestration for Reproducible Distributed System Research

schedule15 min
calendar_todayPublished 2024
code10 technologies
DockNet

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.

§1

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
§2

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.

System Diagram
Figure 1: DockNet System Architecture showing the three-tier design with Central Node, Dashboard, and Worker Nodes communicating via WebSocket 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.

§3

Architecture

Data Flow Architecture

The system implements three primary data flow patterns: simulation startup, real-time telemetry streaming, and bulk telemetry upload.

System Diagram
Figure 2: Telemetry and Control Flow showing the startup sequence, real-time streaming, and bulk upload patterns.
§4

Implementation

Implementation Details

tips_and_updates

Key Design Decisions

SQLite was chosen for telemetry persistence due to its simplicity and zero-configuration setup. WebSocket enables bi-directional real-time communication without polling overhead.

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.

Telemetry Message Schema
typescript
1interface TelemetryMessage {
2 node_id: string;
3 tx_id: string;
4 tx_time_ms: number;
5 pow_time_ms: number;
6}
7
8interface NodeStatusMessage {
9 type: 'node_status';
10 payload: {
11 online_nodes: string[];
12 offline_nodes: string[];
13 };
14}

Docker Configuration

docker-compose.yaml
yaml
1version: '3.8'
2
3networks:
4 docknet:
5 driver: bridge
6 ipam:
7 config:
8 - subnet: 172.25.0.0/24
9
10services:
11 docknet-central:
12 build: ./central
13 container_name: docknet-central
14 networks:
15 docknet:
16 ipv4_address: 172.25.0.10
17 ports:
18 - "8000:8000"
19 volumes:
20 - ./central/data:/data
21 - /var/run/docker.sock:/var/run/docker.sock
§5

API Reference

API Reference

Start Workers

GET /api/start
http
1GET /api/start?node_count=5&tx_count=100&tx_delay=50&max_peers=5&pow=3&run=0&wait=300
2
3# 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)
11
12Response:
13{
14 "message": "5 workers started"
15}

Upload Telemetry

POST /api/telemetry
http
1POST /api/telemetry
2Content-Type: application/json
3
4{
5 "nodeId": "worker1",
6 "tangle": [...],
7 "peers": [...],
8 "metrics": {
9 "total_transactions": 100,
10 "avg_tx_time_ms": 45,
11 "avg_pow_time_ms": 120
12 },
13 "runId": 0,
14 "metadata": {...}
15}
16
17Response:
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}
§6

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.

check_circle

Research Impact

The platform has been used to prototype and benchmark Tangle-style DAG algorithms, demonstrating the viability of containerized network emulation for distributed systems research.

Key Metrics

timer
80%
Setup Time Reduction
sync
0
Env Drift Issues
dns
100+
Nodes Supported
speed
<50ms
Telemetry Latency
§7

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.

§8

Technologies

DockerDocker ComposeExpress.jsNode.jsWebSocketSQLiteReact 19ViteC++NGINX

Related Case Studies

Decorative Crystal

Let's work together

Have a project in mind?

Whether you need automation systems, AI integrations, or scalable backend infrastructure — I'm here to help turn your ideas into production-ready solutions.

Location

India (UTC+5:30)

Open to remote work worldwide

Connect
GitHubLinkedInX
rishab dugarFull-Stack Engineer
© 2026 Rishab Dugar. Built with love ❤️