Theia Backend Question #13022
-
I would like to be able to maintain different information for different users in my Theia environment. For example, when external APIs are invoked from my Theia extension's backend, different pieces of data need to be passed depending on the user. When using Theia, do all users share the same backend? I was thinking of maintaining a map with the userid as the key and the api info as the value. Does it make sense to do this, or am I overengineering this? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 13 replies
-
Theia is not a multi-tenant system. I.e. any Theia backend is only supposed to be used by a single user. Otherwise you get unwanted side effects such as shared plugins, settings and terminal processes. Therefore, Theia backends need to be isolated from one another, you can do this via something like theia cloud. With a kubernetes based solution, you will get a unique IP for each pod and you could differentiate them this way for an external API. |
Beta Was this translation helpful? Give feedback.
-
Every user starts their own backend process in their home directory. It is not clear to me how another user would have then access to someone else's home directory. |
Beta Was this translation helpful? Give feedback.
-
Sure, you can do that, but you need to create a solution that will create user accounts on the machine for each user, set up the backend for each user and make sure users are well isolated from each other and cannot access anything on the machine they should not be able to change. Also this will be difficult to scale. Doing this replicates what docker and kubernetes provide for you. It would be better imho to use docker and/or kubernetes and/or Theia Cloud. |
Beta Was this translation helpful? Give feedback.
Yes, but Theia Cloud is a dedicated project with the goal to host Theia-based applications the way you described.