multihack / multihack-web

Realtime collaboration for programmers. (Web Version)
https://multihack.github.io/multihack-web/
MIT License
93 stars 18 forks source link

Electron desktop app #55

Closed tvedtorama closed 6 years ago

tvedtorama commented 6 years ago

It could be useful to have this fantastic tool as an Electron app, where users could choose to synchronize the browser file system with the local file system.

They could then use their favorite editor and would not require the files to pass through a zip archive. Instead they could drag in a folder (or point to one) and have the filesystem initialized.

It could even allow you to set up your own "private code server", similar to Coda - although I'm not sure how smart/easy that would be security wise.

t-mullen commented 6 years ago

I agree. Being able to sync through the filesystem would be useful. It might work better as a Node.js tool though, to avoid Electron's overhead.

The only problem with this is that most editors use their internal memory to edit files, meaning changes aren't pushed immediately to the filesystem. So it wouldn't be able to replace the editor plugins.

kifhan commented 6 years ago

Awesome Idea man! I thought about it, you could run child process to sync between y-js and file system. Then it is okay the editor use memory cause delta will goes to y-js. It might have little delay on sync file system, though.

tvedtorama commented 6 years ago

Thank you guys!

I guess it will be a problem to cleverly match external and internal changes with the data model, perhaps an WebRTC enabled "merge driver" for Visual Studio Code would be better?

Otherwise, maybe the desktop app could do a diff between local changes (saves) and treat each changed snippet as an individual edit - as if they were performed offline? Then external/incoming changes could be merged with this and applied to the local file system - right after the user has flushed his editor buffer (saved his work).

t-mullen commented 6 years ago

I plan to fully support vscode, which is in the works. multihack-vscode

The dekstop app would have to work like that, doing it's own diffing when the user saves (with a filesystem watcher). We won't need to worry about merging, YJS does that for us!

tvedtorama commented 6 years ago

Excellent, sounds very promising!

And this YJS library also looks like a great tool in lots of cases, I guess it could be used for "collaborative stream scribbling" as well 👍

t-mullen commented 6 years ago

Repo created as https://github.com/RationalCoding/multihack-cli