chore: remove legacy startup paths
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
# Current Architecture
|
||||
|
||||
This file describes the current code-supported architecture only. Historical
|
||||
paths and partial migrations are intentionally excluded unless called out as
|
||||
legacy compatibility.
|
||||
paths and partial migrations are intentionally excluded unless brief historical
|
||||
context is needed to explain the current shape.
|
||||
|
||||
Reference material:
|
||||
|
||||
@@ -11,40 +11,21 @@ Reference material:
|
||||
- legacy inventory: [legacy-inventory.md](./legacy-inventory.md)
|
||||
- terminology guide: [terminology.md](./terminology.md)
|
||||
|
||||
## Runtime Modes
|
||||
## Runtime Mode
|
||||
|
||||
The system supports two distinct runtime modes:
|
||||
The supported runtime model is the split-service development architecture.
|
||||
|
||||
### Standalone Mode (Legacy Compatibility)
|
||||
|
||||
Direct Gateway startup via `backend.main` as a monolithic entrypoint.
|
||||
|
||||
```bash
|
||||
python -m backend.main --mode live --port 8765
|
||||
```
|
||||
|
||||
**Characteristics:**
|
||||
- Single process runs Gateway, Pipeline, Market Service, and Scheduler
|
||||
- No service discovery or process management
|
||||
- Suitable for single-node deployments and quick testing
|
||||
- All components share the same memory space
|
||||
|
||||
**Use cases:**
|
||||
- Quick local testing without service orchestration
|
||||
- Single-node production deployments
|
||||
- Backward compatibility with legacy startup scripts
|
||||
|
||||
### Microservice Mode (Default for Development)
|
||||
|
||||
Split-service architecture with dedicated runtime_service managing the Gateway lifecycle.
|
||||
Split-service architecture with a dedicated runtime API surface and a separate
|
||||
Gateway process.
|
||||
|
||||
```bash
|
||||
./start-dev.sh # Starts all services including runtime_service and Gateway
|
||||
```
|
||||
|
||||
**Characteristics:**
|
||||
- `runtime_service` (:8003) acts as Gateway Process Manager
|
||||
- Gateway runs as a subprocess managed by runtime_service
|
||||
- `runtime_service` (:8003) provides runtime lifecycle APIs
|
||||
- the checked-in `start-dev.sh` starts split services and lets `runtime_service` spawn Gateway
|
||||
- manual split-service flows can also let `runtime_service` spawn Gateway
|
||||
- Clear separation between Control Plane (runtime_service) and Data Plane (Gateway)
|
||||
- Service discovery via environment variables
|
||||
- Independent scaling and deployment of each service
|
||||
@@ -54,20 +35,7 @@ Split-service architecture with dedicated runtime_service managing the Gateway l
|
||||
- Multi-node deployments
|
||||
- Production environments requiring service isolation
|
||||
|
||||
## Mode Comparison
|
||||
|
||||
| Aspect | Standalone Mode | Microservice Mode |
|
||||
|--------|-----------------|-------------------|
|
||||
| **Entry point** | `python -m backend.main` | `./start-dev.sh` or individual services |
|
||||
| **Process model** | Single monolithic process | Multiple specialized processes |
|
||||
| **Gateway management** | Self-contained | Managed by runtime_service |
|
||||
| **Service discovery** | None (in-process) | Environment variable based |
|
||||
| **Hot reload** | Full restart required | Per-service reload |
|
||||
| **Scaling** | Vertical only | Horizontal possible |
|
||||
| **Complexity** | Lower | Higher |
|
||||
| **Use case** | Testing, simple deployments | Development, production |
|
||||
|
||||
## Default Runtime Shape (Microservice Mode)
|
||||
## Default Runtime Shape
|
||||
|
||||
The active runtime path is:
|
||||
|
||||
@@ -83,7 +51,6 @@ Current service surfaces:
|
||||
- read-only explain/news APIs
|
||||
- `backend.apps.runtime_service` on `:8003`
|
||||
- runtime lifecycle and gateway process management
|
||||
- optional OpenClaw REST facade
|
||||
- gateway WebSocket on `:8765`
|
||||
- live feed/event transport and pipeline coordination
|
||||
|
||||
@@ -163,11 +130,11 @@ use `docker` mode with appropriate resource limits.
|
||||
|
||||
### Current State
|
||||
|
||||
The system is in a transitional state:
|
||||
The system is in an active development state:
|
||||
|
||||
1. **Microservice infrastructure is operational** - runtime_service can start/stop Gateway as subprocess
|
||||
2. **Pipeline logic remains in Gateway** - full Pipeline execution still happens within Gateway process
|
||||
3. **Standalone mode is preserved** - direct `backend.main` startup for compatibility
|
||||
3. **Direct gateway startup has been removed** - the repository now exposes a single supported startup model
|
||||
|
||||
### Future Direction
|
||||
|
||||
@@ -184,9 +151,9 @@ Phase 3: Pipeline decomposition (planned)
|
||||
- Gateway becomes a thin event router
|
||||
- runtime_service evolves into full orchestrator
|
||||
|
||||
Phase 4: Standalone mode deprecation (future)
|
||||
- Remove direct `backend.main` entry point
|
||||
- All deployments use microservice mode
|
||||
Phase 4: Deployment convergence (future)
|
||||
- Remove or rewrite historical deployment artifacts
|
||||
- Keep all documented startup paths aligned with `runtime_service`
|
||||
|
||||
## Legacy Compatibility
|
||||
|
||||
@@ -194,8 +161,8 @@ These items still exist, but they are not the recommended source of truth for
|
||||
new development:
|
||||
|
||||
- root-level runtime data directories such as `live/`, `production/`, `backtest/`
|
||||
- direct `backend.main` startup as the primary development path
|
||||
- historical documentation gaps that have not yet been fully rewritten
|
||||
|
||||
The current runtime still creates legacy `AnalystAgent` / `RiskAgent` /
|
||||
`PMAgent` instances directly. EvoAgent remains an in-progress migration target,
|
||||
not the default execution path.
|
||||
Legacy fallback agent paths still exist in compatibility-oriented creation
|
||||
flows, but the default `TradingPipeline` runtime now prefers `EvoAgent` for the
|
||||
supported roles unless rollout settings explicitly reduce that set.
|
||||
|
||||
Reference in New Issue
Block a user