Advanced System Design Fundamentals
Vote

0% completed

​

The Transactional Outbox

Here is the core of an online store's order service, in three lines of Python.

def place_order(order): db.save(order) # write 1: the database broker.publish("orders", OrderPlaced(order)) # write 2: Kafka

The code passes every test, and it works on almost every request. Now ask what happens if the process stops after the first line and before the second. The order is saved, and the warehouse never hears about it. No error is logged, and nothing will ever retry the event.

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content