Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collaboration (multi user) support #33

Open
xPaw opened this issue Mar 6, 2019 · 54 comments
Open

Collaboration (multi user) support #33

xPaw opened this issue Mar 6, 2019 · 54 comments
Labels

Comments

@xPaw
Copy link

@xPaw xPaw commented Mar 6, 2019

It's not documented whether multiple users can use one self hosted installation at once or not. Is this a supported use case?

@sr229
Copy link
Contributor

@sr229 sr229 commented Mar 6, 2019

If I remember, this is a planned feature. But if this was a 1:1 code-oss port. VS Live Share could work on this.

@kylecarbs
Copy link
Member

@kylecarbs kylecarbs commented Mar 6, 2019

Currently, we do not support multiple users collaboratively editing on the same code-server instance. We've thought of this and would love to hear what your thoughts are.

In our world, it'd be great to provide collaborative access, but never allow the collaborator to have control over the host machine in any way (for security reasons).

@sr229
Copy link
Contributor

@sr229 sr229 commented Mar 6, 2019

I think we should do this the way how VS Live share does it - RBAC by limiting views to read-only and restricting terminal access.

@xPaw
Copy link
Author

@xPaw xPaw commented Mar 6, 2019

I currently use https://github.com/c9/core for collaboration, where multiple users can log into the same server and work together.

code-server interests me as it uses VS Code so it heavily supported, unlike Cloud9. For my use case, permissions aren't really a problem.

@nhooyr
Copy link
Member

@nhooyr nhooyr commented Mar 6, 2019

@kylecarbs does vscode live share work?

@kylecarbs
Copy link
Member

@kylecarbs kylecarbs commented Mar 6, 2019

I believe it would if the extension was open-sourced. Unfortunately, we can't provide support for it.

See: microsoft/vscode#38733 (comment)

@zk-g
Copy link

@zk-g zk-g commented Mar 7, 2019

This is a must for a cloud ide, Without this feature I don't even see an advantage of using a cloud editor as there are few ways to share the workspace through the client: and in plus require less resources than the browser.
So definitely +1

@zk-g
Copy link

@zk-g zk-g commented Mar 7, 2019

Maybe also with an interactive button in the status bar showing connected user and options to manage permissions.
This could be a really game changer

@ghost
Copy link

@ghost ghost commented Mar 7, 2019

I'd have a look at how MS Word Online handles it:
Word Online

I like the idea of having a different cursor for every person actively editing,
this could be implemented via WebSockets / WebRTC.

Also, when providing a login functionality, there should be a modern backend for this, not just local users.
A solution that would fit very many people would be to integrate SAML and/or OpenID authentication.

As I mentioned in #85, you could use Keycloak (which can handle both SAML and OpenID) as an IdP:
Keycloak: keycloak/keycloak
Keycloak NodeJS integration: keycloak/keycloak-nodejs-connect

@kylecarbs
Copy link
Member

@kylecarbs kylecarbs commented Mar 8, 2019

@baryla
Copy link

@baryla baryla commented Mar 8, 2019

This feature is a must for us. In terms of access, I would say that allowing the use of a terminal and editing any file/folder etc. would be enough.

My suggestions based on Cloud9 experience:

  • Allow for a shared terminal
  • See exactly where others are on a file (cursor, line highlight)
  • A way to see how many people are currently viewing the project
  • A way to see a person's active file (we usually talk about a particular file that may be nested in 10 folders)

The way Cloud9 tackled this is great and it is something I'd personally love to see implemented in code-server. We use it as our go-to IDE but after Amazon's take over, we're looking for alternatives and Coder/code-server would be it if it had collaboration/live share.

@baryla
Copy link

@baryla baryla commented Mar 8, 2019

@kylecarbs - sorry I accidentally commented and then deleted it haha. See my new comment.
Regarding how Cloud9 implemented this - I'm not sure about the self-hosted version as I haven't used it however, the way we use cloud one is this:

  1. We create a remote SSH workspace from our master account per project
  2. From the master account, we invite all devs to have access to the workspace (files/folders + terminal)
  3. Then you switch to your personal account and use the workspace shared by the master account.

I'm trying to think what malicious activity there could be if this is self-hosted? Surely if you have a secure server and you trust your devs, there is nothing to worry about? In our case, we only have 3 full-time devs so I guess the only time where there could be a concern for this is if we get a freelancer or something.

If you could share some of your concerns about this, I'd love to hear them! :)

@ghost
Copy link

@ghost ghost commented Mar 8, 2019

I think project selection should be done after login via a seperate page, locking each vs code session to one project to work on at a time.

@ghost
Copy link

@ghost ghost commented Mar 8, 2019

@baryla You could accidentially kill the server/container via the terminal, e.g. by installing packages that mess with the system, or killing the wrong process ID.
I already had some thoughts about that in #86.

@baryla
Copy link

@baryla baryla commented Mar 8, 2019

@PhilsLab - 100% agreed about the project selection. When it comes to accidentally killing the server - I guess there could be times when this happens but I don't think this is a massive concern. Well, it would be if you worked directly from a live server. Ideally you should only be working on a dev or staging server and then only push your code live so it's not a big deal (IMO).

@ghost
Copy link

@ghost ghost commented Mar 8, 2019

My concern is not one of trust, it's one of software security. For an optimal experience, i'd really like to see each terminal in it's own docker container, where you can select any docker image before running it. That would solve both security and the build/dev environment, and also is able to scale properly.
I'd use this as an instance on kubernetes to provide it to friends for example, where just trusting them not to screw up my server simply isn't enough :)

@nadavpa
Copy link

@nadavpa nadavpa commented Mar 9, 2019

See how the jupyter team solved this: https://jupyter.org/hub

@babakness
Copy link

@babakness babakness commented Mar 12, 2019

I believe codesandbox io has this feature as well and it is open source.

https://github.com/CompuIves/codesandbox-client

@sr229
Copy link
Contributor

@sr229 sr229 commented Mar 13, 2019

Be reminded we can try VS Live Share, which is available in the official extensions gallery, I think we can pull from there and support that atm

@NGTmeaty
Copy link
Contributor

@NGTmeaty NGTmeaty commented Mar 13, 2019

I don't think it'll be "officially" supported because I don't believe there's a official way to obtain it. (But I do think it's a very good solution if you can get the .VSIX.)

@sr229
Copy link
Contributor

@sr229 sr229 commented Mar 13, 2019

@baryla
Copy link

@baryla baryla commented Mar 14, 2019

@sr229 - have you tried it? does it actually work?

@PassTheMayo
Copy link

@PassTheMayo PassTheMayo commented Mar 15, 2019

@baryla
Copy link

@baryla baryla commented Mar 15, 2019

@PassTheMayo Great! haha. Thanks for letting me know that it doesn't work ;)

@sr229
Copy link
Contributor

@sr229 sr229 commented Aug 31, 2019

Since c9 appears to no longer be worked on and it's collaboration is shady many are looking for other web IDEs that support collaboration, it's one of the greatest advantages of having a cloud IDE. Hopefully this features is added in the months to come.

As a matter of fact, I think I found a livecollab extension in the extension gallery that is open source, might worth checking?

@sr229
Copy link
Contributor

@sr229 sr229 commented Aug 31, 2019

Also our friends from the Theia project is working on a open source VSCode-compatible Livecollab extension, should be promising since I'm also pushing code-server for inclusion in Che.

@Mustafa-C
Copy link

@Mustafa-C Mustafa-C commented Aug 31, 2019

Sounds interesting. What's the name of the extension you found?

@brandonkal
Copy link

@brandonkal brandonkal commented Nov 2, 2019

@sr229 Also interested in the name of that livecollab extension. Thanks for looking into this.

@vanducng
Copy link

@vanducng vanducng commented Dec 20, 2019

This feature will bring code-server to a new level, i just installed for some people in my team. It works like charm.

@brandonkal
Copy link

@brandonkal brandonkal commented Dec 20, 2019

@vanducng what extension did you just install for this?

@jdabs
Copy link

@jdabs jdabs commented Dec 25, 2019

Isn't this what git should be handling? I don't see why I'd want two developers working on the same file without seperate branches. Maybe in a learning environment, but not in a business setting.

The git checkout feature should feed to the editor, only. If collaboration is needed, outside of an educational setting, then what for?

@AnthonyMastrean
Copy link

@AnthonyMastrean AnthonyMastrean commented Dec 26, 2019

@jdabs when pair programming (or other similar practices)... and definitely in a business env. My team is full time remote. We screen share using a number of tools. VS live share has helped, but we’d love to use server based VS.

https://www.jamesshore.com/Agile-Book/pair_programming.html

@sr229
Copy link
Contributor

@sr229 sr229 commented Dec 28, 2019

@jdabs I disagree with pair programming on the non-business side. Some companies that adopt Agile encourages this, Pair programming is quite useful in a practical sense:

  • Situation 1: you need live assistance with the person in charge of that subsystem, and you're not present in the office or the engineer in charge isn't.

  • Situation 2: when crunching, having a dev environment already setup and people to connect to is easier, especially if its a minute change and the codebase is too large to pull, especially in constrained bandwidth environments (4G, EDGE, etc.)

@nhooyr
Copy link
Member

@nhooyr nhooyr commented Jan 30, 2020

This is unlikely to occur at the moment. I'll be sure to open an issue for this when the time is right.

@nhooyr nhooyr closed this Jan 30, 2020
@MatthiasHertel
Copy link

@MatthiasHertel MatthiasHertel commented Apr 15, 2020

@nhooyr whats up with this ...

i guess corona virus "makes the time right" for the strong demanded collab feature. it should be possible use collab on premise instead of using live share.

https://github.com/cdr/code-server/blob/master/doc/FAQ.md#collaboration
from the faq.md

Collaboration
At the moment we have no plans for multi user collaboration on code-server but we understand
there is strong demand and will work on it when the time is right.

@nhooyr nhooyr reopened this Apr 16, 2020
@nhooyr
Copy link
Member

@nhooyr nhooyr commented Apr 16, 2020

Yes, you're absolutely right. Unfortunately at the moment the team is occupied but I am reopening this. Hopefully we can get to it within the next few months.

@UnlimitedCookies
Copy link

@UnlimitedCookies UnlimitedCookies commented Apr 19, 2020

I don't know if this helps.
Potentially the javascript-based backend shareDB might be a good fit for syncing the texts between the clients.

@GalacticLion7
Copy link

@GalacticLion7 GalacticLion7 commented Jun 20, 2020

How about using TogetherJS by Mozilla?

@nhooyr
Copy link
Member

@nhooyr nhooyr commented Jun 22, 2020

That looks really cool! Unfortunately the examples don't seem to work for me. I tried to use my invite link in a separate private browser tab and couldn't get the two to connect. If I can get it to work, it seems like it'd be a great low cost solution.

@mgielda
Copy link

@mgielda mgielda commented Jun 25, 2020

What about yjs - https://github.com/yjs/yjs ? It has Monaco support: https://github.com/yjs/y-monaco

@umcconnell
Copy link

@umcconnell umcconnell commented Jun 27, 2020

@nhooyr The TogetherJS examples aren't working, because the examples try to connect to hub.togetherjs.com. This hub doesn't exist anymore. This issue gives more details on the problem and instructions on how to set up a hub.

@ribrdb
Copy link

@ribrdb ribrdb commented Aug 2, 2020

It looks like firepad has support for Monaco, I wonder if that could work.
https://github.com/FirebaseExtended/firepad/blob/master/examples/monaco.html

What is Firepad?
Firepad is an open source real-time collaborative text editor. It provides true collaborative editing, complete with intelligent operational transform-based merging and conflict resolution.
How is Firepad different than other collaborative text editors?
Most collaborative text editors require special code to run on a server, making them impractical to use if you're not already using the right server stack. Firepad has no server dependencies and instead relies on the Firebase Realtime Database for real-time data synchronization. This means that it's easy to add Firepad to any application, even static websites. All you need to do is drop in the JavaScript files and go.

@nhooyr nhooyr removed their assignment Aug 29, 2020
@OliverwengFiltered
Copy link

@OliverwengFiltered OliverwengFiltered commented Sep 4, 2020

@kylecarbs @nhooyr

Hi there,

wondering if you guys have any new updates regarding to this live share.

the terminal is not synced currently, so we have to do a screen share additionally when it comes to live collaboration.

it would be great if the code server itself has this feature supported.

we can discuss about a sponsorship if that's something you guys interested in.

Thanks
-Oliver

@rdbeach
Copy link

@rdbeach rdbeach commented Sep 9, 2020

Hi. I have developed a real-time collaboration system for code server based on Firepad/Firebase.

You can see a demo here:

https://youtu.be/fW9oXbbHjC8

I plan on shopping this around a bit to see if there are any companies that are interested, and would like to work with me on integrating this feature into there business.
rdbeach@gmail.com

@caio-vinicius
Copy link

@caio-vinicius caio-vinicius commented Sep 29, 2020

+1 this really will help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.