we have deployed a theia image on our server, when a client open the ide on web, our server will create a container for him, it will costs about 300MB to create it. If there are many users visit our webide, it will cost a lot of room to maintain so many containers. I want to know why theia chose to create ide base on container, what are it advantages, and I want to know what is in the container, consist of 300MB room, thank you
@Duanyaoguang thank you for your discussion, i’m not sure I follow but hopefully you can help clarify.
we have deployed a theia image on our server
Is this an image that you developed and maintain yourself? There are no “official” docker images at this time that I am aware of. Images present under theia-apps for instance are deprecated and unmaintained and were never intended for production or commercial use.
I want to know why theia chose to create ide base on container
I’m not sure I follow. The Eclipse Theia framework allows application developers to create their own IDE or IDE-like application for both the browser and desktop. The framework itself is not an IDE, nor is it based on a container as you mentioned.
Thanks for your patiently reply，I‘m sorry for describing unclearly. I change the way to ask the question, what should I do if I want to use theia framework to create an IDE for users? We have developed several extensions based on theia. We package both runtime environment and theia extension code in a image, as docker are commonly used. Then, if a client click our IDE button, our server will create a container for it, and the container’s image is the one we just created. In this way, each client will cost nearly 300MB room for creating a container. Is that a right way to use theia to create an IDE application? is a container for each client necessary? I want to optimize it.
@Duanyaoguang Given the way virtually all web IDE’s work (such as vscode-web), a dedicated container per user is absolutely necessary to make sure that no data is shared across users and functionality is preserved correctly. These are some examples of issues which might appear when running multiple users on a single backend:
- Everything related to workspaces is shared. So every user is able to modify/see the same files as other every user.
- vscode extensions are shared and if one user uninstalls an extension, it will also be uninstalled for every other user (Note that each user still has their own extension host)
thank you very much, it really hit the point. I also want to know that, if we give a dedicated container for every user, is it a receivable cost? Can you tell me what did Microsoft do to optimize it, to use k8s to manager every pod?
@Duanyaoguang It kind of depends on what your business model is. Microsoft is using vscode-web for GitHub Codespaces, which is “pay per hour of use”. Their code is closed source, but taking a look at what Gitpod does might help (they just have a monthly fee). As far as I know they just spawn a new pod on kubernetes for every user and orchestrate that using a microservice.
thank you， I got it