Implementing Event-driven Systems with Go
summary
Shows implementing a transactional outbox by adding an outbox table in Postgres and writing content plus outbox rows atomically inside a DB transaction with deferred rollback; builds a Go event relay that uses Postgres LISTEN/NOTIFY to pick up new rows and forward them to middleware (Kafka example); addresses Kafka’s 1MB limit by encoding messages with protobuf and maintaining schemas; enforces idempotency with version numbers and uses DAO patterns for testable DB access.
AI-written summary · about
chapters (10)
- 0:00Introduction and background
- 1:55Event-driven systems basics
- 5:50Example event system workflow
- 8:23Dual writes problem and solution
- 11:21Design patterns for Go apps
- 15:43Event relay implementation
- 17:09Idempotency in event systems
- 18:11Message size and serialization
- 19:36Summary and key takeaways
- 21:27Q&A session
related talks
39mBuilding an event-driven notification system in Go and RabbitMQ
51mNot Just Events: Developing Asynchronous Microservices
34mAtomicity and Consistency Across Databases and Messaging Systems
55mAvoiding mistakes with events, one event at a time
27m"Write Once Stream Everywhere: Transforming Your Data into Events"
47mReliably Sending Events to Apache Kafka: From CDC to the Transactional Outbox Pattern
52mLife Beyond Distributed Transactions: An Apostate's Implementation
52mSo You Want to Build An Event Driven System?
