Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

createRoom and getSession

daveyha
Level 2
Level 2

Hi-

Currently createRoom and getSession each involve a separate HTTP request using the server integration libraries.

Would it be possible to combine these calls into a single HTTP request?

On Google App Engine, not only do I pay for each outbound HTTP but it seems the requests can take some time.

Thanks-

David

3 Replies
Raff_
Employee
Employee

No

Well, createRoom and getSession are completely distinct operations. Sometime you want to create a room, sometime you want an authentication session for a room, maybe sometime you want both but I don't see this as being a primary use case.

Having said that, we may think about a way to "combine" multiple requests, but it wouldn't be high on the priority list. A different approach that may be useful to more people would be a way to allow runtime room creation and deletion (i.e. if your account is configured in a particular way when you call getSession your room gets created and started, and when all users leave the rooms ends and gets deleted).

Again, this may be a more useful feature, but will have to be prioritized.

In the mean time wouldn't be better for you to have a pool of rooms that you pre-create once and keep reusing ?

daveyha
Level 2
Level 2

Thanks for your reply.

I want to stop users from being able to enter a room they have entered before. So having a pool of rooms and recycling them would not work. I may have re-used a room for a new meeting with new participants.

At the moment, when a new meeting is required, I am creating a new room with a random name and joining the new participants to that. Old expired rooms are deleted once in a while.

Is there a different way of doing this with a pool of rooms? Once I've given out an authentication token for a room, that's it right? There's no way in the server integration API to invalidate a previously given token?

Having thought about it more, I realised for GAE I should restructure and make all my AFCS calls into background Tasks. This works well and is in better keeping with the design of GAE.

Regards-

David

Raff_
Employee
Employee

Actually the authentication token you get from "getSession" is valid for only one session. If the room closes and reopen and you try to access it with the same token you will get an authentication error.

Also, there is an "invalidateSession" method that you can use to make your room "inaccessible" to current users without waiting for the instance to terminate.