Building a Graph Component Library
Case study — designing and shipping a React network-graph library for several teams, and why rendering tech, API shape and Storybook mattered most.
$ cd ./topics/realtime-ui
Interfaces that stay smooth under a firehose. Streaming transports, 60fps rendering, state that doesn't thrash, and connections that heal themselves.
13 notes🌱 1 seed🌿 10 growing🌳 2 evergreen
Some interfaces can’t afford to be even a little late. When data arrives many times a second, as on a trading screen, a network map or a live dashboard, the UI has to decide what to render, what to batch and what to drop, and still feel calm to the person using it.
I build real-time trading interfaces for a fintech, and before that I built large network-graph visualisations. The lesson from both: the network is rarely the bottleneck. What you do with each message is. Patterns only here. The ideas travel, the specifics of any one system don’t.
| You need… | Read |
|---|---|
| Both sides talking often | WebSockets |
| Server pushes only: feeds, progress, token streams | Server-Sent Events (SSEs) |
| A fallback when long-lived connections are blocked | HTTP Long Polling |
| Rare updates, simplest infrastructure | AJAX Polling |
hover to explore · click to open
Case study — designing and shipping a React network-graph library for several teams, and why rendering tech, API shape and Storybook mattered most.
Case study — building a broadcaster's streaming app for many TV platforms at Accedo. Memory and performance work for slow devices, a back-navigation model that finally made sense, a full rebrand, and a knowledge-sharing culture.
A persistent, two-way channel between browser and server. Brilliant when both sides talk often; the price is stateful connections you now have to scale, heartbeat and reconnect.
For high-frequency socket data, write messages into a store and let only the leaf components subscribe — or skip React rendering entirely for the hottest values.
The simplest form of "real-time" — ask the server every N seconds. Wasteful at scale, perfectly fine more often than people admit, and the baseline every other technique is compared against.
A handstand is a feedback loop with a sensor, a delay and an actuator. So are autoscalers, rate limiters and a real-time UI under load — and they fail the same way.
For large network graphs, the rendering technology matters more than the API — DOM and SVG struggle past a few thousand nodes, canvas goes further, and WebGL stays interactive at 10k+.
A periodic "I'm alive" message that lets a system notice when a node has failed. Simple to build, subtle to tune, because a slow node and a dead one look the same.
The "hanging GET" — the server holds a request open until there's news, then the client asks again. Near-real-time over plain HTTP, and still the universal fallback.
"Don't communicate by sharing memory; share memory by communicating." Independent processes exchanging messages over channels, from Go and actors to queues and WebSockets.
On a bad training day you drop to an easier progression rather than grinding ugly reps. Systems under stress should do the same — shed the expensive work, keep the core going.
One-way server-to-client streaming over plain HTTP, with automatic reconnection built into the browser. The simplest right answer for feeds, progress updates and streaming AI responses.
Modelling people and their interactions as a graph to find who's influential, which communities form and how behaviour spreads. Centrality, clustering, Louvain community detection, and why graph thinking travels so well.