Furqan Misarwala Furqan Misarwala - 5 months ago 58
Node.js Question

Push to talk - How to manage push button in socket.io

I have two servers where socket.io is hosted , communication between two apps are managed with redis.

When user 1 click on push button , on server side in redis, I am making entry as

Room:A -> User1

When user 2 click on push button, he get room busy message because there is already entry in redis for User1

When user 2 pull the button , I am removing the entry from the redis , so other user will get turn to speak.

But issue when there are 100 user are doing the action, it is not working in real time manner.

Please suggest the right way for it.

Answer Source

I found the way to manage push button with locking.

using following Redis library for the same :


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download