Putting Streaming to Work
Imagine a small village by the river. There is one boat, and whoever needs to go to the other bank to buy some food takes this boat. No one in the village can go to the other bank until the boat’s back. This is in some sense similar to the HTTP request/response model of communication.
At some point, people who lived in the same village built a two-lane bridge over this river. Each lane allows walking in one direction. All of a sudden you see that lots of people are moving in both directions at the same time. The number of trips to the other riverbank is a lot higher now. Yes, people carrying the shopping bags may go slower, but they are all moving at the same time. And each trip is faster, too; there is no need to embark/disembark from the boat (connect/disconnect). This is streaming.
Note
RTMP implementation offers two-lane traffic (a two-directional socket) and is a lot more efficient than the request/response model. Each connected computer just sends the data in one direction to a dedicated socket, which allows you to measure and estimate delivery metrics in each direction. RTMP is an open protocol available at http://www.adobe.com/devnet/rtmp/.
In multimedia applications, having an uninterrupted data delivery is a must, and the request/response model doesn’t work here. When you go to http://www.youtube.com, you expect to start watching the video immediately, without waiting until the entire file is downloaded to the client. And after seeing the first frames ...
Get Agile Enterprise Application Development with Flex now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.