Code the future, now
summary
Claim: eliminate overnight batch jobs by modeling time in-domain with durable messaging and sagas, using NServiceBus (or any queue like Service Bus, RabbitMQ, SQS) to request timeout events that add an order to a sliding window and remove it seven days later. Implementation stores a single-row saga with optimistic concurrency so concurrent orders cause one retry and the correct 10% discount. Delay techniques include queue-native delays, DB-persisted timeouts, or RabbitMQ’s binary-queue trick (the talk uses 28 queues to cover ~8.5 years).
AI-written summary · about
chapters (15)
- 0:00Introduction
- 3:20The problem
- 11:48The fundamental problem
- 12:48The arrow of time
- 16:48Saga
- 19:28Code
- 23:38Explanation
- 25:33The code
- 28:53The infrastructure
- 38:53Ask why
- 43:11Key takeaways
- 47:41Wrap up
- 48:11Overusing Sagas
- 50:21Embracing business logic
- 53:41Transactional guarantees
related talks
55mCode the future, now
38mFree Your Mind, Your App Will Follow
18mCode That Can't Fail
38mProcrastination as a Service: Caching and Queueing
57mParallelize your code, one step at a time
19mThe Taming of the Queue
41mFixin the Hard Bits of Event Processing with Restate & Kafka
26mMicroservices Madness: Application And Infrastructure Automation Using Temporal
