Live data from Hacker News

Progressive JSON

overreacted.io

1–10 of 244 posts

Re: Progressive JSON

#4
We encountered this problem when converting audio only LLM applications to visual + audio. The visuals would increase latency by a lot since they need to be parsed completely before displaying, whereas you can just play audio token by token and wait for the LLM to generate the next one while audio is playing.

Re: Progressive JSON

#5
I've always liked the idea of putting latency requirements in to API specifications. Maybe that could help delimit what is and is not automatically inlined as the author proposes.

Re: Progressive JSON

#8
Very cool point, and it applies to any tree data in general.

I like to represent tree data with parent, type, and data vectors along with a string table, so everything else is just small integers.

Sending the string table and type info as upfront headers, we can follow with a stream of parent and data vector chunks, batched N nodes at a time. Tye depth- or breadth-first streaming becomes a choice of ordering on the vectors.

I'm gonna have to play around with this! Might be a general way to get snappier load time UX on network bound applications.

Re: Progressive JSON

#9
If it has to be mangled to such an extent to do this, then it seems reasonable to assume JSON is the wrong format for the task.

Better to rethink it from scratch instead of trying to put a square peg in a round hog.

Re: Progressive JSON

#10
I feel like in an ideal world, this would start in the DB: your query referencing objects and in what order to return them (so not just a bunch of wide rows, nor multiple separate queries) and as the data arrives, the back end could then pass it on to the client.
Post reply on HN