multihack / multihack-brackets

Realtime collaboration for programmers. (Brackets Extension)
MIT License
24 stars 9 forks source link

Automatically check for desyncs #16

Closed tweakimp closed 7 years ago

tweakimp commented 7 years ago

It's me again! (Are you even open for more issues from me? ;) Sometimes when I code with my friend, we get desynced. I cant really tell when this happens, we assume it starts when multiple users do huge changes at the same time, like pasting multiple lines of code or appling extensions like a beautifier. What I thought of now: maybe it would be a good idea to have an auto re-sync feature. One user can be assigned as the master via the room interface and when an auto re-sync happens, all other users will change their code to the master code. Just like key frames in video encryption, this would make it more stable in my totally unprofessionall opinion.

t-mullen commented 7 years ago

Always open to issue from anyone!

Does "Fetch Code" not do this? It's meant for resync too. Did you mean some kind of automatic resyncing?

I just fixed an issue that would stop all syncs when doing a large paste. Try updating and let me know if you still get desynced often.

Desyncs should be rare if everything is working as intended.

tweakimp commented 7 years ago

Yes, fetch code is the manual version of what I suggest to be automated. We will keep an eye on that, thanks.

t-mullen commented 7 years ago

Ideally things would rarely (if ever) desync, so hopefully we won't need to check for desyncs automatically. I'll think about it though, it's a good idea.

tweakimp commented 7 years ago

Maybe think of it as a safety precaution. If the code desynces more rarely, it's harder to notice.

t-mullen commented 7 years ago

YJS will handle all syncing in the future, so this won't be needed.

Desyncs will be mathematically impossible, not just rare. :)