In: Computer Science
IT344- Database Management Systems
book Fundamentals Of Database Systems
please no copy and paste
Use your own words ,
No handwriting.
Users prefer to stream high quality videos (e.g., watch YouTube)
without lagging (i.e., slow loading). In this context, explain how
UDP is better than TCP when streaming videos?
UDP is a connectionless protocol and is preferred over TCP when your goal is to provide as up-to-date information as you can. Because it's a connectionless protocol, it won't buffer even if some packets get lost. It'll continue the live stream, with a reduced quality. If the videos are of very high quality, that is they have very high packets for every frame, you can afford to lose a few, because all that would do is lower the amount of detail.
So, losing packets worth 100 mB of data won't affect 1080p, because it's going to be still closer to 720p - you'd miss only on some details whereas losing 100mB worth of data while playing 480p will mean that you might lose on something important- maybe an entire clip of a few seconds.
In case of TCP, you'll have to wait for video to buffer as TCP will not play the stream untill it makes up for the lost packets.
If you liked this answer, please give a thumbs up rating. Feel free to ask for any clarifications/explanations in the comments.