Design a System for the Customer’s Real Environment

Component responsibilities, the context diagram, integration patterns per source, the data model, idempotency, the reconciliation state model, where AI belongs and AWS candidates.

  • Advanced to enterprise
  • About 30 minutes
  • Includes an exercise and a knowledge check

Round 4, continued Responsibilities and context

ComponentResponsibility
Provider A adapterReceive and validate notifications
Provider B adapterImport and normalize provider files
Settlement ingestionImport, validate and track bank files
Canonical data layerStandardize records and keep provenance
Reconciliation engineApply approved matching rules
Exception serviceManage investigation state and actions
Audit subsystemPreserve traceable business actions
Operations API and finance UIControlled access to workflows and results
Servicing integrationCommunicate with the legacy servicing system
Monitoring and alertingExpose processing health and failures
The context diagram redrawn: Payment Provider A to the Provider A adapter, Payment Provider B to the Provider B file adapter, bank settlement to settlement ingestion, and the loan servicing system exchanging data both ways with the servicing integration. All four adapters feed the reconciliation platform, which writes to the reconciliation database and audit records, serves the finance operations UI for finance users, and reports to monitoring for platform operations.
Adapters in, one platform, clear outputs. Logical responsibilities, not separate microservices.
IntegrationPatternWhy
Provider A notificationsWebhook or APITimely event delivery
Provider B filesScheduled file ingestionThe source provides files
Bank settlementManaged file transfer and batchThe existing banking interface
Servicing systemAPI or approved adapterPreserve the legacy system
Internal processingDurable asynchronous messagingDecouple ingestion from reconciliation
Finance UISynchronous APIInteractive workflow

Do not turn every interaction into a stream. A scheduled file import is the right answer for a source that only produces files. A modular monolith with independently scalable ingestion workers is a reasonable start if the workload and availability needs support it.

Data and state The data model and reconciliation states

The data model redrawn: payments and settlements are each evaluated in many reconciliation attempts; a source file contains many settlements; an attempt may create zero or one match and zero or one exception; an exception has many investigations; investigations produce many audit events; payments are also referenced by audit events. If one settlement covers many payments, the match needs a matched-amount relationship.
Attempts and matches are separate, so every evaluation stays explainable.
The state model with the Module 06 and 07 vocabularies. Payment processing: RECEIVED, then NORMALIZED. Reconciliation: AWAITING_SETTLEMENT, then MATCHED when the settlement agrees, or UNMATCHED or AMBIGUOUS, which open an exception case: a separate record with states from OPEN through UNDER_INVESTIGATION to RESOLVED. When the case ends, an approved match moves the payment to MATCHED; a settlement that was only late moves it back to AWAITING_SETTLEMENT; insufficient evidence keeps the case open and escalates it. A financial adjustment is its own controlled workflow.
Not a Boolean: a payment can wait, match, or sit in an open case under investigation.

Idempotency, corrected. The reference lists check whether the transaction is already recorded, then persist it. Two concurrent deliveries can both pass that check. Use the uniqueness key (provider_id, provider_transaction_id) in the database with an insert that does nothing on conflict, commit, publish through the outbox, keep consumers idempotent and record the outcome (Module 07, Lesson 05).

The customer asked for AI Where AI belongs

AI may assist withAI must never
Summarizing an exception’s investigation historyInvent missing financial values
Explaining a mismatch from approved source evidenceDeclare an authoritative match
Searching approved operational documentationModify a loan balance
Navigating known runbooksApprove a financial adjustment
Categorizing free-text notes for human reviewOverride approved reconciliation rules

The core problem is normalization, identifiers, timing and deterministic rules. Where AI helps, keep source references, permissions and audit, and label generated suggestions clearly apart from system decisions.

NeedCandidate AWS capability
Containers and runtimeAmazon ECR; ECS with Fargate (EKS only if the platform strategy needs it)
TransactionsAmazon RDS for PostgreSQL or Aurora PostgreSQL
Durable work and routingAmazon SQS; EventBridge where appropriate
FilesAmazon S3
Secrets and keysAWS Secrets Manager; AWS KMS
IdentityIAM plus the approved customer identity integration
Monitoring, tracing, AWS auditCloudWatch; OpenTelemetry; CloudTrail
Edge and backupsAWS WAF where exposure requires it; AWS Backup and database recovery

Practical exercise

Architecture package

Submit the architecture package.

  1. Context, component and deployment diagrams, and the data model.
  2. Sequences for payment ingestion, settlement ingestion, reconciliation and exception investigation.
  3. Trust boundaries, API contracts and event schemas.
  4. Failure and recovery design, NFR mapping and updated ADRs.
Show a sample NFR mapping row
  • No silent false matches: deterministic versioned rules, potential matches always to a person, negative test set in CI, false-match rate on the dashboard.

What you can do now

  • Design for a hybrid environment.
  • Model reconciliation state properly.
  • Place AI and cloud services by responsibility.