Live data from Hacker News

Progressive JSON

overreacted.io

91–100 of 244 posts

Re: Progressive JSON

#91

Progressive JPEG make sense, because it's a media file and by nature is large. Text/HTML on the other hand, not so much. Seems like a self-inflicted solution where JS bundles are giant and now we're creating more complexity by streaming it.

Things can be slow not because they're large but because they take latency to produce or to receive. The latency can be on the server side (some things genuinely take long to query, and might be not possible or easy to cache). Some latency may just be due to the user having poor network conditions. In both cases, there's benefits to progressively revealing content as it becomes available (with intentional loading sta…

Agree with everything you're saying here, but to be fair I think the analogy with Progressive JPEG doesn't sit quite right with your concept. What you're describing sounds more like "semantic-aware streaming" - it's as if a Progressive JPEG would be semantically aware of its blob and load any objects that are in focus first before going after data for things that are out of focus.

I think that's a very contemporary problem and worth pursuing, but I also somehow won't see that happening in real-time (with the priority to reduce latency) without necessary metadata.

Re: Progressive JSON

#92
post #78

Holy the pomp in this thread. It would perhaps help for some people here to have the context that this isn't some random person on the internet but Dan Abromov -- probably one of the most influential figures in building React (if not one of the creators, iirc)

He got famous because of "redux" and "hot module reload" and then he got hired by Meta and started working on react.

This was before the hook era.

Re: Progressive JSON

#93
So is there a library / npm to do this? Even his not good cases example; just making partial JSON to parse all the time. I don't care if it's just the top and missing things, as long as it always parses as legal json.

Re: Progressive JSON

#94
post #77

I have seen Dan's "2 computers" talk and read some of his recent posts trying to explore RSC and their benefits. Dan is one of the best explainers in React ecosystem but IMO if one has to work this hard to sell/explain a tech there's 2 possibilities 1/ there is no real need of tech 2/ it's a flawed abstraction #2 seems somewhat true because most frontend devs I know still don't "get" RSC. Vercel has been aggressively…

I think there's a world where you would use the code structuring of RSCs to compile a static page that's broken down into small chunks of html, css, js.

Basically: If you replace the "$1" placeholders from the article with URIs you wouldn't need a server.

(In most cases you don't need fully dynamic SSR)

The big downside is that you'd need a good pipeline to also have fast builds/updates in case of content changes: Partial streaming of the compiled static site to S3.

(Let's say you have a newspaper with thousands of prerendered articles: You'd want to only recompile a single article in case one of your authors edits the content in the CMS. But this means the pipeline would need to smartly handle some form of content diff)

Re: Progressive JSON

#95
post #88

Earlier quoted context omitted.

I find your analysis very good and agree on why companies like Vercel are pushing hard on RSC.

[flagged]

Please don't do this here. If a comment seems unfit for HN, please flag it and email us at hn@ycombinator.com so we can have a look.

Re: Progressive JSON

#96
post #86

Seems like some people here are taking this post literally, as in the author (Dan Abramov) is proposing a format called Progressive JSON — it is not. This is more of a post on explaining the idea of React Server Components where they represent component trees as javascript objects, and then stream them on the wire with a format similar to the blog post (with similar features, though AFAIK it’s bundler/framework speci…

Am I the only person that dislikes progressive loading? Especially if it involves content jumping around. And the most annoying antipattern is showing empty state UI during loading phase.

alternative is to stare at blank page without any indication that something is happening

Re: Progressive JSON

#97

I understand the GraphQL has fallen out of favour somewhat, but wasn’t it intended to solve for this?

It can't fall out of favor if it was never really in favor to begin with. GraphQL was a quite brief hype then a big technical debt.

What do you mean by technical debt here?

Re: Progressive JSON

#98
post #78

Holy the pomp in this thread. It would perhaps help for some people here to have the context that this isn't some random person on the internet but Dan Abromov -- probably one of the most influential figures in building React (if not one of the creators, iirc)

Dan is hands down THE best captain to steer this ship - he manages to push react forward even though it changed a lot (and faced many growth pains and challenges) in the last few years. He is doing it in his own special way - he is kind, thoughtful, patient and visionary. He is the best kind of master teacher there is - although he has many many years of experience, he understands exactly what newbies don't understand. That's inspiring.

Read a few of his many comments in any React issue and see what I mean. We are truly gifted. Dan you are my idol!

Re: Progressive JSON

#99
post #96
post #86

Earlier quoted context omitted.

Am I the only person that dislikes progressive loading? Especially if it involves content jumping around. And the most annoying antipattern is showing empty state UI during loading phase.

alternative is to stare at blank page without any indication that something is happening

I'm sure that isn't the only alternative.

Re: Progressive JSON

#100
post #96
post #86

Earlier quoted context omitted.

Am I the only person that dislikes progressive loading? Especially if it involves content jumping around. And the most annoying antipattern is showing empty state UI during loading phase.

alternative is to stare at blank page without any indication that something is happening

Or, you could use caches and other optimizations to serve content fast.
Post reply on HN