Visit our Web site to learn more about RealNetworks' G2 System

Developing Streaming Media Solutions for RealSystem G2 with Microsoft's® Site Server


Introduction

This white paper is aimed at anyone:

This paper is organized in the following sections:

An Overview of Site Server

With its release of Site Server, Microsoft delivered a comprehensive suite of tools that enables the Web developer to design and implement powerful and cost effective Web solutions. As part of the Back Office Suite of server applications, Site Server takes advantage of Microsoft's Windows NT Server 4.0 and Microsoft's Internet Information Server 4.0 to deliver highly scalable, easily managed dynamic Web content. This integration of Site Server with Internet Information Server 4.0 and other Back Office products brings the Web developer a broad set of tools to design and implement sophisticated Internet and intranet applications. A rich feature set includes tools that ease application development, membership, content deployment, commerce, ad serving, and analysis. These tools alone distinguish Site Server as a leading Internet and intranet platform, but when linked with the Back Office Suite of server applications, they combine to provide a powerful platform to easily develop Web applications while leveraging existing computing resources and databases.

Applications built on Site Server are becoming commonplace as corporate intranet developers and Internet developers utilize this powerful set of tools to build their applications. These tools most notably:

The marriage of these tools has enabled developers to build integrated solutions that address specific business needs, from dedicated intranets focused on the human resource needs of medium and large corporations, to commerce solutions for a wide range of retailers. These applications have grown well beyond the early character-based reference applications, to rich multimedia-based interactive experiences. These interactive experiences are now comprised of rich media assets, such as high fidelity stereo music, streaming video and presentations that use innovative developments such as the time-based Synchronized Multimedia Integration Language (SMIL).

As Web content has made a rapid transformation from simple text files, to a mix of simple low-resolution graphics and text and now to rich media experiences, streaming media servers from Real Networks have consistently delivered the tools to developers to easily facilitate this change. In fact, some of the most exciting opportunities for rich interactive experiences delivered via an Internet or intranet environment derive from the linking of Microsoft's Site Server with the RealSystem G2 RealServer.

RealSystem G2 Server leads all other streaming media servers in its support of more industry standards than any other server, with support for the Real Time Streaming Protocol (RTSP) and SMIL. Real System G2 also includes native support for most existing media file formats including RA, RAV, ASF, AVI, JPEG, MPEG, VIV, SWF, AIFF, SN, and WAV.

RealSystem G2 players and servers are built on an extensible, dynamically updateable media delivery architecture, which allows new media formats to be built and streamed from server to player without requiring either users to download new players or Web sites to install new servers. Third-party data types like MIDI, VRML, and Flash animation can now be combined seamlessly into multimedia presentations that can scale from dialup to broadband connections.

Intranet Solutions

Corporate intranets can take advantage of Site Server's personalization and membership capabilities to dynamically deliver content based on individual requirements. End users, when identified individually by their job function or other grouping, can have their corporate intranet content dynamically delivered to them based on their individual needs. Now, employees in a particular department will have access to content that directly addresses their needs without wasting extensive time trying to locate the piece of content they want.

For example, on the shop floor of a major manufacturer, workers have access to the corporate intranet to refresh their knowledge on a particular assembly process by searching the technical archives. These technical archives provide direct access to the assembly manuals and other documentation for use in their designated job. The archives combine textual instructions with actual pictures of the components to be assembled, providing the assembly worker with a basic knowledge of the process to be performed.

With the advent of RealSystem G2 streaming media servers, video can further display the actual process as it is performed. Including video into the training process further guarantees an assembly process with reduced error rates.

Eliminating printed documentation means that the company technical archives can be better maintained, with no need for version control, while assembly workers have a single resource to consult without wasting energy on searching for information.

As this corporate intranet grows, personalization and membership allow groups as well as individuals to gain access to corporate information beyond training resources. Company policies, mission statements, and executive presentations can be archived as rich media video presentations with the opportunity for employees to not only read the information to be presented, but also experience the presentation as it was intended. This eliminates the need for expensive dedicated video conferencing equipment, as employees hear important company messages at a time that best suits their work schedules, without causing reductions in productivity. Streaming media can be delivered either in a multicast format (a broadcast format where many viewers see the same video stream) or archived for group or individual playback.

RealSystem G2's extensive support of multiple file formats assures a high level of utilization without repurposing existing media assets, and its support of the RTSP protocol and SMIL programming provides long term viability. RealSystem G2 is proving to be the streaming server of choice in a Site Server environment.

You can install RealSystem G2 in a Site Server environment by utilizing the server installation software included in the distribution software. Although neither RealSystem G2 nor Site Server require any special installation settings for the two servers to operate together correctly, careful planning of the server environment is important to guarantee acceptable performance.

Developing an understanding of the intranet's or Internet's goals and mission is crucial to successful server architecture. By paying close attention to the number of expected users, the amount of content to be published, and type of media to be delivered, you can configure a system that addresses potential network problems. Also, careful attention to the documentation that ships with these server products will help you design a reliable server platform.

System Requirements

Site Server relies on a number of different processes for it to run efficiently. A system running a full implementation of Site Server will have the following products installed:

System

Site Server

Studying user access patterns will further assist you in the determination. For example, in a prototypical Web server environment, you may see a Web usage report that states that you have 300,000 user connections in a given week's time. Although this statistic is somewhat meaningful, it falls short of providing a benchmark that you could rely upon to build a server implementation.

This is because on a corporate intranet, the measure of a week is compressed from the normal 24 hours a day, seven days a week, to the business operation hours of eight hours a day, five days a week. A week where statistics show 300,000 user visits actually is a more compressed time period. What looked initially as 1,785 user visits per hour, becomes 7,500 user visits per hour in an intranet environment.

Although the hardware requirements for Site Server list at a minimum 100mhz Pentium Processor equipped with 64 MB of random access memory computer, or 96 MB if also running SQL Server, it becomes quickly apparent that a system of this configuration is not suitable in a production environment. A highly utilized Site Server installation should consider a multi-server configuration with careful attention to what services run on a particular server.

For example, although Site Server can be installed on a Primary Domain Controller, a highly utilized Site Server installation can detrimentally affect the internal company network if a large number of authentication requests are generated. However, with careful planning of the server environment, and measurement of the amount and type of content to be delivered, you can create a robust and reliable Site Server/RealSystem G2 configuration.

Site Server Operation

The basic mechanism underlying personalization is the creation of rules and rule sets that define the dynamic content associated with the Web page, based on profile information stored in the Active User Object (AUO). These dynamic content areas on a Web page are referred to as personalization sections. A rule is basically a logical statement that enables the personalized content to be generated on the Web page. Here is an example:

When
GROUP equals ENGINE ASSEMBLY
Select Content where CATEGORY
	Is exactly equal to TECH ENGINE

When BUILDING equals SEATTLE ENG
Select Content where CATEGORY
	Is exactly equal to WELCOME SEA VIDEO
When TODAY equals EMP BIRTHDAY
Select Content where NAME
	Is exactly equal to HAPPY BIRTHDAY SONG

A dynamically created Web page would be created by the insertion of content that relates to the TECH ENGINE CATEGORYinto the template chosen, perhaps starting a streaming video presentation, or simply playing "Happy Birthday". Although these simple rules can be effective in the creation of a very basic Web page, they fall well short of providing content that provides much personalization. Only with the inclusion of rule sets--multiple rules that are executed in a hierarchical manner--can Web content reach the level of personalization required. These rules and rule sets, when combined with the user profile information stored in the AUO, allow easy dynamic content creation based on the content's categorization.

Content sources are categorized in a number of ways. The most common of these is the inclusion of attribute values in ODBC databases that define dynamic content. Since most dynamic content is generated from text or hyperlinks stored in a database, it is a natural extension to also store information about the categorization of that content in the same database. Database entries are best for high performance with small content pieces such as smaller text strings or hyperlinks, a method best suited to generate hyperlinks to RealSystem streaming media.

Due to the nature of rich media, it is not a good idea to store the actual media files within a database. Although many databases do allow the storage of large binary objects, the performance penalties you pay upon retrieval of those media assets, and the inefficiency of their storage, make this strategy not worth implementing.

Beyond the storage of categories in databases, Microsoft Index Server is also effective in generating a site wide resource for search and content categorization. By allowing file level categorization of Web content, archived streaming media files can be readily indexed and easily searched.

Site Server Publishing and Content Management

Site Server addresses content management with the creation and management of the content store. This content store is the base point for all the content to be hosted by the site, and may include text, white papers, news, streaming media, policies and other documents. Each content type corresponds with a subdirectory of the same name that is created by the Site Server administration tools in the content store. Content property pages are automatically generated and easily modified to both facilitate the categorization of content and to specify the URLs and tags necessary to view this content.

Site Server publishing management

You can easily create a content type for Real System streaming media using the publishing tools built within Site Server.

Creating Content Types

Adding RealSystem streaming media types

Content Management can generate properties and view pages that correspond with the content type that was generated. These pages are created in the content store and are easily modified to generate the necessary URL to activate RealSystem G2 streaming media server.

Content Deployment

Content Deployment stages and deploys Web pages and other file-based information between directories, among local servers, or across geographically remote, secured networks to multiple destination servers. Content Deployment servers deploy and retrieve content as instructed in their project and route definitions. Site Server can deploy any Web content, including RealSystem streaming media contained in the content store either locally or remotely.

Caution: Prior to an upgrade from Site Server 2.0 to Site Server 3.0, make a complete backup of your Web content and databases. Any database content that was being stored in a Site Server 2.0 content deployment directory may be removed during an upgrade to version 3.0 of Site Server.

Usage Analysis

The analysis tools built into Site Server are all based on queries of a global database of logs, content and user data that have been imported into either Access or SQL Server. By design, Site Server can analyze data from Users, Log Files, Ad Rotator files and the content itself to generate usage reports that address the needs of system administrators. Since log data is imported into a database of known design, it is possible to upload RealSystem G2 log files and perform custom analysis.

Real Server Log File Usage

RealServer can also create reports of historical data. It tracks information in the access and error log about files that have been served and errors that have occurred. File data includes which clips were streamed by RealServer, RealSystem Administrator files that have been accessed, and whether the clip was sent successfully. RealServer log files can be rolled over on a size, hourly, daily, weekly, or monthly basis.

Log file rolling enables you to limit the size of the log files, which would otherwise grow indefinitely. The RealServer Administration Guide has detailed reporting instructions, and is available online at http://service.real.com/help/library/servers.html

Internet Solutions

A powerful add-in component to Site Server is a fully featured commerce server that enables the same close integration of the BackOffice family into commerce-enabled Web sites. Additionally, Commerce Server closely supports Microsoft's Transaction Server, which controls transactional commit and rollback, an integral part of any transaction-based application. These important features, along with site building wizards, allow for the easy creation of commerce-enabled Web sites while maintaining links to existing company databases.

Example: An Internet Music Shop

With the integration of Site Server and RealSystem G2, guests to a major online music shop can browse a collection of music CDs as well as listen to selected songs. Rather than just showing a graphic of the CD cover, guests to this Web store can browse its extensive music archives, and make purchases after hearing their music selections. Additionally, by careful categorization, the Web shopper can be directed to other artists and albums that are of the same style of music or written by the same artist.

RealSystem G2 integrates well into a Commerce Server store with links to streaming media assets that can be easily stored in the inventory database. Not only can hyperlinks to album and CD cover graphics be stored, but streaming audio sound tracks and streaming music videos can be delivered as well.

You can easily implement streaming media on the product display pages by altering the product.asp script in the Web store to provide access to the streaming media asset. Similar to the display of the product image, this page can be altered to generate the URL necessary to start the streaming media.

<% if not IsNull(media_file) then % >
<a href="<%= "/" & siteRoot %> /assets/streaming_media/ 
	<%= mscsPage.HTMLEncode(streaming_file) %>"
<% else %>
Streaming media is not available for this selection
<% end if %>

The code fragment above will generate an HTML hyperlink to the rich media stored in the content store. This hyperlink could represent a link to a particular track on the CD, or contain a link to a streaming music video.

Streaming Media for Sale

Although the linking of rich media with a product can greatly increase sales of that item, Site Server and RealSystem G2 can also be used together to sell sensitive information, audio archives, or distance learning applications.

Investors, looking for an edge, have long seen the benefit of pay-per-view access to investment information, company statistics, and competitive analysis in a controlled environment. This timely information can be both difficult to obtain and costly to individually analyze. With the coupling of Site Server and RealSystem G2, the pay-per-view investor site need not just contain mounds of statistics, but additionally include archived venture capital presentations, company executive presentations or simply a video of company facilities.

Historically, the print media has effectively maximized its archives by selling past reports and stories, and now electronic radio and television media archives are becoming available for sale.

The drive toward "Anytime Anywhere Learning" is not being driven by classroom instruction but rather by the increased usage of distance learning. With travel costs quickly outpacing the already pressured budgets of corporate training departments, classroom instruction is leaving the physical classroom and continuous education online is entering our daily routine. Today, classes can be delivered at a pace best suited to the student, both to minimize the impact on productivity and to maximize the individual student's capacity to learn.

Integrating RealSystem G2 into Commerce Server

You can implement RealSystem G2 in a Commerce Server environment by utilizing the server installation software included in the distribution. Although neither Commerce Server nor RealSystem G2 require any special installation settings for the two servers to operate correctly, you should carefully plan the server environment to guarantee acceptable performance. Careful attention to the documentation that ships with these server products will help you design a reliable server platform.

RealSystem G2 streaming content hyperlinks are easily stored in the inventory databases by either creating storage for them in the site builder wizard or by directly altering the database's schema. The alterations should include information about the location of the streaming media asset as well as relevant information about its categorization. Once the database is altered, modify the product display pages to query the database for the existence of the hyperlink and display it if necessary. This link should enable the playback of the streaming media asset, as well as provide the basis for categorization.

Commerce Server sites are based on an implementation of Microsoft's Transaction Server. This server enables transaction-based order processing, which allows for an order to be rolled back (reversed) if any part of the process fails. For example, the order process may include a number of steps that if individually failed, should not allow an order to complete.

In a hypothetical situation, an online order to Joe's Flower Shop will include steps that store customer information, process credit card verifications, save the customer receipt, send an email thank-you, and adjust Joe's inventory. These steps together define the process that Joe uses to conduct his order process. If any single step along the process fails, Joe may have incomplete or erroneous data. Transaction Server allows for the grouping of these individual steps into a process known as a transaction, and manages the completion status of each step. If any step fails along the process known as the processing pipeline, Transaction Server can reverse the steps already completed.

Understanding the pipeline-based architecture of Commerce Server will ease your streaming media implementation, as well as enable you to protect your important media from fraud. In a Site Server-generated store, a number of processing pipelines may have been created to achieve a particular purpose.

Implementation strategies for the sale of streaming media can be addressed in a number of ways within the Commerce Server environment. Media assets, such as streaming video, do not lend themselves well to an environment where phased commits or rollback capabilities are important. Usually, the commerce component's role is to verify the transaction has completed, whether a credit card charge has been pre-authorized, and to allow for controlled access to the streaming media asset. If access to streaming media has been granted to the end user, there is really nothing to rollback if another part of the transaction has failed.

For example, if the last step in Joe's order process is to save the receipt in a database, and the database is unavailable, the transaction fails and all previously completed processes will be rolled back. If, in the step prior to saving the receipt, Joe had sent the user a hyperlink to my streaming media, there is no way to roll that hyperlink back. Joe has lost control of that part of the transaction. Thus, it is important to set tags or conditions that you can query to verify a valid order.

If you know that your credit card processing component reports its status in a variable called "card_bill_result_code", it is very simple to test that variable to confirm that we have been able to verify the charge transaction. Likewise, we can verify that the database has been updated and then deliver our streaming media content.

Secure Delivery of Streaming Media Content

There are two strategies for the delivery of streaming media from inside the order-processing pipeline. The first strategy is to use a built-in Commerce Server pipeline component, known as Scriptor, to generate the streaming media URL. Scriptor allows for the addition of a scripting language, such as VBScript or Jscript, inside of the order-processing pipeline. These scripts can query the database, check the status of order processing variables, set cookies, and generate the URL to the end user for subsequent download. This method, although simple, does expose the location of your files to the Web user. By generating a physical URL to your streaming content, you expose the balance of your content to fraud and theft.

The second strategy uses Scriptor but instead of generating an URL, it uses a Binary Read object within Site Server to send the streaming content without exposing its location. The following script is processed on the server, where the only content sent to the user's browser is the MIME type of the content and the file itself. Rather then exposing where your content is stored, you just send the file.

<%@ LANGUAGE = VBScript %>
<% Set oFile = Server.CreateObject("Commerce.AdminFiles") 
      ' use physical path 
bFileContents = oFile.ReadFromBinaryFile("c:\temp\welcome.ra")    Response.ContentType = "x-pn-realaudio"
Response.BinaryWrite bFileContents
%>

Our commerce implementation to this point has focused on the inclusion of streaming media within the order-processing pipeline. Although the order-processing pipeline does allow for significant benefits in regards to phased order commits and rollback capabilities, the delivery of streaming media itself does not benefit from these transaction features. The streaming media content provider is most interested in whether the transaction completed and whether payment has occurred in order to protect access to the content store. Rather than attempt to control the distribution of streaming media in the order processing pipeline, it is also possible to use the Active Server Pages scripts that run the store to control access to the streaming media.

A wizard-generated store foundation uses several Active Server Pages to control execution of the order process. These server-side scripts control the collection of shopper information, present data entry forms, display product information, calculate order totals, and collect important charge card information. They also control the order process by making calls to the order processing pipelines and managing the results from those transactions.

The order process, or purchase pipeline, is controlled from a script called xt_orderform_purchase.asp. This script provides the functionality that calls all of the pipelines, first to verify the shopper information (plan pipeline), then to verify the inventory information (product pipeline) and if all completed well, then to call the order processing pipeline (purchase pipeline) to complete the order. Since the purchase pipeline will not process unless both the plan and product pipelines have successfully completed, it is after completion of the purchase pipeline that we can then manage the delivery of streaming media.

errorLevel = UtilRunPipe("plan.pcf", mscsOrderForm, mscsPipeContext)
	REM -- Finally if no errors, run the actual purchase
	REM -- Create a transacted pipeline for this execution
if mscsOrderForm.[_Basket_Errors].Count = 0 and mscsOrderForm.[_Purchase_Errors].Count = 0 and errorLevel = 1 then

REM Create the receipt storage Set mscsReceiptStorage = UtilGetReceiptStorage()
REM Add the receipt storage into the pipe context... REM the Save Receipt component uses it Set mscsPipeContext.ReceiptStorage = MSCSReceiptStorage
REM Run the transacted pipe errorLevel = UtilRunTxPipe("purchase.pcf", mscsOrderForm, mscsPipeContext) end if
if mscsOrderForm.[_Basket_Errors].Count > 0 then REM -- goto basket to show errors Response.redirect "basket.asp?" & mscsPage.URLShopperArgs() Response.End end if
if mscsOrderForm.[_Purchase_Errors].Count > 0 or errorLevel > 1 then if mscsOrderForm.[_Purchase_Errors].Count > 0 then for each errorStr in mscsOrderForm.[_Purchase_Errors] errorList.Add(errorStr) next else errorList.Add("Unable to complete purchase at this time") end if OrderFormPurchase = null exit function end if
REM If we have gotten this far, then all appears fine with this order. REM Let's send the streaming content.
Set oFile = Server.CreateObject("Commerce.AdminFiles") ' use physical path bFileContents = oFile.ReadFromBinaryFile("c:\temp\welcome.ra") Response.ContentType = "image/pjpeg" Response.BinaryWrite bFileContents %>

Reading through this code fragment, we can see that we check for error conditions in a number of places. First, we call the "plan" pipeline component that may assign shipping costs, handling costs or complete promotional pricing information. After we verify that the plan completed successfully, we continue by executing the purchase pipeline. Based on the returned values from the purchase plan, we can verify whether in fact the plan completed successfully. If the plan failed, then we can trap that condition and send the user to the shopping basket scripts, display error messages, or if all went well, continue processing and generate either a less secure URL for download, or use the Binary file component to just send the data.

Summary

The integration of RealSystem G2 with Microsoft Site Server creates a powerful platform for system developers to create robust Internet and intranet applications. With the linking of these two industry-leading systems, developers can easily create sophisticated solutions that take full advantage of the publishing and membership capabilities for Site Server, while at the same time, publishing streaming media on RealSystem G2, the most powerful next generation media delivery system available today.

RealSystem G2 introduces a powerful, extensible server to the streaming media market, including:

With RealSystem G2, RealNetworks is offering first time users through sophisticated Web developers a complete set of streaming media content creation tools and support for compelling new capabilities, such as SMIL. Key additions include the tool offerings from Vivo Software (the company RealNetworks acquired in February 1998) which extend the reach of RealSystem G2. RealNetworks content creation tools include:

RealSystem G2 includes improved versions of existing RealSystem 5.0 data types, RealAudio, RealVideo, and RealFlash, and adds two new important data types, RealPix and RealText. The addition of RealPix and RealText promise to extend the reach of streaming media to new audiences and new sources of content. In addition, RealSystem G2 now supports legacy non-streaming formats and many new existing streaming third party data types.

RealSystem G2 provides the most powerful, next generation, media delivery system, creating the richest streaming multimedia experience on the Internet and corporate intranets today.

For more information

To learn more about the RealSystem G2 complete Commerce Solution and how it can solve your needs for a more secure streaming media system, visit our RealNetworks Web site at www.real.com, or contact us directly at (800) 444-8011.

RealSystem and the Commerce Solution are easy to set up on your own, but if you want to work with the experts, our RealNetworks Consulting Group can show you the ropes. You'll find the Consulting Group Web site at www.real.com/consulting.


Copyright © 1998 RealNetworks, Inc.