Your Cart
Loading

Exactly-Once, For Real: Build a Delivery-Guarantees Pipeline (TypeScript, Kafka-style and SQS-style): a Localpane Lab Kit

On Sale
$29.00
$29.00
Added to cart

Messages get duplicated, arrive late or are broken, and consumers crash at the worst moment. In this kit you build a pipeline that still ends up exactly right. You write validation and dead-letter handling, event-time windows with a watermark, an idempotent SQLite sink that stores data and offsets in one transaction, a consumer that commits only after it stored, an SQS-style queue with visibility timeouts, conditional writes, worker leases and an idempotent API. Then one seeded stream runs through both sides with crashes injected, and an independent oracle checks every count. Each step has a starter, failing tests, plain explanations and hints. Solution included.


What's inside

  • WORKBOOK.md: 8 steps, each with the goal, key concepts in plain words, where the starter code is, the tests that must pass, hints and a check command
  • 8 starter projects (steps/step-01 to step-08): earlier steps solved, the current one stubbed
  • The finished solution: about 2,500 lines of TypeScript and 1,200 lines of tests. You write about 400 of those lines, in the parts that make delivery safe; the rest (generator, oracle, in-memory log, job state machine, test harness) is provided and explained
  • 46 graded tests, and 7 tests for the code the kit provides
  • check.sh to check one step and everything before it
  • A cross-check script that prints every measure against the oracle and writes a sealed (SHA-256) receipt you can verify again later

The 8 steps:

  1. Letters and poison: validation at the edge
  2. Event time: windows and the watermark
  3. An idempotent, atomic sink
  4. Commit after store: the consumer
  5. Retries, backpressure and the crash drill
  6. An SQS-style queue and a conditional store
  7. The worker and the idempotent API
  8. One stream, two transports: the cross-check


Who it's for

TypeScript and Node developers who want to understand delivery guarantees by building them: backend engineers who work with queues or streams, people preparing for system-design discussions, and anyone who has heard "Kafka gives you exactly-once" and wants to know what that really takes.

Not for: anyone looking for a Kafka or AWS tutorial, or for production code. The log, queue and store are small in-memory stand-ins with the same semantics; the kit does not connect to Kafka, SQS, DynamoDB or any cloud service.


Prerequisites

  • Node.js 24 or later; tested on macOS (Apple Silicon) with Node 24.14.0. Linux and Windows not yet tested.
  • Comfortable with TypeScript, async/await and unit tests
  • No Kafka or AWS experience needed; no Docker, broker or cloud account
  • About 9 to 12 hours


Licence

Single-developer licence: use and modify the code, including in your own products; no redistribution and no public repositories. Free updates within 1.x.


Apache Kafka is a trademark of the Apache Software Foundation; Amazon SQS is a trademark of Amazon.com, Inc. This kit is an independent simulation, not affiliated with or endorsed by either.

Refunds: within 14 days of purchase if a file is defective or not as described. Contact me through the store's Contact button. This doesn't affect any rights you have under the law where you live.

Licence summary: payhip.com/u1791141470733132530294/licences

You will get a ZIP (712KB) file