Running Hosted Plugins in a Sidecar Container

Currently the Python extension and CPP extension offer the ability to specify start commands for language servers. This allows us to trivially run their associated Language Servers in an execution environment separate from Theia. Are there any plans to enable similar behavior when running Hosted Plugins?

[original thread by Casey Flynn]

There should be a way already. @florentbenoit Could you explain how it could be done?

Hello Casey, in Eclipse Che this is what we’re doing. Plug-ins/VSCode extensions are executed in sidecar containers of Eclipse Che workspaces. (so on a separate instance of Theia)
Eclipse Che is container ready this is why it’s done there.

[Ido Perez]

Hi Florent, How does a VSCode extension know in which side car to run? Is this part of the plugin-ext? Can you point to the code?

hello, it’s in che plug-in definition. We specify which image to use
example: https://github.com/eclipse/che-plugin-registry/blob/5838d83745efcace8eb5b38cf60532ee7d04d550/plugins/org.eclipse.che.vscode-sonarlint/0.0.1/meta.yaml#L9-L10

Then when we deploy this plug-in into workspace, che will use a sidecar to deploy this plug-in.
HTH

[Casey Flynn]

Thanks from the info! I have been looking at how Che is accomplishing this (we would like to do something similar) from what I am seeing it looks like Che is using https://github.com/ws-skeleton/che-theia-remote-extension to run a minimal instance of Theia (in a container) that loads plugins and proxies I/O via web-sockets. To communicate with the container, Che-Theia is running https://github.com/eclipse/che-theia-hosted-plugin-manager-extension to decern which container(s) are running hosted plugins. The URI and port is then made available (to the hosted-instance-manager) in the Theia plugin-ext. Is that correct?

[Casey Flynn]

I am still trying to discern where the plugins are being registered; are you implementing your own PluginScanner somewhere?

This allows us to trivially run their associated Language Servers in an execution environment separate from Theia.

Do you run each language server in its own side container?

[Sun Seng David TAN]

@caseyflynn have you considered using Eclipse Che?

[Casey Flynn]

@sunix Our use case doesn’t quite fit Eclipse Che (which is a pity as it is an excellent product).

[Ido Perez]

Since this is a complex topic, is it possible by any chance to do a small overview on this in the community meeting?

[Gorkem Ercan]

Che does. This allows Che to separate language requirements such as JDK, node, pip etc. not to be a runtime and IDE container concern. Since IDEs themselves are plugins on Che7, you can even imagine using the same python LSP both with Theia and jupyter on a Che workspace.

[Gorkem Ercan]

You are asking to learn more about Eclipse Che actually. Perhaps it is better to ask for it as part of Che Dev meetings. https://github.com/eclipse/che/wiki/Che-Dev-Meetings

[Gorkem Ercan]

Can you tell more about the case? We have a goal to make Che workspaces to be more flexible, I would be interested to hear more real world cases and perhaps we can even help enable it.

[Ido Perez]

I meant the plugin-host, not how che runs it in a side container

[Sun Seng David TAN]

@caseyflynn yes it would be a pity to duplicate the work (and the code…). With Che we are trying to make our components as reusable as possible so we can imagine having it working in several usecases. So if Che does not fit, it would be interesting to have this fit in the future somehow. Could we know more about your use case ? :slight_smile:

[Casey Flynn]

@sunix @gercan We are wanting to allow Theia to start/communicate with VS Code / Theia plugins in our Cloud Shell container. I need to look into it a bit more, but it appears the eclipse-che-theia-remote extension (https://github.com/eclipse/che-theia/tree/master/extensions/eclipse-che-theia-remote) may fit our use case as well.

[tomevision]

Hello I have custom extensions for previous Che versions(6), so i want to upgrading to the new version Che 7. because i don’t wanna do things from scratch is this possible if that so then how can do that.