I am trying to make an online teacher-doubt solving MERN application.
The workflow is as follows:
A user of the app clicks on the "Ask Doubt" button associated with the teacher.
The user makes the payment.
The user is then added to the queue where he/she waits for the doubts of the people ahead of of him/her to be resolved by that teacher. (Edit: The user and the teacher go into a chat room then and the others will wait in the queue)
I also want to display the number of people in the queue already in the queue so that the user can only pay if they have enough time.
I cannot guarantee the average time for each doubt session so I cannot ask the user to come in after some x amount of time.
Also, feel free to suggest some other implementation if u feel my approach isn't good.