ld.← ALL FIELD NOTESSELECTED WORK ↗
FIELD NOTES / 18EVENT-DRIVEN SYSTEMS   ·   DISTRIBUTED SYSTEMS

One graph change, many consumers.

When one change matters to several systems, a chain of direct calls can make every consumer part of the same failure path.

The coordination problem

When a node, edge, or paper changes in our knowledge graph, search needs to index it, the vector system may need to embed it, and the document store needs an update. Making those calls directly couples the original operation to each downstream service.

As more consumers arrive, that approach also means revisiting the same application code each time. A slow or unavailable dependency can complicate the whole workflow.

Publish once, process independently

Our approach publishes an event to SNS, which fans it out to an SQS queue for each consumer. Lambda workers process their own queues for search, vector, and document updates. Each consumer can retry and scale independently.

Decoupling gives us resilience and room to add consumers, but it introduces eventual consistency, ordering, and harder debugging across asynchronous boundaries. For this system, those trade-offs were worth making.

FROM GRAPH CHANGE TO CONSUMERS
GRAPHPublish an event
SNS + SQSFan out to queues
CONSUMERSSearch · vector · documents

Continue the conversation

KEEP READING / 17From a query to a useful result.

Another note from the notebook.