multihack / multihack-web

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

Lazily fetch code #33

Closed t-mullen closed 7 years ago

t-mullen commented 7 years ago

Instead of fetching all of the code, the user should be able to:

kifhan commented 7 years ago

I really appreciate your code and it inspired me. But it seems you don't understand a concept. Please check this carefully. Collaborative-editing-javascript-intro-operational-transformation

This show you how to sync shared filesystem without fetching all the project files. You may ignore a webtorrent part. Shared Filesystem with Y-js

I concern this issue because I'm working on the project something like this. Maybe I can share some of my code later. Thank you.

t-mullen commented 7 years ago

Interesting article, I didn't know about this.

I'll definitely see if I can use this method instead. Thanks.

We will still need to lazily load files though. Most projects are simply too large to send entirely, regardless of the method.

t-mullen commented 7 years ago

Closing this in favour of simply sending the whole project at startup.

It's less confusing than the "Fetch Code at startup" plan, and I think the protocol handles things well enough. Big projects will have to set an option to skip this.

kifhan commented 7 years ago

What about fetching project file using CRDT? Make dictionary type (key, value) of object to use it as an abstraction of file system and sync it by CRDT. Sync a exact file when change detected.

t-mullen commented 7 years ago

Yes, this will need to be done when implementing #34

This issue was just for fetching files when opening them, but it doesn't seem like there will be a need for it.