Visualizers

Learn by moving things

Interactive explainers for the ideas behind retrieval, embeddings, and agents. A formula tells you what is true; dragging a vector shows you why. Each one also appears inside the article it belongs to, and runs entirely in your browser, so drag, poke, and break it.

Portrait of Sachin Gupta rendered in binary

The same event, two patterns side by side. A work queue hands it to exactly one worker (the work gets done once). A pub/sub topic hands a copy to every subscriber (everyone who cares hears it).

Distribute vs broadcastinteractive
work queuequeueworker 1worker 2worker 3one message, one workerpub/sub topictopicsubscriber 1subscriber 2subscriber 3one event, every subscriber

The same event arrives at both a work queue and a pub/sub topic.

The topic fans a copy of each event into a separate queue per subscriber. When the analytics service is slow, its queue backs up while email and SMS keep flowing, unaffected. A slow subscriber is isolated, never a blocker.

A queue per subscriberinteractive
topicemail queue0email serviceSMS queue0SMS serviceanalytics queue0analytics service

Behind the topic, each subscriber has its own queue.

A queue deletes each record the moment it is read; an append-only log keeps every record for a retention window whether or not anyone has read it. That is the one difference the whole idea follows from.

A queue empties, a log remembersinteractive
queue0123deleted once readlog0123kept for the retention windowoffset

Four events arrive. A queue and a log both store them, offsets 0 to 3.

Visualizers — Sachin Gupta