How dkush2024-dot/e-waste-computer-grid works
E-Waste Compute Grid coordinates batch jobs across older computers: administrators submit dummy or image-classification workloads, the control plane stores and dispatches tasks to registered workers, workers execute them and report results, and the dashboard presents grid and job status. The repository also includes energy accounting, scheduling, result aggregation, and model-artifact management. The map follows documented capabilities and sampled call/reference evidence; some workload and reporting links are omitted where their runtime wiring was not shown.
Main entry points: app.ts HTTP API and orchestration · api_client.py Control-plane API client · task_executor.py Task executor · storage.ts Input and result storage
Components 22
Dashboard
- Grid dashboard
frontend/src/App.tsx - Dashboard API client
frontend/src/services/api.ts
Control Plane
- HTTP API and orchestration
control-plane/src/app.ts - Job and result validation
control-plane/src/validation.ts - Control-plane configuration
control-plane/src/config.ts - Input and result storage
control-plane/src/storage.ts - Coordination database
control-plane/prisma/schema.prisma
Worker Runtime
- Worker agent
worker/agent.py - Control-plane API client
worker/api_client.py - Worker configuration
worker/config.py - Hardware discovery
worker/hardware.py - Task executor
worker/task_executor.py
Workloads & Compute
- Task runner and metrics
workloads/task_runner.py - Deterministic demo workload
workloads/dummy-workload/run_dummy.py - MobileNetV2 inference
workloads/ai-inference/run_inference.py - Model artifact manager
workloads/ai-inference/s3_model_manager.py - Energy and savings calculator
workloads/energy/energy_calculator.py - Power measurement
workloads/energy/power_meter.py - Scheduling scorer
workloads/scheduler_scorer.py - Result aggregation
workloads/result_aggregator.py
Other components
- Grid administrator
- S3 object storage
Connections 20
- Grid administrator → Grid dashboard: manages jobs
README.md - Grid dashboard → Dashboard API client: requests data
frontend/src/App.tsx - Dashboard API client → HTTP API and orchestration: calls HTTP API
- Worker agent → Control-plane API client: uses client
worker/agent.py - Worker agent → Task executor: runs tasks
worker/agent.py - Control-plane API client → HTTP API and orchestration: calls worker endpoints
worker/api_client.py - HTTP API and orchestration → Job and result validation: validates requests
control-plane/src/app.ts - HTTP API and orchestration → Input and result storage: reads and writes objects
control-plane/src/app.ts - Input and result storage → Control-plane configuration: uses settings
control-plane/src/storage.ts - Input and result storage → S3 object storage: stores objects
- HTTP API and orchestration → Coordination database: coordinates jobs
- Control-plane API client → Hardware discovery: reports capabilities
worker/api_client.py - Control-plane API client → Worker configuration: uses settings
worker/api_client.py - Task executor → Worker configuration: uses settings
worker/task_executor.py - Task executor → Deterministic demo workload: runs configured workload
- Task executor → MobileNetV2 inference: runs configured workload
- Model artifact manager → S3 object storage: downloads artifacts
workloads/ai-inference/s3_model_manager.py - Task runner and metrics → Energy and savings calculator: estimates energy
workloads/task_runner.py - Power measurement → Energy and savings calculator: uses calculations
workloads/energy/power_meter.py - Scheduling scorer → Energy and savings calculator: uses energy estimates
workloads/scheduler_scorer.py