News for hackers. Stuff that matters.
Re:Making Direct Messages Reliable and Fast by mxstbr on Saturday June 15, 2019 @04:43AM (#20188984)
If anybody else needs this kind of system, most GraphQL clients (at least in the JavaScript ecosystem) handle all of this out of the box or can be extended to work this way with minimal effort.

They have a client-side cache for the whole app that you can optimistically update, all network requests run through that, it handles rolling the updates back when responses come in, etc.

Examples in the JS ecosystem that I am familiar with include Apollo and Relay, and urql is working on this.

Re:Making Direct Messages Reliable and Fast by dmitriid on Saturday June 15, 2019 @05:48AM (#20189191)
> If anybody else needs this kind of system, most GraphQL clients

Well, the client is probably the easiest and the most boring piece of the puzzle. What you do in the backend matters.

Re:Making Direct Messages Reliable and Fast by sambal on Saturday June 15, 2019 @06:15AM (#20189276)
What’s done in the backend matters slightly less in the thread of an article entirely concerned with the client.

https://cdn-images-1.medium.com/max/2400/1*ttu76ysGchnhH3CyT...

Re:Making Direct Messages Reliable and Fast by dmitriid on Sunday June 16, 2019 @08:20AM (#20195125)
"How do you handle DMs for a billion connected clients" is still a much harder and a more interesting story than "if you want something similar, throw a GraphQL at it".
Re:Making Direct Messages Reliable and Fast by sambal on Monday June 17, 2019 @06:01AM (#20201396)
That may be, yet it was story nobody in that thread was talking about save for you.