Skip to content

feat(server): add distributed server with coordinator and worker roles#391

Merged
DorianZheng merged 1 commit into
mainfrom
feat/distributed-server
Mar 17, 2026
Merged

feat(server): add distributed server with coordinator and worker roles#391
DorianZheng merged 1 commit into
mainfrom
feat/distributed-server

Conversation

@DorianZheng

Copy link
Copy Markdown
Member

Introduces boxlite-server, a new crate that enables distributed box
management across multiple machines via a coordinator-worker architecture.

Architecture:

  • Coordinator: Accepts client REST requests (same API as boxlite serve),
    dispatches to workers via gRPC, manages worker registry and box routing
  • Worker: Runs BoxliteRuntime directly, exposes gRPC WorkerService,
    self-registers with coordinator on startup

Key components:

  • gRPC WorkerService (tonic) for coordinator-worker communication
  • SQLite StateStore with worker registry and box-to-worker mappings
  • Least-loaded scheduler for box placement across workers
  • Swagger UI at /swagger-ui/ for interactive API exploration
  • Human-readable worker names (e.g., "frosty-meadow-42")
  • Worker re-registration support (handles restarts gracefully)

Usage:
boxlite-server coordinator --port 8200
boxlite-server worker --coordinator http://coordinator:8200 --port 9100
boxlite --url http://coordinator:8200 create alpine:latest

Introduces `boxlite-server`, a new crate that enables distributed box
management across multiple machines via a coordinator-worker architecture.

Architecture:
- Coordinator: Accepts client REST requests (same API as `boxlite serve`),
  dispatches to workers via gRPC, manages worker registry and box routing
- Worker: Runs BoxliteRuntime directly, exposes gRPC WorkerService,
  self-registers with coordinator on startup

Key components:
- gRPC WorkerService (tonic) for coordinator-worker communication
- SQLite StateStore with worker registry and box-to-worker mappings
- Least-loaded scheduler for box placement across workers
- Swagger UI at /swagger-ui/ for interactive API exploration
- Human-readable worker names (e.g., "frosty-meadow-42")
- Worker re-registration support (handles restarts gracefully)

Usage:
  boxlite-server coordinator --port 8200
  boxlite-server worker --coordinator http://coordinator:8200 --port 9100
  boxlite --url http://coordinator:8200 create alpine:latest
@DorianZheng DorianZheng merged commit b95c901 into main Mar 17, 2026
18 checks passed
@DorianZheng DorianZheng deleted the feat/distributed-server branch March 17, 2026 08:15
@DorianZheng DorianZheng restored the feat/distributed-server branch March 17, 2026 08:28
@DorianZheng DorianZheng deleted the feat/distributed-server branch March 30, 2026 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant