The overall architecture
Which building blocks carry the synchronous and the asynchronous path?
The domain components are initially implemented as modules of one application. The worker handles external commands and responses with bounded concurrency. Both processes use the same relational SQL data store.
Starting point Requests, attempts and decisions need an authoritative data store and decoupled provider interaction.
Assumptions for the example case
Example design: an operator, a verification provider and a specified purpose of use. Identity and other evidence shall be assessed separately. Login, sessions, and rights across multiple applications are not part of this case. Figures and target values are design assumptions; no real people are checked.
Assign the API, worker, SQL data store and verification service
Runtime view · API, SQL and worker within verification coordination
System boundary · verification coordination
API process
accepts commands, status queries and signed callbacks; persists order, outbox and inboxWorker process
queries inbox and outbox, uses the provider adapter and evaluates the current attempt- Fachanwendung → APIPOST /verification-requests; later GET for status and decision
- API → Fachanwendung202 after acceptance; GET delivers the stored status
- API → SQLI-17 + Outbox or Callback → Inbox permanently save
- Worker → SQLRequest due inbox and outbox
- SQL → WorkerReturn due events and follow-up requests
- Worker → SQLD-17 + Status + Write Inbox Closure in a Transaction
- Worker → PrüfdienstCall the verification-service API over HTTPS or reconcile status
- Prüfdienst → APIPOST /provider-events with signature; Inbox-Commit before 2xx
- Separate runtime processes
- Authoritative SQL data store with inbox and outbox
- Domain application and verification service outside the boundary
The API confirms after the persisted inbox acceptance. The worker later queries Inbox and Outbox and jointly commits decision, status and inbox completion.
Divide API and Worker into domain modules
Component View · Clear Modules in API and Worker Process
API Process · Acceptance and Status
Worker Process · Provider and Decision
Command: Only order module writes order and outbox.
Callback: Inbox confirms 2xx after permanent storage.
Effect: Worker calls decision with inbox closing in a transaction.
- Modules in both runtime processes
- Joint SQL agreement
- HTTP caller and verification service
API and Worker are separate processes with a common SQL contract. The decision function runs in the worker after it processes an inbox event.
Map domain responsibilities to technical components
| Domain task | Implementation | Authoritative data |
|---|---|---|
| Verification request | API plus order module | Order I-17 |
| Evidence management | Reference and validity module | Evidence N-17 |
| Provider connectivity | Adapter in Worker, Webhook input in API | Attempt V-17, Event E-17 |
| Case review | Internal interface and protected API command | Responsibility and justification for processing order |
| Domain decision | Versioned evaluation function in the worker / backend | Decision D-17 with result: satisfied / not satisfied |
Verification request
- Implementation
- API plus order module
- Authoritative data
- Order I-17
Evidence management
- Implementation
- Reference and validity module
- Authoritative data
- Evidence N-17
Provider connectivity
- Implementation
- Adapter in Worker, Webhook input in API
- Authoritative data
- Attempt V-17, Event E-17
Case review
- Implementation
- Internal interface and protected API command
- Authoritative data
- Responsibility and justification for processing order
Domain decision
- Implementation
- Versioned evaluation function in the worker / backend
- Authoritative data
- Decision D-17 with result: satisfied / not satisfied
Concrete start
- Technologies
- An API process, a relational SQL data store and a background process are sufficient as a testable starting point. The chart does not require five separately operated services.
- Reliable delivery
- The API writes order and outgoing outbox entry together and persists incoming E-17 in the inbox before 2xx. The worker only acknowledges the inbox after atomic decision and status change; repetitions are mastered via stable order and event identities.
Terms in this step
- Inbox/Outbox
- Permanently stored incoming events and outgoing orders. They close the gap between data change and later processing.
Try it yourself
Assign acceptance, status reading, follow-up order, provider call and callback to the API, Worker, SQL storage and adapter modules.
A hint for your attempt
Domain modules are not automatically separate deployments. Start compact and only mark the real external boundary.
Compare with a possible solution
- Synchronous
- The API binds P-17, Z-3 and requestKey, writes I-17 and reads its status. A test with a duplicate requestKey shows the same job; an error before committing leaves neither job nor outbox entry.
- Asynchronous
- The worker processes stored outbox orders and the authenticated, persistent inbox later; the adapter translates the specific provider protocol. E-17 is repeated after a worker termination and generates D-17 with the status change only once.
Apply to your project
Which building blocks need their own runtime in your design, which only have a clear module boundary?