-
Notifications
You must be signed in to change notification settings - Fork 408
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
One jdt.ls instance to handle multiple clients. #741
Comments
It is not a scenario we support officially but if you are using a single server instance it will be like opening multiple files on the editor from the same project. They will not be isolated from each other and each user will be able to see other's symbol changes. I guess you can achieve this by adding a proxy to jdt.ls but anything beyond is really hard to achieve today. |
I am not JDT LS developer but only a user but I think that the following configuration might support what you want: One workspace and each of the clients will have its own workspace folder added to that workspace. The only problem seems to be the project name (I haven't tried that but I believe that Eclipse/JDT LS does not allow duplicate names). In order to avoid that you may generate a unique name for each of the clients' project and put it in |
Any updates @shoorlyne @hifall How you solved this problem? How you planned your scaling? |
Have we scaled this use scale? or Could you give more info on how the proxy to jdt.ls works? |
@shoorlyne Have you done any workaround to handle multiple client? |
@balabesimple1 @shoorlyne have you succeeded in this? |
I have a scenario which I'd like to ask for some advice about.
We use jdt.ls as the backend to provide code intelligence to our users. We plan to allow potentially 100+ users to edit Java code at the same time. The content in each user's file is different. All the users share exactly the same Java environment, including the compiler/vm, libraries, etc. From the language server's perspective, the users only differ in the files they are editing, while everything else is the same.
Therefore, if I can have one language server instance to handle LSP requests from all the users, it would be more resource efficient. My reasoning: each language server must allocate some resources for AST reading/cache, etc., and with multiple server instances, such effort is duplicated and the resources are wasted.
Last time I checked, a single jdt.ls instance started by editing a Java source file of dozens of lines of code consumed ~300MB. If there are 100 concurrent users, it would be ~30GB. But if somehow we can manage to have only one instance to handle the requests, I imagine it should fall near the 300MB end, instead of the 30GB end.
Is this possible?
The text was updated successfully, but these errors were encountered: