A simple polyglot distributed system for running jobs across a cluster.
-
Clone and build: git clone cd job-orchestrator ./scripts/build-all.sh
-
Terminal 1 - Coordinator:
cd coordinator && rebar3 shell -
Terminal 2 - Worker:
cd worker && cargo run -- --id worker-1 -
Terminal 3 - Gateway:
cd gateway && ./bin/gateway 8080 -
Terminal 4 - Scheduler:
cd scheduler && source venv/bin/activate && python scheduler.py
Submit a job:
cd gateway && ./bin/job-cli submit echo "Hello World"
Submit with options:
./bin/job-cli --priority 8 --retries 5 submit sleep 10
Check health:
./bin/job-cli health
Query job status:
./bin/job-cli query JOB_ID
curl -X POST http://localhost:8080/jobs
-H "Content-Type: application/json"
-d '{"command":"echo","args":["hello"]}'
Component Language Port Command
Gateway Crystal 8080 ./bin/gateway 8080
Coordinator Erlang 9000 rebar3 shell
Worker Rust 5001+ cargo run -- --id worker-1
Scheduler Python 5000 python scheduler.py
MIT - Educational Purpose