docs(architecture): realtime layer in dependency-flow + vertical-feature-spec
This commit is contained in:
@@ -111,7 +111,11 @@ apps/web-next/src/server/bind-production.ts (bindAll)
|
|||||||
│ production → PayloadJobsEventBus + PayloadJobQueue
|
│ production → PayloadJobsEventBus + PayloadJobQueue
|
||||||
│ dev-seed → InMemoryEventBus + InMemoryJobQueue
|
│ dev-seed → InMemoryEventBus + InMemoryJobQueue
|
||||||
│ ↓
|
│ ↓
|
||||||
├─ bindProductionBlog(config, tracer, logger, bus, queue)
|
├─ resolveRealtime → IRealtimeBroadcaster + IRealtimeHandlerRegistry (ADR-016)
|
||||||
|
│ server.ts → SocketIORealtimeBroadcaster + RealtimeHandlerRegistry (passed in from server.ts)
|
||||||
|
│ page/test → InMemoryRealtimeBroadcaster + RealtimeHandlerRegistry (defaults)
|
||||||
|
│ ↓
|
||||||
|
├─ bindProductionBlog(config, tracer, logger, bus, queue, realtime, realtimeRegistry)
|
||||||
│ │
|
│ │
|
||||||
│ ├─ blogContainer.bind(TRACER).toConstantValue(tracer)
|
│ ├─ blogContainer.bind(TRACER).toConstantValue(tracer)
|
||||||
│ ├─ blogContainer.bind(LOGGER).toConstantValue(logger)
|
│ ├─ blogContainer.bind(LOGGER).toConstantValue(logger)
|
||||||
@@ -120,7 +124,8 @@ apps/web-next/src/server/bind-production.ts (bindAll)
|
|||||||
│ ├─ withSpan(tracer, ..., withCapture(logger, ..., useCase(deps))) → UseCase symbol
|
│ ├─ withSpan(tracer, ..., withCapture(logger, ..., useCase(deps))) → UseCase symbol
|
||||||
│ ├─ withSpan(tracer, ..., withCapture(logger, ..., controller(uc))) → Controller symbol
|
│ ├─ withSpan(tracer, ..., withCapture(logger, ..., controller(uc))) → Controller symbol
|
||||||
│ ├─ // <gen:event-handlers> bus.subscribe(...) (ADR-015, gen event consume)
|
│ ├─ // <gen:event-handlers> bus.subscribe(...) (ADR-015, gen event consume)
|
||||||
│ └─ // <gen:jobs> queue.register(...) in dev-seed; Payload task in prod
|
│ ├─ // <gen:jobs> queue.register(...) in dev-seed; Payload task in prod
|
||||||
|
│ └─ // <gen:realtime-handlers> realtimeRegistry.register(...) (ADR-016, gen realtime handler)
|
||||||
│
|
│
|
||||||
└─ (same for auth, marketing-pages, navigation, media)
|
└─ (same for auth, marketing-pages, navigation, media)
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -257,7 +257,7 @@ packages/navigation/
|
|||||||
index.ts
|
index.ts
|
||||||
```
|
```
|
||||||
|
|
||||||
Optional `events/`, `jobs/`, `integrations/cms/jobs/` directories (see ADR-015 and `docs/guides/events-and-jobs.md`); features may grow them on demand. The spec's canonical layout above remains correct as the minimum.
|
Optional `events/`, `jobs/`, `integrations/cms/jobs/` directories (see ADR-015 and `docs/guides/events-and-jobs.md`); optional `realtime/` and `realtime/handlers/` directories (see ADR-016 and `docs/guides/realtime.md`); features may grow any of them on demand. The spec's canonical layout above remains correct as the minimum.
|
||||||
|
|
||||||
**Request flow:**
|
**Request flow:**
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user