Files
plba/requirements/Architectural constraints.md
2026-03-05 11:46:05 +03:00

51 lines
1.1 KiB
Markdown

# Architectural Constraints
## Main constraints
1. `Worker` is the primary runtime abstraction.
2. `ApplicationModule` assembles the application and registers workers.
3. Business behavior should live outside worker lifecycle code.
4. The platform should avoid queue-centric abstractions as first-class architecture.
5. Utility components are allowed only when they remain optional and transparent.
## Worker constraints
Worker should own:
- thread/process lifecycle
- execution strategy
- graceful stop
- runtime state
- health state
Worker should not own:
- large business workflows
- domain rules
- parsing plus persistence plus integration logic in one class
## Business-code constraints
Business routines and services should own:
- business decisions
- external integration calls
- persistence
- domain validation
They should not own:
- platform lifecycle
- worker supervision
- runtime status management
## API constraints
Public API should stay small and clear.
Prefer:
- `ApplicationModule`
- `Worker`
- runtime services
- utility queue
Avoid:
- legacy abstractions preserved only for compatibility
- specialized platform roles without strong need