educative.io

Using long polling for keeping updated about reservation status

Clients can use Long Polling for keeping themselves updated for their reservation status. Whenever seats become available, the server can use this request to notify the user.

How does the client use long polling. They already call ReserveSeats, which will return failure immediately if other users are holding reserved seats. We the client gets the failure, would it call another API to initiate the long polling?

Hi @Dewey_Munoz!

If there are no seats available to reserve, but all the seats are not booked yet, as there are some seats that other users are holding in the reservation pool and have not booked yet. The user will be taken to a waiting page where they can wait until the required seats get freed from the reservation pool.