Reputation: 95
I am working on an online meetings web app. Each meeting has two queues that users can join - one for asking questions, another one for debating. The queues are operating (can be joined/left) only during certain periods of each meeting.
The database table for queues looks something like this:
id meeting_id user_id queue_id active
----------------------------------------
1 50 35 1 1
2 50 77 1 1
3 50 15 2 1
4 150 35 2 0
5 50 89 1 1
While meeting with ID 50 is in process, each time that a new entry with this ID is inserted in this table or is modified, an update should be sent to all users who are currently in the meeting (they see queue length and their place in it).
I am currently doing this by short polling, but are there more optimal ways?
Upvotes: 0
Views: 43
Reputation: 1430
Have a look at SignalR, you can setup a hub service that allows you to have the clients receive event notifications. The link above should will give you a tutorial and examples of how to set it up. If you are doing a chat based app, this is probably a better way to tackle messaging between users as well.
Upvotes: 2