This package is a discrete-event simulator designed to compare task scheduling latency across three different architectures.
- A central scheduler directly assigns tasks to nodes.
- The central scheduler monitors node liveness directly.
- If a node failure is detected during a direct probe immediately before scheduling, a reschedule occurs, increasing latency.
- Assumes a scheduler is elected via a blockchain network.
- Node liveness is reflected in the ledger, incurring overhead for election, consensus, and verification.
- If the ledger is stale, tasks may be incorrectly assigned to failed nodes, leading to subsequent reschedules.
- A control server receives task submissions and manages multi-queues.
- Execution agents pull tasks from the control server.
- Management agents on each node monitor execution agents and reflect liveness quickly via a Distributed Hash Table (DHT).
- Liveness check costs are low due to DHT lookups and multi-queue dispatching, resulting in relatively lower modeled reschedule overhead.
usage: main.py [-h] [--num-tasks NUM_TASKS] [--num-nodes NUM_NODES] [--failure-rate FAILURE_RATE] [--arrival-rate ARRIVAL_RATE]
[--mean-task-duration MEAN_TASK_DURATION] [--node-repair-time NODE_REPAIR_TIME] [--max-retries MAX_RETRIES] [--seed SEED]
[--mode {centralized,blockchain,mutual_cloud,mutual,all}] [--output-csv OUTPUT_CSV]
Scheduling latency simulator for centralized, blockchain, and mutual cloud modes
options:
-h, --help show this help message and exit
--num-tasks NUM_TASKS
--num-nodes NUM_NODES
--failure-rate FAILURE_RATE
--arrival-rate ARRIVAL_RATE
--mean-task-duration MEAN_TASK_DURATION
--node-repair-time NODE_REPAIR_TIME
--max-retries MAX_RETRIES
--seed SEED
--mode {centralized,blockchain,mutual_cloud,mutual,all}
--output-csv OUTPUT_CSV
Run simulation:
python -m main --num-tasks 2000 --num-nodes 64 --failure-rate 0.05 --mode all