PLBA2-1. Спецификация
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
# PLBA v2
|
||||
|
||||
PLBA v2 is a compact, transport-neutral runtime for business microservices. It owns application lifecycle, worker supervision, versioned configuration snapshots, traces, structured logging, health aggregation, workflows and an optional audit port.
|
||||
|
||||
It deliberately does not own task queues, RabbitMQ clients, gRPC servers, HTTP servers, a database driver, or business logic. A service supplies those as adapters and owns its entrypoint.
|
||||
|
||||
## Status
|
||||
|
||||
This repository contains the first executable skeleton and public contracts. It is a breaking, separate package from PLBA v1; no v1 compatibility facade is provided.
|
||||
|
||||
## Run checks
|
||||
|
||||
```bash
|
||||
python -m unittest discover -s tests -v
|
||||
```
|
||||
|
||||
## Configuration-service shape
|
||||
|
||||
```python
|
||||
runtime = Runtime(
|
||||
configuration=ConfigurationSnapshotManager(
|
||||
client=configuration_grpc_adapter,
|
||||
scope="configuration-service",
|
||||
validator=validate_configuration,
|
||||
),
|
||||
workers=[grpc_server_worker, configuration_changed_consumer],
|
||||
)
|
||||
|
||||
await runtime.start()
|
||||
# The RabbitMQ adapter invokes the registered callback after configuration.changed.
|
||||
# The manager refetches and atomically swaps the validated snapshot.
|
||||
await runtime.stop(timeout_seconds=20)
|
||||
```
|
||||
|
||||
The adapter authenticates using bootstrap values read by the service from environment/secrets. Business code reads `manager.current()` and never makes a synchronous configuration-service call.
|
||||
Reference in New Issue
Block a user