docs: add production data plane inventory
This commit is contained in:
@@ -41,7 +41,7 @@ flowchart LR
|
||||
|
||||
## Minimal Storage Contract
|
||||
|
||||
详细的落库边界见 [车辆数据最小落库合约](storage-minimal-contract.md)。
|
||||
详细的落库边界见 [车辆数据最小落库合约](storage-minimal-contract.md),当前生产数据面见 [生产数据面清单](production-data-plane-inventory.md)。
|
||||
|
||||
| Store | Table or key | Purpose | Keep | Avoid |
|
||||
| --- | --- | --- | --- | --- |
|
||||
@@ -52,7 +52,8 @@ flowchart LR
|
||||
| MySQL | `vehicle_daily_mileage` | Queryable daily mileage | vin or vehicle key, date, protocol, daily mileage, source mileage | generic metric key/value rows, per-frame raw details |
|
||||
| MySQL | `vehicle_identity_binding` | Manual identity mapping | vin, plate, phone, device id | registration history |
|
||||
| MySQL | `jt808_registration` | JT808 registration and auth trace | phone, device id, plate, auth code, vin match state, first/latest seen | GB32960 or MQTT records |
|
||||
| Redis | `realtime-raw:{protocol}:{vin}` | Latest full realtime protocol state | merged latest protocol payload | historical data |
|
||||
| Redis | `vehicle:latest:{vehicleKey}` | Latest merged realtime state | cross-protocol latest fields | historical data |
|
||||
| Redis | `vehicle:realtime-raw:{protocol}:{vehicleKey}` | Latest full realtime protocol state | latest protocol parsed payload | historical data |
|
||||
|
||||
## Event Envelope Rules
|
||||
|
||||
@@ -77,10 +78,11 @@ Every received frame should become one `FrameEnvelope`.
|
||||
|
||||
## Current Next Steps
|
||||
|
||||
1. Add health and readiness endpoints to each long-running Go service.
|
||||
2. Add runtime metrics for protocol frame counts, parse failures, Kafka/NATS publish failures, and writer lag.
|
||||
3. Review TDengine tables and remove unused tables only after export or explicit confirmation.
|
||||
4. Keep new business tables narrow by default. Add a column only when a query or index proves it is needed.
|
||||
1. Keep production inventory current whenever a service, topic, table, or Redis key family changes.
|
||||
2. Add parser correctness tests before changing GB32960, JT808, or Yutong MQTT field extraction.
|
||||
3. Add lag and write-failure alerts from the existing `/metrics` endpoints.
|
||||
4. Isolate or delete legacy Kafka topics only after confirming no external consumers still depend on them.
|
||||
5. Keep new business tables narrow by default. Add a column only when a query or index proves it is needed.
|
||||
|
||||
## Runtime Metrics Baseline
|
||||
|
||||
|
||||
Reference in New Issue
Block a user