lablup / lablup/backend.ai

Extract ImageService + ResourceService + StatsService; Agent becomes thin coordinator

Open
#12,617 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
670
Forks
183
Avg merge
15h 13m
Merged PRs (30d)
368

Description

Extract image handling, resource acquire/release (alloc_map allocate/free, PortPool allocate/free), and stat collection into services. Resource managers use the existing symmetric primitives (no new common interface). Agent becomes a thin coordinator over these + KernelService/LifecycleService. Priority target = Sokovan-driven ops (check_and_pull -> ImageService, assign_port -> ResourceService); commit/push/purge, scan_gpu_alloc_map etc. deferred.

Success Criteria:
- [ ] image/resource/stats flows route through their services with parity (via the #1 CLI).
- [ ] alloc_map + PortPool acquire/release owned by ResourceService (symmetric, idempotent release).
- [ ] AbstractAgent field/method count materially reduced (thin coordinator).
- [ ] pants test passes for affected packages

JIRA Issue: BA-6763

Contributor guide

Open the contributing guide

Research direction

Start at AbstractAgent and trace the #1 CLI Sokovan paths, especially check_and_pull and assign_port. Compare the existing image handling, alloc_map and PortPool acquire/release, and stat collection with the proposed ImageService, ResourceService, and StatsService boundaries. Done means the targeted flows route through the services with parity, releases are symmetric and idempotent, affected pants tests pass, and AbstractAgent is materially thinner.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, distributed-systems
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.