multihack / multihack-brackets

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

Initial code sync #3

Closed AonoZan closed 7 years ago

AonoZan commented 7 years ago

That initial code sync feature is needed so much. I have tried your plug in today and I love it so much. The fact that me and my friend can have real-time code sync and immediate preview in browser window is such a useful feature. I have to say that I have lost sync at some point somehow. I appreciate your work. Thank you :+1:

t-mullen commented 7 years ago

I agree! The old web version had it, so I have an idea how to implement it.

The only problem is sending large files over websockets. This project will probably be switching to pure WebRTC soon, so no problem there.

Thanks for trying it out!

t-mullen commented 7 years ago

Added the option to fetch code from the other person. It should solve this issue and help with any desync problems.

Some limitations:

Let me know how it works for you. Feedback always appreciated.

AonoZan commented 7 years ago

Thank you so much. I will take some time to test it and report back if I spot something that could be useful to you.

t-mullen commented 7 years ago

There was a small bug that might have caused it to now work for you. Did a few more tests and it should be fine now.

AonoZan commented 7 years ago

image

Heres what happens on Linux Mint. Im not sure if its bug or maybe I need some dependencies for it to work. I did monitored disk IO writes and also network usage. It seems to me that code has been sent and downloaded (one and then second operation). No IO operation was made during sync. Did few lines write/save just to confirm that both editors are in sync but code fetch never fetched first line that was written before room is created.

t-mullen commented 7 years ago

Yeah, I'm looking into that right now. See #10

t-mullen commented 7 years ago

@AonoZan It's fixed (if you weren't following that issue.)