Skip to content

Best way for multi-session / muti-user support? Advice needed #968

@KonstantinMastak

Description

@KonstantinMastak

First of all thanks for a great project! I'm now looking for a way to give several users an access to the interpreter simultanoiusly, so I need "sessions" feature.

I saw PR "feat:Add support for containerized Code execution, and utilities ( upload / download fn ). #459" but the proposed solution seems to be very complex and overengineered. So I'm looking for other ways to accomplish this and want to share my thoughts and listen to community advices.

What I want to get:

  1. Several sessions can be run simultaniosly
  2. Sessions are more or less isolated, i.e. user of one session can't write such prompt that can affect files and flow of other sessions.
  3. Sessions persist so that we can return to dialogue in 1-2 weeks and continue it from the point we left it, and with files we uploaded/processed to the moment
  4. Not too much overhead fo each session in terms of memory and hard drive

What solutions are possible?

  1. We can make 1 session = 1 docker container, but it seems to be non-realistic solution because of huge memory and cpu overhead, also a lot of DevOps headache.

  2. We can have 1 docker where we run several instances of open-interpreter inside one container. But what about sessions and file storage? We can bind external volume with subfolders where 1 subfolder = 1 session, and we can name that folder like session GUID. But how to make Open Interpreter work with particular folder as its root and whatever user writes in his prompt there should be no way how Open Interpreter can come to the subfolder of other session with any file read/write operation from executed Python script?

  3. I'm thinking about using venv somehow to separate user sessions, but it seems to be overhead in storing the same set of Python libraries several times (for each session), also I don't know how fast is it to create new venv instances for each session. Still we have open problem with storing and separating uploads/processed files of each session.

How do you think what is the best solution?

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions