Lab

Lab exercises

You go through each exercise in three steps: the simulator shows the problem, then the same scenario with the solution, and finally you try the change in your own project with a prompt for a coding agent.

  1. 01Synchronous startFrontend → Mortgage Calculator API → database
  2. 02Calculator Event SourcingEvents as the source of truth, state = fold(events)
  3. 03Projections and replayRead model from events, fixing a bug by recomputation
  4. 04CQRS: commands and queriesCommand → Write model → Event → Projection (Read model) → Query
  5. 05SnapshotShortening the load of a long stream
  6. 06Optimistic concurrencyTwo advisers, one calculation
  7. 07Event schema evolutionIncomeChanged v1 → v2 and upcasting
  8. 08Calculation V1 → V2 and determinismWhat is a promise to the client and what is a recalculation
  9. 09Application submissionDomain vs. integration events and the broker
  10. 10Risk and approvalRiskAssessmentCompleted/Rejected, MortgageApproved/Rejected, eventual consistency
  11. 11Customer Identity: retry and DLQCustomerIdentityCreationRequested → CustomerIdentityCreated
  12. 12Mortgage Account: duplicates and idempotencyMortgageAccountOpeningRequested → MortgageAccountOpened, Inbox
  13. 13Document Service: delivery orderContractGenerationRequested → ContractGenerated → ContractSigned
  14. 14Disbursement: offline service and backlogMortgageDisbursementRequested → MortgageDisbursed
  15. 15Transactional OutboxWrite and publish are not one transaction (dual write)
  16. 16Saga / Process ManagerThe whole process from approval to disbursement, compensation
  17. 17The whole system under pressureAll failures at once and all defences

Event-driven laboratory

To finish: free experiments over the whole architecture. Pick a scenario, turn on any defences, change how services and the network behave, and watch the flow in parallel by service and step by step.

Open the laboratory

Training for your team

Would you like this training for your team?

We run the training on your code and your domain problem. We agree the scope, dates and format with you.

Discuss the training