Integration with Silverlight Streaming in LitwareHR

One feature demonstrated in LitwareHR is the ability to augment LitwareHR's capabilities by leveraging a "building block" service provided by a 3rd party.

In our fictitious scenario the ISV (Litware), neither wants to become an expert on media streaming, nor wants to incur in capital expenses of building a reliable, global content delivery network for media content, but they do want to enable "video resumes" in their application. This is where Silverlight Streaming (SLS) comes into play.

Fortunately, SLS exposes quite a rich API anyone can use to manage content from within another system.

In LitwareHR there’s 3 distinct use cases:

1- Association between a tenant and a SLS account. This is done at the tenant provisioning form. Notice that Litware itself doesn’t have SLS account, but it will manage it on behalf of a tenant. Each tenant is required to provision an SLS account beforehand:


2- Uploading a new video resume from a candidate. When a registered candidate to a tenant instance of LitwareHR submits a Resume, there are two steps that have to be completed:


The first call is almost the same we had in the previous version of LitwareHR. The second service call (AddVideoResume) is the one that uploads the video to LitwareHR and then to SLS.

This service is tagged as “OneWay” meaning that it will run asynchronously. This means that once the candidate’s submission of his/her/its resume is complete (and the page is rendered back to him/her/it), the content upload to SLS might not be done yet. We don’t want to lock the UI during a potential long process.

Also, those of you paying attention, will have noticed that the database contains 2 flags (isVideoAvailable, isVideoUploaded) to keep track of things and enable a more sophisticated retry mechanism to be built. The first flag is set when there’s a resume that it expected to have a video associated with it. The second is only set when the upload to SLS is complete. You could periodically query for (true,false) and retry the Upload. we haven't build this failure management system. That's an exercise to the reader.

All the interesting details of SLS interaction are in the LitwareHR.Recruiting.Services project. Check ProcessLogic.cs and SlsHelper.cs. You’ll see how we do the “content enrichment” by LitewareHR using watermarking.

3- Viewing the video. This is the easiest. LitwareHR simply embeds the SL app in the page. All the delivery happens out of band with respect to LitwareHR. More details in the ResumeDetails.aspx view form (notice the handling of the various video states: available, no video, etc)