-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Thoughts about multi-user support #5573
Comments
The users can select different workspace roots so they won't conflict.
Can you please clarify a bit on this? |
@kittaakos More details:
Assuming multiple users are editing the same file, naming 'test.js' for example, the last one who save the edit may override others' modifications. Saying 'tolerable' means it's acceptable for one's business
The users indeed can select different workspace roots, but we should have ways to make sure they do.
When userA logged in, only workspace '/test/wa' can be openned by validating against t_user_workspace. My concern is , even though having the above considerations in mind, whether the back-end really support multiple user, are there other problems like concurrency issues in java? I'm new to nodejs, and look forward to seeing more details or thoughts about multi user support in Theia. Really appreciate. |
IIUC, the backend tries to have as little state as possible, and when state is needed, it is stored in some kind of session (1 per connected client). The biggest issues are filesystem related I think: like you mentioned if two people edit the same files there may be concurrency issues. Some talked about collaborative editing, but no extension was published yet for it. Aside from the filesystem I don't exactly see what would go wrong. Just Git alone, since the state is inside the |
I'm preparing to test Theia with multiple user visiting, so it's better to keep this issue open if there are some problems in the process I would post here. |
If you have a dirty editor then saving a file will override any changes on fs and propagate to all editors which are not dirty. Consequently If you don't have a dirty editor then an editor content will be overridden by any changes on fs. |
Are there ways to tackle this behavior gracefully? if multiple users are editing the same file, this is weird, Whether propagating to all editors in frontend or just saving to fs in backend, maybe it's about concurrent editting, need diff/merge to resolve the conflicts, seems a little bit complicated. |
I think there are 2 ways to fix out this problem
Either way, userA and userB dont edit same file in concurency way, but merge theirs changes by git |
@blueken solution 1 is the recommended one, since it gives users an isolated environment. Solution 2, where you clone the same repository on different places of the same host and open a Theia instance for each, this can work too. But you then have to play around with starting each Theia instance with the right uid/gid to restrain the user from accessing things he shouldn't (mostly other's workspaces). If you want to reuse the same Theia server process for multiple users though, then everyone will share the same permissions. Theia doesn't manage user auth, not without modifications/extensions. |
We wist to do it, but not this year. There are more pressing matters like complete support of vscode extensions and 1.0 release. Isolated env per a user sounds good. |
@blueken If one needs support a complete environment including coding, building, debugging, packaging etc, then isolated environment is necessary and somewhat inevitable. |
Hi guys, is this topic under developing? Has any progresses? |
Theia is designed under a single user scenario, that is back-end should run in a sandboxed environment like docker. But setting up docker or k8s seems a little bit too heavy cause someone may use Theia only as code editor or generic platform to extend functions, so is it possible to run in multi-user scenarios under some conditions, supposing:
This brought a problem userA and userB could access the same underlying file system and conflicts may exist. But if the conflicts are tolerable form someone's use case(like multiple writes, but last wins), Or Doing validation outside to make sure different users access different workspace folders, does it make sense?
The text was updated successfully, but these errors were encountered: