I am building a tutoring application that multiple students can sign into the same session with a tutor.
My question is, for example, if I sent out a command to draw a line, do I need to wait to see that all connected students propagated the command. Now, it relies that requests will be processed in order.
But consider this. If I draw one point, drag and draw another point, it will draw a line. But if I don’t wait to see if each step propagated to all students’ screens successfully, a student might receive an instruction of drag, draw, draw.
However, waiting for each connected user’s input seems to be a very slow approach. Is there any way I can solve this efficiently? Or is this a problem at all?
2
One way I could think of is to encode a unique numerical order for each draw instruction, so if they were sent out of order, the program picking it up would know that it was out of order and could correct the drawing accordingly.
I’m not sure this way is the best way, though, as it means that if the packets are wildly out of order, the drawing will fluctuate a lot.
2