N
NORTHSTARARCHITECTURE LAB
← Experiment overview

Evidence, not propaganda

Hypermedia vs. React

Two production-shaped interfaces, one Go domain model and one PostgreSQL database. Both receive the same coalesced simulator workload over SSE.

Current interpretation

Hypermedia wins the startup; React narrowly wins this live wire format.

Datastar + htmx ships about 86% less production JavaScript. Under the current full-snapshot implementation, React's JSON stream used about 10% less bandwidth over 60 seconds. For this server-authoritative dashboard, hypermedia is the simpler client; React is the more bandwidth-efficient live representation as currently implemented.

Controlled run

Same load, 60 seconds

Measured by ./scripts/benchmark.sh. Lower is better for both rows.

Production JavaScript
30.8 KBDatastar + htmx
227.6 KBReact
Hypermedia: 86% less
Live SSE transfer
5.80 MBHTML patches
5.23 MBJSON snapshots
React: 9.8% less

Since the last server restart

What the live counters mean

These are cumulative operational counters across every connected browser and benchmark run. They describe batching and total traffic; they do not rank React against hypermedia.

Generated domain events182424
Coalesced flushes22812
SSE messages emitted8855
SSE bytes transmitted165217824
8.0×

events per visible flush

The server absorbs bursts and gives browsers one consolidated view update instead of rendering every domain event.

87.5%

fewer render opportunities

Coalescing removes this share of potential client updates. This is the main protection against a 40–500 event/s simulator.

18.2 KB

average SSE message

The current implementation sends full visible-view snapshots. Smaller targeted row patches would reduce this further.

Choose hypermedia when

The server already owns the workflow.

  • Filtering and mutations are server-authoritative
  • Most UI updates can arrive as HTML fragments
  • Small client bundles and fewer state layers matter
  • The team prefers one domain representation

Choose React when

The browser is an application runtime.

  • Offline or optimistic local work is central
  • Interactions compose lots of speculative state
  • Client-heavy visualization dominates
  • The component ecosystem outweighs added state machinery

Honest limits

The comparison currently measures payloads, live transfer, server coalescing, bundle size and source complexity. Browser CPU and memory remain not measured until they can be collected on a stable isolated browser host. LOC is context, not proof of quality.

Bottom line: for Northstar's CRUD-like, server-driven operational workflow, hypermedia is the better simplicity trade. React is not “worse”; its current JSON stream is leaner, and it becomes the stronger choice as meaningful state and computation move into the browser.