Sign in with GitHub By signing in you agree to the privacy policy.

track /02-order-pipeline

Event-Driven Order Pipeline

sign in to track your progress

Rebuild a slow, synchronous checkout around a message queue — accept orders fast, process them async, lose nothing.

Intermediate ~9h pythonrabbitmqpostgresqldocker
order-pipeline / spec.md v1.0

Context

Checkout calls payment, inventory and email in one request. It takes 2.4 seconds on a good day, and when the email provider hangs, orders are lost with it.

Rebuild it around a message queue: the request path records the order and answers fast; everything else happens behind a broker, asynchronously, and survives the crashes you will cause on purpose in VERIFY.

Requirements

What must be true — the how is yours.

  1. R1 An order is never lost — even if a worker crashes mid-process. rehearsed by D1
  2. R2 A failed receipt email must not block payment or inventory.
  3. R3 Processing the same event twice must not double-charge. rehearsed by D2

Technical guidance

  • One queue per concern; assume duplicates.
  • Ack only when the work is durable.

Definition of done

All of them, or it isn't shipped.

  • the order survives and is redelivered — not recorded yet D1
  • the customer is charged exactly once — not recorded yet D2
  • checkout still responds, work resumes after — not recorded yet D3
  • The repo runs from a clean clone with docker compose up. — not recorded yet

nothing recorded yet — running the drills fills these in

spec v1.0 · drafted with AI, human-reviewed

Solutions

No solutions published yet. Complete the challenge and yours opens the thread.