System Design Atlas

Verify identity evidence and eligibility

06 / 10Worked example

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

Domain applicationStarting I-17 and reads his stand
Verification servicechecks externally and reports V-17

System boundary · verification coordination

API process

accepts commands, status queries and signed callbacks; persists order, outbox and inbox
Relational SQL datastoreRequest · attempt · evidence · decisionOutbox: follow-up orders · Inbox: accepted callbacks

Worker process

queries inbox and outbox, uses the provider adapter and evaluates the current attempt
  1. Fachanwendung → APIPOST /verification-requests; later GET for status and decision
  2. API → Fachanwendung202 after acceptance; GET delivers the stored status
  3. API → SQLI-17 + Outbox or Callback → Inbox permanently save
  4. Worker → SQLRequest due inbox and outbox
  5. SQL → WorkerReturn due events and follow-up requests
  6. Worker → SQLD-17 + Status + Write Inbox Closure in a Transaction
  7. Worker → PrüfdienstCall the verification-service API over HTTPS or reconcile status
  8. 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.

The architecture shows responsibilities and runtime paths. It does not specify separate services or a specific database product.

Divide API and Worker into domain modules

Component View · Clear Modules in API and Worker Process

API Process · Acceptance and Status

Request moduleCreates I-17 and the outbox entry atomically
Callback inboxChecks signature and saves E-17
Status queryProvides status and read D-17

Worker Process · Provider and Decision

Inbox processingRecalls due events repeatable
Provider adapterStarts and reconciles external attempts
Decision functionAssigns the attempt and evaluates Z-3
SQL contractRequest · attempt · inbox · outbox · 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.

API and worker are separate process boundaries: the API takes I-17, reads the status and persists E-17 in the inbox; the worker uses the provider adapter, processes the inbox and forms D-17. The domain modules are within the respective application, the SQL data store is outside of both processes.

Map domain responsibilities to technical components

Domain taskImplementationAuthoritative data
Verification requestAPI plus order moduleOrder I-17
Evidence managementReference and validity moduleEvidence N-17
Provider connectivityAdapter in Worker, Webhook input in APIAttempt V-17, Event E-17
Case reviewInternal interface and protected API commandResponsibility and justification for processing order
Domain decisionVersioned evaluation function in the worker / backendDecision 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?

The architecture is checked in step 7 at a delayed provider event.