Row 03 of 07
Millions of records in the browser
Took a Server-Sent Events proof of concept to production as a reusable useSSE hook that streams millions of security records.
- ServerServer-Sent Events
- Browser storeIndexedDB, millions of records
- ViewA page of 50 to 100 rows
Context
Security telemetry never stops arriving. A proof of concept showed Server-Sent Events could carry it, but it was a one-off, and holding the stream in memory would not survive millions of records.
What I did
I rebuilt it as a reusable useSSE React hook. Records land in IndexedDB rather than in memory, and the UI pages small slices of 50 to 100 rows out of the store on demand.
So the browser holds the dataset, while the interface only renders what fits on screen. Paging is modular, so responsiveness holds as the data keeps arriving.
Outcome
The hook streams millions of security records into the console in production. It is reusable: a screen that needs a live feed calls the hook instead of wiring its own stream.