cluel3ss's avatar

Broadcasting people in Queue, most efficient way to notify existing members?

I am building an app which will allow users to queue for a business. There will be a page which on load will show how many people are in front of them in a queue.

Using Pusher I am able to notify the browser when member of the queue has left the total queue number (which they can see) has decreased, I wanted peoples opinion on how best update this.

Either I can have the total queue number includes in the broadcast message or I trigger a call to get the most recent number from Laravel again.

The first option I am concerned if the message is queued and consequently delayed (or the wrong order received) then the number wont be correct; but on the other hand if I have all browsers triggered to fetch the number again on new alert, there could be potentially 30-40 people hitting that endpoint all at once which doesn't sound very efficient to me.

0 likes
0 replies

Please or to participate in this conversation.