Hacker News new | ask | show | jobs
by danabramov 2009 days ago
It's just regular chunked encoding, which we consume via a ReadableStream[1]. The key part is that we're able to consume partial data because we read it row by row. Each row represents a piece of JSON with placeholders for missing values. When we receive a row, we try to "continue" rendering on the client, and if we have a loading state we can show (even before all values arrived), we do that.

>Will the architecture have the potential to support realtime applications where the server will push updates to the client without the need to poll on an interval?

I don't see why that wouldn't be possible.

[1]: https://developer.mozilla.org/en-US/docs/Web/API/Streams_API...