Search
Lessons (10)
- Time, Consistency and Distributed Transactions
Computer clocks disagree and workers pause, so don't trust timestamps to decide who wins. Use version numbers …
- Hexagonal Architecture (Ports & Adapters)
… Notifier, private readonly clock: Clock, ) {} async borrow(memberId: string, bookId: string): Promise<Loan { if (!(await this.catalog.isAvailable …
- Small Functions That Do One Thing
… turn the knob on the stove 30 degrees clockwise" . js // ❌ High level and low level mixed together function …
- Code Profiling
… dependency, lock contention, exhausted pool Keep separate wall-clock time (how long the user waited) from CPU time …
- Design a Chat Application
… and 44." ❌ Don't use the phone's clock to order messages. Phones disagree about the time, sometimes …
- Clean Architecture in Depth
… calls to reach the outside world: OrderRepository , PaymentGateway , Clock . The control flow goes outward (use case → database), but …
- Distributed Coordination: Consensus, Heartbeats and Gossip
… S1 doesn't know its lease ran out, because it was frozen while the clock ticked. The late …
- Caching, Consistent Hashing and Sharding
… Each key belongs to the next machine clockwise. Add an 11th machine, and only the keys between it …
- Practical Lab: S3 File Upload and CloudFront Delivery with NestJS
… expiresIn , or the server clock is wrong Request a fresh URL and check clock sync Old image still …
- L6 Production Debugging Casebook
… Random bugs in app code don't keep a clock. How to investigate: 1. Put these on one …