October 2008 - Posts

From PDC 2008 | .NET Micro Framework

We released .NET Micro Framework SDK 3.0 in PDC 2008, you can visit its official website here. This SDK can help us to develop embedded systems that are more securely connected through a variety of wired and wireless protocols. It supports development of code, including device I/O, in the C# language using a subset of the .NET libraries, and is fully integrated with Visual Studio. You can download the full SDK here, which lets you develop C# code for the .NET Micro Framework and run it on our extensible emulator. Then choose from several development kits to deploy your code to real hardware. Below is some specs of the SDK, including processor types and real-time OS support.


03


Hardware

You can select an evaluation board or development kit and its .NET Micro Framework software drivers. Some kits include all the software in the kit; software for others can be downloaded from the manufacturer. Some partners also offer additional add-on hardware. Digikey and Mouser have extensive catalogs of components that can be built into .NET Micro Framework.

01


How to Start

This is the main reason why I want to post about this. Usually we learn something new because excitement then just leave it out after we know it. But Micro Framework team does a special challenge for us to win 50,000 USD !!! That is what we call Microsoft Dare to Dream Different Challenge!. If your entry is one of the best you will share in the 50K USD in prizes and numerous other benefits up for grabs.

04 

Indonesian geeks, go for it!. Even if you don't win it this time, you will learn a lot!. Think of something out of the box,

- Solar Cell based robot controlled by embedded
- Manufacturing floor applications
- Digital Markup Reader ... (Zeddy works on this)
- Home Camera Controller ...
- Other ideas!.

Cheers,

RAM @ LA

Share this post: | | | |

From PDC 2008 | HPC++ (Windows HPCS 2008)

HPC will not only available to scientific community and specific vertical anymore. From HW perspective, Microsoft and Cray had very special announcement about "personal super computer", which I think will drive more parallel computing on the street. Cray's CX1 computer runs Windows HPC (High Performance Computing) Server 2008 and is available for customers to order now for delivery in October at a starting price of US$25,000. I will propose this machine for kUfI management and crew.

- Microsoft, Cray Launch 'personal' Supercomputer for $25K
- Microsoft and Cray Team Up To Drive High Productivity Computing Into the Mainstream
- Microsoft Takes Its Newest High-Performance Computing Platform to the Street

We can use Cray CX1 for production cluster, but for development, we can use 64bit machine with Windows Server 2008 HPC edition installed. So now we don't need million dollars investment to have HPC LAB like 10 years ago.

01

In this PDC 2008, I met Jeff Baxter, Microsoft Principal SDE who works on the MS-MPI and learn from him directly. He started to show me the Cray CX1 machine (64 cores) with Infiniband (MS-MPI can support RDMA via Network Direct to reduce network latency).

 
05
06

MS MPI stack is based on Argonne National Lab’s Mpich2 implementation, with the additional benefits of Network Direct, or fast direct hardware access bypassing kernel stack. If you want to have MPI on .NET, you can download MPI.NET from here. If you don't know MPI, don't worry as I will post more on parallelism after back to Jakarta, especially about MS-MPI for both managed (C#) and native (C++) developers. It is not rocket science, just another message passing to distributed tasks to cluster.

MPI requires fast hardware interconnect such as infini-band network cards to achieve 20GB/s in bandwidth, and 2 microsecond in latency.  By implementing network direct, hopefully we can compete with Linux/UNIX products. You can see in the picture Cray CX1 Infiniband built for speed and stability. Windows HPC also included MS-MPI event tracing, as shown below.

02  02

I only want to inspire about HPC in this post. I do believe that in very near future, we can have our own LAB in University of Indonesia to show you how it really works. Look on the picture below, that is the CPU heat map of MPI (LINPACK apps) program broadcast on 32,000 CPUs (~1950 nodes, 16 cores/node). The pattern of the heatmap is interesting as it is very application specific.

07

08

Stay tuned! Once back to Jakarta, I will setup my own Windows HPC LAB, play again with MS-MPI and MPI.NET and conduct deep dive training on it for ISVs and students in our MIC LAB at UI.

Hope this helps!

RAM @ LA

Share this post: | | | |

From PDC 2008 | Microsoft Code Name Dublin Part 1

Seems like this project is authored by some folks from Ireland. Anyway, as I don't know the historical POV, just think of it as... "Microsoft Application Server on top of WAS infrastructure". Dublin will be the standard host for applications that use WF and WCF in .NET 4.0. Excellent!!! Below is the high level view of some improvements in .NET 4.0 wave, I will more focus on something new for us, like Dublin and Oslo:

01 

I met the team who in charge to develop this, and they will give me VPC contains Dublin and Oslo current version today. For now just visit Dublin MSDN site here get some background information. I will update you more on part 2, directly from LACC. I also met Don Box who explain us about Oslo and have deep discussion with some folks from parallel computing group.


Stay tuned for my next PDC 2008 update.

 

Hope this helps, 

RAM from LA

Share this post: | | | |

From PDC 2008 | Geneva Server

Have you heard about Microsoft Code Name “Geneva”? Today I met the product team who built this STS framework and tools, they are under Kim Cameron team (www.identityblog.com).

“Geneva” Server Beta enables Active Directory Domain Services (AD DS) to be an identity provider in the claims based access platform (CBA). It is a security token service (STS) framework that supports the WS-Trust, WS-Federation, and Security Assertion Markup Language (SAML) protocols. “Geneva” Server can also issue managed InfoCards for AD DS users. Great... I was thinking about this when Naren told me about ADFS last year. Now, if you have Windows Server 2008 installed on your machine, you can download its CTP and play with it. We dont have to make it Naren :).

01 

Geneva distribution contains Framework and Geneve Server (+Management Console). You can build your own server management console with Silverlight for example, and everything you need is Geneva Framework. With “Geneva” Server you can:

  • Collaborate securely across Active Directory domains using identity federation.

  • Reduces the need for duplicate accounts and other identity management overhead by enabling federated single sign-on (SSO) across organizations, platforms, and applications.

  • Use Windows CardSpace for cross-domain sign-on both for Web browser-based applications and Web service.

  • Provides for identity delegation so that authorized applications may impersonate their users when accessing infrastructure services, even when the original user does not have a local account.

  • Enables step-up authentication so that Web sites can easily request smart-card authentication for particular operations.

 

Lets start with is the high level view of Geneva Server from these two scenarios:

Geneva as Identity Provider

03       03

When “Geneva” Server does not have any identity providers configured in its policy, all claims must be generated from the Active Directory attribute store. In this case, “Geneva” Server is acting as an identity provider because all the claims are generated from a local store. The claim rules on the target relying party determine what attributes are issued as what claims. Each rule maps an attribute in Active Directory to a claim type, and the attribute value is then issued as the claim value.

Adding a relying party to “Geneva” Server enables that relying party to receive tokens from “Geneva” Server. A relying party may be a locally hosted application, or it may be an external service provider. There is no difference between locally hosted applications and external service providers at run time for “Geneva” Server. At a minimum, each relying party must have an identifier and a display name associated with it. Each relying party may also have other data, including an encryption certificate, rules for issuing claims, delegation rules, and a metadata URL. Below is how it works:

1 - The client accesses a relying party application.
     The relying party application indicates that it needs claims to authenticate the user.
2 - The client requests and receives claims for the user from “Geneva” Server for the relying party.
     This step may or may not involve an identity selector, such as Windows CardSpace.
3 - The claims from “Geneva” Server are posted to the relying party.


Geneva Server as Federation Provider

02  04

When “Geneva” Server has identity providers configured in its policy, claims may be generated from the Active Directory attribute store or from the configured identity providers. In this case, “Geneva” Server is acting as a federation provider. The claim rules on both the identity provider and the target relying party will determine the claims that are issued. Each identity provider rule passes through, and possibly transforms, claims that are received from an identity provider. Each relying party rule either maps an Active Directory attribute to an outgoing claim or maps a claim that was output from the identity provider policy to an outgoing claim.

Adding an identity provider to “Geneva” Server gives users of that identity provider access to the relying parties that are configured in “Geneva” Server. Each relying party application makes authorization decisions about a user by examining the claims that “Geneva” Server provides. “Geneva” Server uses the administrator-defined claim policy for an identity provider to determine what claims to issue about each user, based on the relying party that is involved. Here is how it works:

1- The client accesses a relying party application.
    The relying party application indicates that it needs claims to authenticate the user.
2. The client requests claims for the user from “Geneva” Server for the relying party.
    “Geneva” Server indicates that it needs claims from an identity provider to authenticate the user.
3. The client requests and receives claims for the user from the identity provider for “Geneva” Server.
    This step may or may not involve an identity selector, such as Windows CardSpace.
4. The client receives claims for the user from “Geneva” Server for the relying party.
5. The claims from “Geneva” Server are posted to the relying party.

Currently, “Geneva” Server Beta does not support Security Assertion Markup Language (SAML) protocol identity providers. Maybe in next the CTP.

 

Just try it and stay tuned!

Cheers, RAM from LA

Share this post: | | | |

From PDC 2008 | Windows Azure Part 2 ...

In this part, I assumed you already installed the required SDKs. To start cloud service project, just open Visual Studio 2008 and create new cloud service project - Web Cloud Service. Below is how it looks like:


01

You will need SQL Server Express installed in your machine for development storage, so just make sure that your SQL Express service is started before creating new project.

03

You need Administrator privilege to run Visual Studio. In the Solution Explorer, examine the solution structure that was created. You'll see two projects, a Cloud Compute project and a standard ASP.NET project. The ASP.NET project will contain your code. The Cloud Compute project contains a reference to the ASP.NET project, as well as the service definition file (.csdef) and service configuration file (.cscfg). I just modified the Default.aspx page to display some custom text.

<head runat="server">
    <title>The Web Cloud Services</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <asp:TextBox ID="myTbx" runat=server>Risman Adnan</asp:TextBox>
    </div>
    </form>
</body>
</html>

Then press F5 to execute the service in the development fabric. Expand the tree on the left panel to see the service deployments. A new deployment is launched each time you start the service, so you may see more than one service deployment in the tree at a time. Expand the CloudService1 node to see the web role and worker role that are running within the service. If this is the first running instance, the Service Details will probably show a service URL of http://*:80 and an IP Address of 127.0.0.1:80. The development fabric attempts to allocate the port specified in the service definition file, but if this port is not available, the next available port is used. Switch back to Visual Studio, and press SHIFT+F5 to stop debugging.

04

So what is the development fabric?  The development fabric simulates Windows Azure fabric on our local machine so that we may run and test our service locally before deploying it to Windows Azure. The development fabric allows us to debug and fine-tune the behavior of our service before it is deployed.  The development fabric utility provides a user interface for observing and managing local service deployments.

Notice that both the development fabric and the Windows Azure fabric run IIS 7.0 in integrated mode. If you are writing an ASP.NET application that accesses the request context or calls the runtime API from the Application_Start event, you should modify it to initialize in the Application_BeginRequest event instead. 

05

A role in Windows Azure is a scalable component built with managed code. A service may run multiple instances of a role. Within the Windows Azure fabric, running instances of a role are replicated across multiple physical machines to implement all or part of the functionality of a service. The Windows Azure fabric currently supports two types of roles web and worker roles. A service may consist of a single web role, a single worker role, or one of each. 

Web role : A web application accessible via an HTTP and/or an HTTPS endpoint. A web role is hosted in an environment designed to support a subset of ASP.NET and Windows Communication Foundation technologies.

Worker role : A background processing application. A worker role may communicate with storage services and with other Internet-based services. It does not expose any external endpoints. A worker role can read requests from a queue defined in the Queue storage service.

 

06

All roles can make outbound connections to Internet resources via HTTP or HTTPS and via .NET APIs for TCP/IP sockets. Only web roles may listen for incoming requests over HTTP or HTTPS. All roles may access storage services via the REST APIs.

The shape of a service is determined by the service definition file. It indicates whether a service implements a web role, a worker role, or both types. For a web role, the service definition file specifies whether it exposes an HTTP endpoint or an HTTPS endpoint, or both. It also may establish configuration parameters for the service and define a local storage resource for caching purposes. The service definition can't be changed while the service is running in the fabric. To change the shape of a service, we must republish the service.

Let me show you in the next post.

 

Stay tuned!

RAM from PDC 2008 

Share this post: | | | |

From PDC 2008 | Windows Azure Part 1

I'm happy to be here at PDC 2008 in LA, because I can try Windows Azure myself. The Azure™ Services Platform aligns with the Microsoft vision of Software-plus-Services and overall services strategy by offering customers, developers, and businesses a transformation in connecting devices, business, productivity, and software. In this post I want to share my experiences with you guys in Indonesia. You can download the Azure CTP by clicking link below.

01

What you need to get started are listed below. I will give you quick introduction what is Azure all about.

 04      05

06      07

 
After you got all of those SDKs, make sure you signed in using passport and register to get invitation code from Azure as some Services only available using invitational code


What is Azure Service Platform
The Azure™ Services Platform (Azure) is cloud services platform hosted in Microsoft data centers, which provides an operating system and a set of developer services that can be used individually or together. Azure lets developers provide their own unique customer offerings by offering the foundational components of compute, storage, and building block services to author and compose applications in the cloud. This is the real implementation of cloud computing from Microsoft.

03

With Azure developers can quickly and easily create applications running in the cloud by using VS2008 and .NET Framework. Azure provides on-demand compute and storage to host, scale, and manage web and connected applications. Infrastructure management is automated with a platform that is designed for high availability and dynamic scaling to match usage needs with the option of a pay-as-you-go pricing model. Azure provides an open, standards-based and interoperable environment with support for multiple internet protocols, including HTTP, REST, SOAP, and XML. Microsoft also offers cloud applications ready for consumption by customers such as Windows Live™, Microsoft Dynamics™, and other Microsoft Online Services for business such as Microsoft Exchange Online, Microsoft Office Communication Online, Microsoft Office Live Meeting and SharePoint® Online. To learn more, please click links below:

- Windows Azure OS
- Live Services
- Microsoft SQL Services
- Microsoft .NET Services
- Microsoft® SharePoint® Services & Dynamics® CRM Services


Just take a look on those links before we go deeper in part 2. 

Cheers, RAM @ LA

Share this post: | | | |

Part 3 : Silverlight, Expression and WMS

In Part 1, I described the backend infrastructure of streaming media then I continued by introducing you Expression Encoder 2 in Part 2. In this post, I have decided to go deeper on Expression Encoder SDK to give you insight what else you can do with Encoder 2, specifically to support your media publishing activities. For developers, this SDK are reusable libraries packaged into DLLs. Current version of Encoder SDK gave you only 4 DLLs under Microsoft.Expression.Encoder namespace. Features in those DLLs are comply to the following Object Model (OM).

Full Object Hierarchy

Expression Encoder Object Model (OM) parallels the features exposed by the Expression Encoder UI and Encoder command-line application. It is built on top of multiple media technologies, including DShow, Silverlight, and Windows Media. The applications built on top of the Expression Encoder OM require Expression Encoder to be installed on the client computer in order to run.

The main objects to look for in the Expression Encoder OM diagram above are:
- Job. This is task object that contains MediaItem list and where the encoding process is controlled.
- MediaItem. The object encapsulating a media file and all the encoding options related to it.
- VideoProfile and AudioProfile. These two objects represent encoding options for video and audio.

Now let see a simple example:

- Create a new C# console project
- Add reference to all Expression Encoder DLLs to your project
- Just follow the simple encoding codes below and run it.

using System;
using Microsoft.Expression.Encoder;

namespace Simple
{
    class Program
    {
        static void Main(string[] args)
        {
            MediaItem mediaItem = new MediaItem(@"D:\Video\TestVideo.wmv");

            // Create a job and the media item
            Job job = new Job();
            job.MediaItems.Add(mediaItem);

            // Set up the progress callback function
            job.EncodeProgress
                += new EventHandler<EncodeProgressEventArgs>(OnProgress);

            // Set the output directory and encode.
            job.OutputDirectory = @"D:\Video";
            job.Encode();
        }

        static void OnProgress(object sender, EncodeProgressEventArgs e)
        {
            Console.WriteLine(e.Progress);
        }
    }
}

Yes, as you guess, an encoding process took many computer resources (CPU and Memory) and processing time depends to size of the encoded video file. It took around 91-95% processors utilization to encode 45 MB video file for above codes (single thread, sequential). That of course was NOT include additional algorithm for custom encoding for instance, just plain encoding job.Encode(). Hmmm....

This is may be a good additional reason for me to buy new multi-core (quad core) ready hardware!

01

So, what else? Encoding in command-line program is not funny. We need User Interface to facilitate media publishing with custom encoding. Well, perhaps we have a process with a content delivery network or we have some custom process that we want to implement in our own workflow (save as an encoder job file, etc.) for ongoing media encodings. We are lucky because Expression Encoder provides us a way to write plug-ins that can be integrated to Expression Encoder. For example Zip and FTP plugins (click on the images to go to the original detail articles). 

FTP   ZIP

There are two types of plug-ins you can make with Expression encoder, Publishing and Template. Publishing plug-ins enables us to take video and Silverlight template assets that we have created as part of an encoding job (see Part 2 article) and then do something with encoded assets. For example, we can upload the media assets by using FTP, WEBDAV, or METAWEBLOG API, publishing the asset to an asset management system or web service, or creating a data CD. Template plug-in lets us customize template settings and interact with the job through the IPluginHost interface. The plug-in also lets us add or remove files from the template output when the template is published.

Ok, this will be too long if I continue to write here. Let me split other topic into Part 4 of this series. Stay tuned!.


Hope this helps!

Cheers - RAM

Share this post: | | | |

Part 2 : Silverlight, Expression and WMS

In my previous posting (part 1), I explained about the backend infrastructure for media files streaming using both Web Server (IIS) and WMS. I do hope you can try to install WMS too (applicable for Windows 2003) and test it using your Windows Media Player, as the simplest client, or using Test Stream from WMS.

You can use CTRL-U from your Windows Media Player to get the Open URL windows. Or you can use WMS generated announcement file (WSX) to test media streaming at Server.
WMP01
If you get the video displayed, you can then test to see the network utilization between Web Server downloading model and streaming media. If you are curious enough, you can experiment using networking tools to really see the network protocols used by your MWS to stream media files (TCP, UDP, HTTP+TCP, Muticast) 

WMP

In this post, I will describe what inside Microsoft Expression Encoder 2, a tool for bringing your edited video project to the web for playback in Microsoft Silverlight and WMS scenarios. Expression Encoder includes many new features to improve encoding quality. I do believe that its documentation can explain you better than me, but let me give you short intro of its features.

Importing and Modifying Video
You can import video to Expression Encoder and make simple edits to clips directly. You can cut setup noise, mistakes, or surprises from your video either by removing sections of the video or by setting a cut and trimming the in or out point of a particular segment.

How to topics F1
EE01.jpg
EE02


New VC-1 Codecs
Expression Encoder 2 has the latest implementation of the VC-1 codecs, which means that you get better video quality and faster encoding than before. Each codec includes extensive advanced settings that enable you to refine your encoding to match your specific playback and distribution scenarios, while maintaining high quality. Live Encoding also takes advantage of these improved codecs, resulting in an enhanced live encoding experience.

In most common hardware and software configurations, encoding a video is the process of compressing the file to maximize quality while still enabling users who have varying playback capabilities to successfully play back the file. By using Microsoft Expression Encoder, you can encode your video and create a file that you can post on the web, distribute by Local Area Network (LAN) for high-quality playback, or play back on your Microsoft Zune device.

EE03

EE04

When you encode your job, Expression Encoder will identify changes to the source file and only re-encode the modified sections of the file, not the whole clip, saving time and maintaining compression quality. This also works when you are previewing Microsoft Silverlight templates. You can apply a template to your video and encode the job. If you then want to see how another template will look on your video, you can just choose another template and re-encode. Again, Expression Encoder will only re-encode the template change, not only which saves time but encourages experimentation.

EE06

EE05

You can export any of the default Silverlight templates into Expression Blend 2 to augment them in any way. Then, when you are done, you can save them and your edited templates will appear in Expression Encoder. You can also make a separate copy of Silverlight project to enable you modify the template further.

EE08

EE10

Before you encode, you can set the playback action of your Silverlight video, thereby controlling what happens when another user links to your video or loads it into the browser. You can specify whether the video plays automatically on download, or whether the user must first initiate playback before the video downloads and plays.

Essential of Encoding for Silverlight
To create videos that use the rich presentation and extensive interactivity of Silverlight technology, you must encode your video using templates, which are included with Expression Encoder. These templates include graphically refined skins with attractively designed transport controls, and also components that integrate with the Silverlight client. This allows your video to use such Silverlight capabilities as captioning, rapid seeking, or script-command execution. If you do not use a Silverlight template, Expression Encoder will create a Windows Media Video (WMV) file that can be played in various scenarios. Without a template, you must play the file by using a standard media player, such as Windows Media Player. Whether you use a template or not, Expression Encoder creates a file that is optimized for playback in the scenario that you choose.

In Expression Encoder, encoding is a two-part process. First, you choose a profile, which contains all the encoding parameters, such as bit rate and video size. A profile defines how a video is compressed, and which method of playback is required to view it. You can use a default, pre-configured profile or you can create your own. Expression Encoder provides the Profile category (Encode panel) to set encoding parameters. Expression Encoder includes several advanced codec settings that enable you to precisely set specific parameters so that you can tailor your video to get the maximum quality playback for your target audience.

If you want to explore more, Expression Encoder documentation can guide you better.

EE07 

Next, I will put some highlights from Expression Encoder 2.0 that you may need to know before practicing:

Multi-core/multiprocessor support
Encode quickly using the added advantage of mulitple processors.. The new VC-1 codecs support both multiple cores and multiprocessor encoding.

Animated overlays
With Expression Encoder, you can add animated watermarks to your videos. Import a XAML animation or a standard movie file, and Expression Encoder will embed the image onto the finished media. You can also use movie files that include alpha channels.

High-quality preprocessing tools
The new audio and video preprocessing tools in Expression Encoder help ensure that you get high-quality encoded files. Using the video tools, you can remove 3:2 pulldown, and also select the best resize method for your encoded video. With the audio tools, you can both normalize and adjust the overall playback volume of your audio track.

Interactive Timeline display
View all your script commands in an expanded timeline. Each command is represented by its own row on the Timeline, so that you can quickly view and adjust the location and duration of each of your commands.

Object model
You can use the new Expression Encoder object model to control the encoding engine from your favorite .NET language.

Server-side encoding
You can integrate Expression Encoder into managed workflows to automate the processing of large volumes of media.

I will explain more on how to use WMS streaming media together with ASP.NET Silverlight controls in my next post. Silverlight 1.0 and 2.0 can also be used with PHP application. Hopefully I can have time tomorrow to post about that in the part 3 of this series.

Hope this helps!

Cheers, RAM

Share this post: | | | |

Part 1 : Silverlight, Expression and WMS

This post is about end-to-end scenario for digital media experience using Silverlight (SL) as UX front-end, Expression (Blend and Encoder) as tools and Windows Media Services (WMS) as back-end streaming engine. WMS is a platform for streaming audio and video contents to clients over the Internet or an intranet. Clients of WMS may be a player, such as Windows Media Player, or they may be other servers running WMS for proxy, cache, or content redistribution. In our case clients are custom Silverlight applications. Contents that WMS streams to clients can be either a live stream or a prerecorded digital media file. Interesting to try the live streaming, but we need encoding software to do that, such as Windows Media Encoder. In this post, I will focus on prerecorded digital media files.

Basically we can deliver digital media files to clients over a network by using one of two methods: Web Server Downloading and Streaming Media. The first method usually uses a Web server to deliver the audio and video data to a media player. The second method uses a separate streaming media server (like WMS) specialized to the audio/video streaming task. Let see how they are different.


Web Server Download Model
Web server approach is actually close to download-and-play model. Uncompressed audio and video is first compressed into a single "media file" for delivery over a specific network bandwidth such as a 28.8 kilobits per second (Kbps) modem. This media file is then placed on a standard Web server. Next, a Web page containing the media file's URL is created and placed on the same Web server. This Web page, when activated, launches the client-side player and downloads the media file. Downloading requires that users copy entire files to their computers before they can play the content, which consumes both time and disk space. Downloading does not make efficient use of available bandwidth when we have many concurrent users because web server is designed to deliver content as fast as possible. When a client begins to download, all available network bandwidth is used to transfer the data quickly. As a result, other network functions may slow down or be disrupted. Why?

Because web server streaming uses the HTTP for communication between the server and the client. HTTP operates on top of the Transmission Control Protocol (TCP), which handles all the data transfers. Optimized for non-real-time applications such as file transfer and remote log-in, TCP's goal is to maximize the data transfer rate while ensuring overall stability and high throughput of the entire network. To achieve this, using an algorithm called slow start, TCP first sends data at a low data rate, and then gradually increases the rate until the destination reports packet loss. TCP then assumes it has hit the bandwidth limit or network congestion, and returns to sending data at a low data rate, then gradually increases, repeating the process. TCP achieves reliable data transfer by re-transmitting lost packets. However, it cannot ensure that all resent packets will arrive at the client in time to be played in the media stream.

In case you still want to use download method, IIS 7.0 Media Pack Bit Rate Throttling module provides helpful features to reduce bandwidth costs while increasing per-server capacity for concurrent download connections. For media files, Bit Rate Throttling implements a dynamic per-file throttling capability to provide intelligent progressive downloading.  It automatically detects the encoded bit rate of each file, sending the first few seconds at the highest data rate possible, and then throttling the rest of the file download based on the encoded bit rate.  This saves network bandwidth while preserving the fast start-up experience for the end user. In addition, the Bit Rate Throttling module provides control over download rates for any file type, not just media files.  While eleven media formats are pre-defined in the module, the module is fully extensible.  This allows a developer to add support for any media file type, and allows an administrator to easily add support for any data file type.


Streaming Model
In this approach, the initial steps are similar to the Web server approach, except that the compressed media file is produced and copied to a specialized streaming media server (WMS in this case). Then a Web page with a reference to the media file is placed on a Web server. In contrast to Web server downloading, the data is actively and intelligently sent to the client, meaning that it delivers the content at the exact data rate associated with the compressed audio and video streams. The server and the client stay in close touch during the delivery process, and the streaming media server can respond to any feedback from the client. While streaming media servers can use the HTTP/TCP protocols used by Web servers, they can also use specialized protocols such as the UDP to greatly improve the streaming experience. Unlike TCP, UDP is a fast, lightweight protocol without any re-transmission or data-rate management functionality. This makes UDP an ideal protocol for transmitting real-time audio and video data, which can tolerate some lost packets. As a bonus, because of the back-off policies implicit in the TCP protocol, UDP traffic gets higher priority than the TCP traffic on the Internet. And instead of the blind retransmission scheme employed by TCP, streaming media servers such as WMS use an intelligent retransmission scheme on top of UDP. Windows Media Services' UDP Resend feature ensures that the server only retransmits lost packets that can be sent to the client in time to get played.

Streaming method saves the content to a Windows Media server, and then assign the content to a publishing point. We can then provide users with access to the content by either creating an announcement file or by supplying users with the URL of the publishing point. To stream content smoothly, the bit rate of the content must be lower than the bandwidth of the network. If the bit rate is higher than the available bandwidth, the player will attempt to thin the stream so it can render the stream properly by using a process called stream thinning. Because of this, the player may render only key frames of the video stream with audio so that the video is not in motion, just like a slide show. If the bit rate requirements greatly exceed the available bandwidth, video playback may stop altogether and only the audio portion will be played. We can minimize impact of inadequate available client bandwidth using multiple-bit-rate (MBR) content. MBR content enables the player to request a lower bit rate stream from the server.

Fast Streaming provides several features that combine the advantages of streaming and downloading. The server can use the Fast Start and Advanced Fast Start features to ensure that the client can begin playing the content as quickly as possible after the stream begins. The Fast Start feature enables the player to download and buffer a small portion of the content from the server as fast as the network will permit before the content begins to play. After the buffer has been filled on the player, the server slows down the stream until it matches the rendering speed of the player.

For more information about Windows Media Streaming, I would like to recommend you this article, Getting Started with Windows Media Services 9 Series.

More on Windows Media Services
With a WMS, the media may be streamed with the optimal UDP protocol when possible, and streamed with the TCP protocol when necessary. WMS also supports Multicast which allows a single media stream to be played simultaneously by multiple clients, drastically reducing bandwidth use (need Multicast-enabled routers). For corporate clients, WMS can deal with firewall security and ensures that all users on all networks can access all streaming media content. WMS implements its own version of the HTTP protocol to enable streaming through a firewall or proxy server while still retaining most of the advantages a WMS.

So before we go to the "how to" topics, I would like to summarize that WMS supports four different protocol configurations, each offering specific benefits, UDP, TCP, HTTP+TCP and Multicast. The WMS will automatically switch to the appropriate protocol so no client-side configuration is necessary. The server will initially attempt to transmit files using the optimal UDP or Multicast protocols. If unable, the server will then attempt to send first via the raw TCP protocol, then via TCP with HTTP-based control.

Installing WMS on Windows Server 2008
I am using Windows Server 2008 and followed this guideline. Everything went well. To obtain the new features that are available in WMS for Windows Server 2008, first, we must get and then run the Microsoft Update Standalone Package (MSU) file for the appropriate Streaming Media Services role. These new features include the built-in Cache/Proxy plug-in. WMS can be installed in Full and Server Core version of Windows 2008. After installed the MSU, just add Streaming Media Services role in your Server.
ServerRole

I have installed WMS in my new 64bit laptop (4GB RAM, Dual Core) and it runs well so far.  A WMS Server instance has many properties that can be configured easily using the a very intuitive MMC, such as Authorization, Logging, Event Notification, Authentication, Cache/Proxy, Protocols and Limits.

WMS03WMS04

WMS05

Once you got familiar with the WMS MMC (dont forget to read WMS help file), you can start to create publishing point. WMS uses publishing point to translate client requests for content into physical path on the server hosting the content. After a client successfully connects to a publishing point, WMS manages the connection and stream the content. WMS includes two types of publishing points : On-Demand and Broadcast. Both types can be configured to deliver a stream from one of several types of sources, such as a file, a playlist, or a live stream from an encoder. One WMS instance can be configured to run multiple publishing points, hosting a combination of on-demand and broadcast contents.

On-Demand publishing point is best suited for scenarios in which you want users to be able to control playback of the content that is being streamed. This type of publishing point is most often used to host content sourced from files, playlists, or directories. When a client connects to the publishing point, the content starts at the beginning and the end-user can use the playback controls on a player to pause, fast-forward, rewind, skip between items in a playlist, or stop. An on-demand publishing point streams content only when a client is connected to receive the stream. Content streamed from an on-demand publishing point is always delivered as a unicast stream, which means that the server maintains a separate connection with each client.

Broadcast publishing point is best suited for scenarios in which you want to create an experience similar to viewing a television program—the content is controlled and streamed at the point of origin or the server. This type of publishing point is most often used to deliver live streams from encoders, remote servers, or other broadcast publishing points. When a client connects to a broadcast publishing point, the client is joining a broadcast that is already underway. For example, if a company-wide meeting is broadcast at 10:00 A.M., clients connecting at 10:18 A.M. have missed the first 18 minutes of the meeting. A client can start and stop the stream, but cannot pause, fast-forward, rewind, or skip.

Typically, a broadcast publishing point begins streaming when it is started and then continues until it is stopped or the content finishes. However, you can configure a broadcast publishing point to start and run automatically only if one or more clients are connected. By doing so, network and server resources are saved when no clients are connected. You can also configure a broadcast publishing point to start automatically when a WMS is started. You can deliver content from a broadcast publishing point as either a unicast or multicast stream.


To create a publishing point, just follow the wizard provided by WMS MMC. It is very easy to do and WMS also provides web based management for publishing point provisioning.

WMS

New Business - Hosting WMS

I hope if some folks from web hosters can read this post and think about new business for streaming media hosting using Microsoft SPLA (Service Provider License Agreement). In typical scenario, WMS can be separated from Web Servers and the web hoster can offer to customers streaming facilities of uploaded contents. Or in other scenario, web hosters can also provide File Server and live Encoder for live streaming or broadcasting like the last Olympic.

Scenario01 Scenario02

I will ask my partner-in-crime Mr. Kunto Baiquni to test it in hosting environment. In part 2 of this post, I will explain how you can manipulate media files using Expression Encoder and consume the WMS published content from Silverlight application. Just stay tuned!.

 

Hope this helps.

 

Ciao - RAM

Share this post: | | | |