Skip to content
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

Implement "rooms" #9

Open
susliko opened this issue Nov 18, 2020 · 2 comments
Open

Implement "rooms" #9

susliko opened this issue Nov 18, 2020 · 2 comments
Assignees
Labels
server Server

Comments

@susliko
Copy link
Owner

susliko commented Nov 18, 2020

We're going to have a "room" entity in our app. This is a place with unique identifier, which can be joined to use video-chat capabilities.
We need REST operations to create/join rooms:
POST /room/create

  • receives: nothing (?)
  • responds: unique room identifier

POST /room/join

  • receives: nothing (?)
  • responds: (?)

Should we think about unused rooms cleanup? What overhead does an existing room have?

@susliko susliko added the server Server label Nov 18, 2020
@salamantos
Copy link
Collaborator

I've created Room entity like this:

class Room(BaseModel):
    id: str = random_short_id()
    users: List[str] = []  # todo: make set()?
    creator: str
    worker_id: str

Do we want user names to be unique in one room? Now it is not unique, maybe it could be problem for workers to identify user when establishing connection

@salamantos
Copy link
Collaborator

Also we have Worker entity:

class Worker(BaseModel):
    id: str
    url: str
    capacity: int = 1
    filled: int = 0

Worker is responsible for interacting with users. One Room belongs to one Worker, Worker could have multiply Rooms, ideally up to Worker.capacity

When user creates Room, it is automatically scheduled to the less busy Worker

When user joins Room, response is Room object contains worker_id. To get url to connect to, this request should be done to fetch Worker: http://zumba.salamantos.me/docs#/default/get_worker_by_id_worker_id__worker_id___get

@salamantos salamantos self-assigned this Nov 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
server Server
Projects
None yet
Development

No branches or pull requests

2 participants