How pulkittiwari87/atlas works
ATLAS is a distributed job-execution platform. Clients submit jobs through REST; the service persists jobs and tasks, then scheduling and dispatch route work to worker runtimes for execution and attempt persistence. Heartbeats feed failure detection, which triggers recovery and retries. The graph also shows the gRPC transport and the shared PostgreSQL source of truth. Some internal wiring is supported only by README descriptions or source-index references; those limits are reflected in the evidence citations.
Main entry points: job_service.py Job Service · repositories.py Repositories · dispatcher.py Dispatcher · grpc_client.py Worker gRPC Client
Components 20
Job Intake
- REST API
src/atlas/api/routes/jobs.py - Job Service
src/atlas/services/job_service.py - Job and Task Model
src/atlas/domain/task.py
Control Plane
- Priority Scheduler
src/atlas/scheduler/scheduler.py - Dispatch Loop
src/atlas/dispatch/loop.py - Dispatcher
src/atlas/dispatch/dispatcher.py - Failure Detector
src/atlas/failure_detection/detector.py - Recovery Manager
src/atlas/recovery/recovery.py
Worker Execution
- gRPC Server
src/atlas/grpc_server/server.py - Worker Service
src/atlas/grpc_server/service.py - gRPC Worker Registry
src/atlas/grpc_server/registry.py - Worker gRPC Client
src/atlas/worker/grpc_client.py - Worker Runtime
src/atlas/worker/runtime.py
State and Observability
- Database Sessions
src/atlas/persistence/db.py - Repositories
src/atlas/persistence/repositories.py - Database Models
src/atlas/persistence/models.py - PostgreSQL
- Structured Events
src/atlas/observability/logging.py
Other components
- Client
- Worker Process
Connections 27
- Client → REST API: submits jobs
README.md - REST API → Job Service: calls
src/atlas/api/routes/jobs.py - REST API → Job Service: routes requests
- Job Service → Repositories: persists jobs
src/atlas/services/job_service.py - Job Service → Job and Task Model: creates and transitions
src/atlas/services/job_service.py - Job Service → Structured Events: logs events
src/atlas/services/job_service.py - Priority Scheduler → PostgreSQL: selects runnable tasks
README.md - Dispatch Loop → Priority Scheduler: requests proposals
src/atlas/dispatch/loop.py - Dispatch Loop → Dispatcher: dispatches proposals
src/atlas/dispatch/loop.py - Dispatcher → gRPC Worker Registry: looks up workers
src/atlas/dispatch/dispatcher.py - Dispatcher → Worker Runtime: dispatches tasks
README.md - Dispatcher → Structured Events: logs outcomes
src/atlas/dispatch/dispatcher.py - gRPC Server → Worker Service: registers service
src/atlas/grpc_server/server.py - Worker Service → gRPC Worker Registry: registers workers and delivers results
src/atlas/grpc_server/service.py - Worker Service → Repositories: updates worker records
src/atlas/grpc_server/service.py - Worker Process → Worker gRPC Client: runs
- Worker gRPC Client → gRPC Server: uses gRPC
src/atlas/worker/grpc_client.py - Worker gRPC Client → Worker Runtime: delegates execution
src/atlas/worker/grpc_client.py - Worker gRPC Client → Worker Service: sends heartbeats
src/atlas/worker/grpc_client.py - Worker Runtime → Repositories: persists attempts and task state
README.md - Failure Detector → PostgreSQL: checks heartbeats
README.md - Failure Detector → Recovery Manager: triggers recovery
README.md - Recovery Manager → PostgreSQL: recovers tasks and retries
README.md - Job Service → Database Sessions: opens transactions
src/atlas/services/job_service.py - Repositories → Database Models: maps database rows
src/atlas/persistence/repositories.py - Database Sessions → PostgreSQL: commits transactions
src/atlas/persistence/db.py - Repositories → PostgreSQL: reads and writes state
README.md