Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Queue Messages

Emily edited this page Oct 20, 2019 · 3 revisions

The queue front-end communicates with the back-end by connecting a socket using the socket.io Javascript library.

When the queue page is served to the client, a connection with the backend queue server is established on localhost:3000.

The front-end will then communicate queue joins with the back-end, which will update the queues for each of the connected front-end clients respectively.

The communication standard is documented on this page.

Event Description Sender Receiver Packet
N/A Frontend client connects to the queue frontend backend No packet just a connection
join Frontend joins a queue frontend backend {user: {id, name, questions_asked, signed_on, join_time}, queue}
leave Frontend leaves a queue frontend backend {user, queue}
update Backend requests all clients update a queue backend frontend {waiting, queue}
Clone this wiki locally