The SUESS Series
Stage 1 - Upload
Stage 2 - Encode
Stage 3 - SmoothStreaming
When Silverlight first came out, I was initially excited simply because, as I told my colleagues, "Now, we can do all that Flashy stuff too!" Growing up a .NET developer, my task lists contained to-do items such as building reports, optimizing algorithms, and modeling business objects; designing animations, playing videos, and encoding media were simply not part of my life.
I remember when media first started popping up on websites years ago. "How the hell do you write a movie player?" I thought to myself, mesmerized by whatever banner ad first showed off the possibilities of the technology to me. Little did I ever think that the ability to do cool stuff like that (back when people actually tried to shoot the dancing monkey in ads to win a free XBox) would find its way to the Microsoft stack upon which I teetered uncomfortably, at times, looking out at an uninterrupted future of stored procedures and service references.
Oh but it did! And in true Microsoft fashion, they not only made this stuff possible, they made it easy. So what's the answer to the exasperated question I asked above? It takes one little line of XAML to write a movie player. I was almost disappointed at how simple it was; the ease of such an implementation was a little anticlimactic. When I first learned basic programming concepts such as OO and recursion in high school, it was hard! When I taught myself SharePoint (2003), for example, I felt as though I had really endured a rite of passage.
But one line of XAML? Ok, I guess. Looks like I'm a Web 2.0 developer now...
How quickly I forget what it really means to be in the Microsoft development paradigm. Version (n) of a technology makes the old selling points of version (n-1) trivial, and the future selling points of version (n+1) possible. So now that playing media is easy, we can spend more time solving the ancillary problems that are now feasibly solvable.
Where do the movies that we can now play come from? Where do we put them? Does Silverlight support them? How do we make the viewing experience decent for all users across the Internet? Once we make it possible to play media, we need to keep right on going and implement every step of what I call SUESS or the Silverlight Uploader, Encoder, and Smooth Streamer.
SUESS is a process that handles not only playing media, but uploading and encoding it as well. It takes advantage of several cutting edge technologies to do this: Silverlight 4, WCF, Expression Encoder, and IIS Media Services (both of the later were in version 3 at the time of this writing). The details of building each piece of SUESS are scattered around the Internet in various blogs and forums. My goal here is to bring them all together and show how these technologies interoperate to deliver a true, full featured media solution.
Architecturally speaking, SUESS has a lot of moving parts, but they all fit together very nicely. Let's start with everyone's favorite Visio architecture diagram:
Following is a description of all of SUESS's constituent components, and the interactions among them.
The "components" section describes the system from the perspective of each machine's logical role. Grammatically, these are the nouns, where the following "interactions" section outlines the verbs.
Before diving deeply into each component's details and code in SUESS, I'd like to make another pass through architecture from the perspective of each interaction. As with any distributed system, there is a lot of communication that needs to happen to facilitate each server's role. For example, the client needs to tell the Media Server when a file is done uploading, which it can't know until the Web Server informs it that it's properly been copied to the File Server.
That does it for the architectural overview of SUESS. Like I said, the main goal here is to wrap all aspects of media serving on the web into one system: uploading, encoding, storing, and viewing. The Microsoft stack of IIS Media Services, Silverlight, WCF, and Expression Encoder provides an unprecedented media platform to deliver rich, "Web 2.0" content to our users. SUESS is merely the glue that sticks all these technologies together.
Look for future posts from me (and soon, I promise!) that will dive into each component with deep technical discussions and code samples. Until then!