3 ms·
Yeah this works well for specifically this case. There's other cases that I feel we haven't had a good chance to explore, specifically as it pertains to APIs.
by treve 6y ago
Yeah this works well for specifically this case.
There's other cases that I feel we haven't had a good chance to explore, specifically as it pertains to APIs.
I wanted to kill many compound HTTP request within a single one. Many API formats pack many logical entities in a single response, and that doesn't work well with caches.
Wouldn't it be nice if the next paradigm shift in API development goes towards every entity being addressable, cacheable by a browser but not suffering from the penalty of having to do many requests?
That's mostly where my work on Prefer-Push came from. I wrote a much longer article about this use-case earlier this year: https://evertpot.com/h2-parallelism/ https://evertpot.com/h2-parallelism/
- nsomaru 6y agoIsn’t a URL a “uniform resource locator” which effectively addresses an “entity” conceptually. It would seem then that your gripe is with the design of particular APIs?
- treve 6y agoYes, nearly all of them. For example: consider an operation like 'give me a list of articles', most APIs will combine this result in a single request/response. But if each article has a URI as well, they won't end up in a browser cache by their own address.
- svrtknst 6y agoMaybe your familiar with it already, but Joe Armstrong had some similar ideas about addressable entitites: https://joearms.github.io/published/2015-03-12-The_web_of_names.html https://joearms.github.io/published/2015-03-12-The_web_of_na...
- macintux 6y agoJoe was such a prolific thinker. I could listen to him talk about anything.
- eterps 6y ago> Yeah this works well for specifically this case. What do you think of the opinion of Kévin Dunglas (Vulcain) in this case. Too optimistic? See: https://github.com/dunglas/vulcain/issues/70#issuecomment-726120834 https://github.com/dunglas/vulcain/issues/70#issuecomment-72...
- treve 6y agoI'm aware of the project but don't know enough details of this feature to really comment on it! I imagine that it addresses some, but not all of the potential benefits H/2 push could have.
- eterps 6y agoThanks. Do you still see ways/options leading to that 'perfect world' scenario? Or does that seem unrealistic for years to come given the current situation?
- treve 6y agoI may not have a full understanding on the project, but I have doubt. One benefit of Push is that the server can potentially generate a group of responses together, which can be much cheaper than generating them individually. When prefetch is used instead of push, the decision on when and what to fetch is on the client, so if the server could generate them as a group, a proxy like Vulcain would have to buffer the results somehow until the browser asks for them, which is not ideal. I might be wrong, but I don't think their server ever intended to fix the Query+1 issue. If Vulcain and Push already worked well for you in the past, maybe it's still as effective without Push though!
- mariusor 6y agoYour article mirrors very well the use case I wanted to solve in one API I'm working on. Thank you for detailing the matter so thoroughly.