What is Streaming Used For?
Explore the practical uses of streaming in SignalR, focusing on its ability to efficiently transmit live or large sets of data without the overhead of individual message envelopes. Understand scenarios like live video streaming and IoT data where streaming enhances performance and maintains message order for seamless real-time communication.
Overview
Why would you need to use streaming? The more specific question is, why would you use streaming in SignalR? After all, it’s not gRPC, where streaming is perhaps the only way to deal with live processed collections. In SignalR, you can send an item of such a collection as soon as it becomes available. You already have a persistent connection open. Well, there are many real-life scenarios where streaming would still be useful, even in SignalR.
If you had to wait for the download to finish, you would have spent a long time waiting before you were able to watch a movie. High-quality movies are gigabytes in size. So, even with a fast internet connection, downloading would still take a noticeable amount of time.
So, instead of downloading the entire video all at once, you can stream it, which essentially means that the app you're streaming on downloads the movie in small chunks. Plus, as a viewer, you won’t even notice it, as long as the download is ...