Live data from Hacker News

Reflect – Multiplayer web app framework with game-style synchronization

rocicorp.dev

151–159 of 159 posts

Re: Reflect – Multiplayer web app framework with game-style synchronization

#151
post #52

The main value prop of CRDTs is they can be used without a central server (for example, in p2p networking, or when offline.) If you're choosing between a CRDT or something else like this for your centralized server, you're probably not thinking about things properly. Edit: I have no idea why this was downvoted, it's true

> If you're choosing between a CRDT or something else like this for your centralized server, you're probably not thinking about things properly.

I think that’s the point of comparing this to CRDTs - to show that there may be a better tool for the job if you’ve been considering CRDT because it’s seen some recent popular exposure

Re: Reflect – Multiplayer web app framework with game-style synchronization

#152

I worked extensively on this (also implemented it on JS) about 15 years ago, to escape boredom while on my grandma's place. I wish I had open sourced something, but back then I was a young boy with no ulterior motivations :^). Anyway, I want to comment on this: >For example, any kind of arithmetic just works: Of course, it is extremely trivial to set those up as idempotent operations. >List operations just work: Nope…

Hi! Thanks for the thoughtful question. >List operations just work: Fair point. Will change. What I really meant here was "(Many) list operations just work" (just like above I said "all kinds of things just work". > All updates reach the server at the same time. What is the solution to that? Timestamps? Fallback to LLW? There are a number of issues you might be pointing out, and I'm not sure which one you mean. In ge…

It seems to me that maybe saying that CRDTs are "good for one particular problem," whereas Reflect can do anything, is a bit misleading? Reflect is eventually consistent, but if you want e.g. string mutations to make sense, you still need to de facto model your text as a CRDT. (Unique IDs per letter, tombstones, etc.) Otherwise, you'll end up with garbled text.

Re: Reflect – Multiplayer web app framework with game-style synchronization

#153

Earlier quoted context omitted.

>nothing can fix this Exactly. >For these problems, undo and presence indicators go a long way to avoid these problems through human/social mechanisms. x1,000 to this. This guy builds . That's exactly my takeaway as well from years working on this; provide a solid (by that I mean clearly defined) deterministic algo, and solve the rest w/ UX.

This points towards a big challenge that I think gets overlooked way too often. A lot of these sync libraries/frameworks claim to solve for both real-time interaction, and local-first, sync when you reconnect. But the UX needs are wildly different. For the former you want (as mentioned) good presence info and undo. For the latter you (sometimes) want explicitly flagged conflicts and manual resolution, like we have in…

If a client is offline for a while and makes a bunch of edits, would rebasing many thousands of mutations not be a major performance issue? (For example: if complexity is O(n) per edit, as is often the case with string insertions, the process might hang for a long time.)

Re: Reflect – Multiplayer web app framework with game-style synchronization

#154
post #148

Earlier quoted context omitted.

"Can't" is a strong word. You can get auth with a CRDT with effort, for example you can put a server in the middle of everything and have the server reverse any changes it sees which are unauthorized. This ends up being a lot of work to maintain and easy to break as the application gets bigger, and it also defeats some of the benefits of the CRDT in the first place (now the server has to mediate everything and you ca…

Any thoughts on this approach? (From the Local-First Berlin meetup in June) https://m.youtube.com/watch?v=pBvGeU7bL5A

I think it sounds really cool. I love the p2p side of local-first. Lot to figure out to make it practical, but very glad people are working on that.

Re: Reflect – Multiplayer web app framework with game-style synchronization

#156

The demo at the top of the homepage ( https://reflect.net/ ) is a lot of fun. While I was watching, every time the puzzle got completed, people would shake their cursor in excitement, like saying, "yay we did it!!"

Seems to run worse on Firefox than on Chromium / Edge / Chrome. Rather choppy, mouse cursor lagging behind and laptop fans spinning up. Smooth on Chromium and friends though.

Re: Reflect – Multiplayer web app framework with game-style synchronization

#157

Earlier quoted context omitted.

Hm, good point. Thanks!

It's very fun to troll other players with, especially that middle bar piece is easy to hide. I've also seen someone play keep-away with the last piece. Just overall very funny how much you can goof off with a simple puzzle!

Brussels gets really upset.

Re: Reflect – Multiplayer web app framework with game-style synchronization

#158
post #56

This is a pedantic comment, but the terminology is confusing. Games have "players" so their sync systems are called "multiplayer," but regular software has "users" so their sync systems should be called "multiuser." The page reads strangely mixing the terms "user" with "multiplayer."

That’s just the terminology these days. Multiplayer == “live” multi-user including visualizing what other users are doing at every moment.

Re: Reflect – Multiplayer web app framework with game-style synchronization

#159

Earlier quoted context omitted.

Hi! Thanks for the thoughtful question. >List operations just work: Fair point. Will change. What I really meant here was "(Many) list operations just work" (just like above I said "all kinds of things just work". > All updates reach the server at the same time. What is the solution to that? Timestamps? Fallback to LLW? There are a number of issues you might be pointing out, and I'm not sure which one you mean. In ge…

It seems to me that maybe saying that CRDTs are "good for one particular problem," whereas Reflect can do anything, is a bit misleading? Reflect is eventually consistent, but if you want e.g. string mutations to make sense, you still need to de facto model your text as a CRDT. (Unique IDs per letter, tombstones, etc.) Otherwise, you'll end up with garbled text.

I didn't mean to say that Reflect can do _anything_. We do think it's a general model that ends up working well for very many things in practice.
Post reply on HN