quick navigator
Products
Technologies
Development Tools
DRG Home

 Pentium® II Processor
   Overview
   News
   App Notes
   Manuals
   Training
   Support Info.
 
 
 Intel MMX™ Technology
   Overview
   News
   App Notes
   Manuals
   Training
   Support Info.
 
 
 Hybrid Applications
   Overview
   Cookbooks
 
 
 Open Arcade
 Architecture
   Overview
   OAAF Charter
   Press Releases
   Product Showcase
   Publications
   Events
   Hardware Specs
   Members Only
 
 
 Development/Creation
 Tools
   Tools
 
 
 Software Showcase
   SW Showcase
 
 
 Other Links
   News/Events
 
Developer Home Contents Search Feedback Support Intel(r)
InfiniteCd
The InfiniteCD White Paper
ShopPBS: Case Study

[ next section | back to TOC ]

Line

ShopPBS Implementation

This section examines the implementation of shopPBS in terms of its components, with the goal of allowing readers to replicate the functionality of the application using the same (or similar) components and their own content and user interface. As mentioned previously, the user interface is highly dependent upon the content and is outside the scope of this paper.

5.1 Implementation Overview

ShopPBS is based on two products: Macromedia Director and Marimba Castanet. Director provides both the authoring tool for the user interface and the runtime environment for the application. Castanet provides the mechanism to deliver the content updates from the server to the client. The InfiniteCD component developed by Intel allows these two products to work together in a seamless fashion.

The shopPBS UI is a Director movie that displays the catalog content and provides a means for the user to navigate through the content. Through the use of two Director Xtras (InfiniteCD and WebXtra), the movie can interact with both the Castanet Transmitter and the PBS Web server. Upon start-up, the movie connects to the server, sends user profile information to the transmitter and receives any updated content. The user may then browse the catalog and select items for purchase (these actions all take place in the context of the Director movie). When the user decides to purchase merchandise, the movie connects to the Web server to handle the transaction.

As discussed in the architecture section, the shopPBS application consists of both client and server pieces. Subsequent sections discuss these main pieces.

5.1.1 User Profiles

The shopPBS application gets two types of file updates: general and profile based. A general update is a set of files sent to everyone who subscribed to the channel. The second type of update is a set of files sent to people with a certain user profile. For example, if there is going to be a new video for sale on the animals of California, these files might be sent only to users who indicated that they live in California and are interested in wildlife.

There are two steps to the process of user profiling. "Profiling" is the collection of information about a user (the user fills in a form about where they live and what they like); "filtering" is the process of determining what to do based on profile information. In the shopPBS application profiling and filtering are handled thusly. First, the user fills in the form in the Director movie with information about their preferences. Then the user requests an update. The movie uses the InfiniteCD Xtra to send an update request to the Castanet Transmitter. If the user has filled in the profile information, this update request will contain keys (or profile strings). The Transmitter will send the general update and will pass the profile strings to the Castanet plug-in. This Java* plug-in uses JDBC to talk to ODBC, which talks to the server side database. This database will have tables of files to add, rename and delete. The profile strings will determine which files from the add, rename or delete tables will be sent as an update by the plug-in. On the client side, adding, deleting and renaming is done by the Marimba UpdateNow SDK.

5.1.2 InfiniteCD Director Xtra

The Xtra that is part of the InfiniteCD Infrastructure is used by the Director movie to interface with the ActiveX controls. This Xtra enables the movie to request general and profile-specific updates of files for the shopPBS application, for information on using this Xtra, see Appendix C. For more information on Xtras, refer to Appendix A.

Two controls are currently part of the InfiniteCD component: an Update control and an Internet control. The Update control uses the Castanet UpdateNow SDK and sends the update requests to the Castanet Transmitter. The Internet control handles the process of connecting the user to their ISP. For more information on these controls see Appendix C; for more information on ActiveX controls in general, visit www.activex.com.

Both the Client application and the InfiniteCD application use the Update control. The shopPBS movie uses the Director Xtra of the InfiniteCD Infrastructure, which in turn uses the Update control to request updates. The Client application starts up at specified times, looks in the registry to see what channels the user is subscribed to, and then requests updates for them via the Update control.

5.1.3 Ordering Capabilities

There are several ways to order videos shown in the shopPBS application. PBS has phone banks and fax servers to receive orders from users who don't have Web access. The PBS Web page also enables users to order online via a secure SSL connection. The shopPBS application uses an Xtra that can create HTML forms and connects to the same Web server.

5.2 ShopPBS Client Implementation

The InfiniteCD application needs to be able to access multimedia content from the hard drive, the Web and the CD/DVD ROM. In the case of shopPBS, the use of search paths within Director allows the developer to easily and seamlessly retrieve assets from either the hard drive or the CD/DVD. The code sets up the search paths so that the pushed content on the hard drive is used before the same content on the CD.

    --the lowest priority gets set first. 
    -- set up the search paths for the multimedia assets. 
    set the searchPath = [ the moviePath ] 
    set the searchCurrentFolder to FALSE
    set the searchPath = [ ":\pbsdata" ] getdriveletter
    --adds marimba push data paths
    addAt the searchPath, 1, the moviePath & "pbsdemo\images" 
    addAt the searchPath, 1, the moviePath & "pbsdemo\text" 
    addAt the searchPath, 1, the moviePath & "pbsdemo\cas" 
    addAt the searchPath, 1, the moviePath & "pbsdemo\ort"
    

The InfiniteCD component sends events that can be used to determine the status of the updates. The following code defines handlers for these events (see Appendix C for further details). The actual handling of the events are dealt with later in this section.

    SetProgressPercentHandler("ProgressPercent")
    SetProgressStartHandler("ProgressStart")
    SetUpdateInstallingHandler("UpdateInstalling")
    SetUpdateDoneHandler("UpdateDone")
    SetUpdateErrorHandler("UpdateError")
    

Once the initialization is complete, the application can retrieve the latest content updates. To do so, the application must register itself, specify the particular Castanet Transmitter to use, and then request the update.

    -- register the application, note this code assumes
       no errors will occur and
    -- performs no error checking
       RegisterApp ("ShopPBSCD") 
    -- you must provide the actual IP address of the
       Castanet Transmitter server SetTransmitter ("255.0.0.1")
    -- Now we try to get the updates
    -- This time we include some rudimentary error checking
       put UpdateNow("ShopPBS", the moviePath,) into Result
    -- if UpdateNow returns a number less then 0 an error occurred
       if Result < 0 then set errMsg to getErrorMsg(Result) 

Once UpdateNow is called, the InfiniteCD Xtra will start returning events indicating progress and status. Now we need to supply the actual handlers for these events:

    on ProgressStart
    		-- Perform any required setup for progress indications
    		-- Show the user download is starting
    		
    		-- Assumes we've defined a user visible
    		   component "statusfield"
    		   put "0% complete" into Field "statusline"
    	end
    	on ProgressPercent percent
    		-- Show the user how download is progressing
    		put percent & "% complete" into Field "statusline"
    	end
    

The UpdateInstalling event signals that the data has been received from the transmitter into a temporary directory and the updates are about to be applied to the current content. During this time it may be prudent to prevent some user actions, therefore the developer may wish to put up a dialog box to "freeze" the UI.

    on UpdateInstalling
    		-- Inform user of what' going on and lock out input
    	end
    	on UpdateDone
    		-- Notify user download is complete
    		-- enable user input
    	end
    	on UpdateError errorstring
    		-- Some error has occurred during download, notify user
    		alert "update error: " & errorstring
    	end
    

Upon processing of the UpdateDone event, the application can display any of the content and the search paths setup in the examples above will ensure that the most recent content is seen.

There are a number of different data types which can be pushed. It is possible to push both new casts and new cast members to update the basic movie content. ShopPBS also pushes the selected tables of a relational database to update information such as pricing.

Developers should note that it is not possible to update the cast or the cast members of movies which are currently playing, as Director has those files open and Castanet will be unable to overwrite them.

5.2.1 Connecting to the Internet

There are two times when shopPBS connects to the servers, once when the application attempts to get updated content and again when the user purchases merchandise. The connection to the Internet can be accomplished simply by calling UpdateNow. If there is no existing TCP/IP connection to the Internet, Windowsâ will use Dial-Up Networking to create a connection; this may result in the user seeing dialog boxes asking them about connection preferences. A more seamless approach is to use the Xtra interface "Connect" to connect using either a particular dial-up server or the default server setup by the user in Control Panel.

To connect to the Internet the developer uses the Connect method

    -- 
    	if Connect "servername" = false then
    		--
    		-- use GetErrorMsg to determine what happened
    		-- notify user of connection failure
    		--
    	end if
    

When Connect is called the Xtra will start to fire events indicating connection progress and errors. The developer may handle these events (see examples above on event handling) if they wish to indicate progress to the user. Ultimately the Xtra will either fire a Connected or a ConnectError event. Once connected the code may call UpdateNow to update content. The Disconnect interface may be used to drop the connection created with the Connect call.

5.2.2 Connection to the Web Server

The shopPBS application connects to the secure PBS Web server to perform order processing. This connection is handled by the Director Xtra WebXtra. WebXtra sends the HTML order form to the server using a post operation over a secure SSL connection.

5.3 ShopPBS Server Implementation

The server side of the shopPBS application is composed of two components: the Marimba Castanet based push server and a Web server.

5.3.1 ShopPBS Push Server

Marimba Castanet Transmitter and Publisher

When the shopPBS client application decides to update the files or the client application performs a scheduled update, a request for update is sent to the push server. Upon receiving an update request, the Transmitter sends the client all the files in the channel that have been modified since the client last requested an update. As shown in the above diagram, the Transmitter (added by the plug-in) may send different sets of files to different users.

It is the function of the Marimba Publisher to tell the Transmitter what files to send on a given channel.

InfiniteCD Castanet Plug-in

The shopPBS Castanet plug-in performs the function of creating customized updates from user profile information. The plug-in does not actually know the format of the user profile information; it simply uses the profile string received from the client (see the UpdateNow method in Appendix C) to query an ODBC-compliant database and passes the results of the database query to the Castanet Transmitter (using the Castanet AddFiles API). It is up to the InfiniteCD application developer to: 1) collect the appropriate user profile information on the client, 2) format the data correctly in the UpdateNow method call, and 3) create the "content provider database" in such a fashion that the user profile string-based query results in the appropriate file list for the Transmitter.

5.3.2 ShopPBS Web Server

The purchase of merchandise from the shopPBS application is handled by the PBS secure Web server. The server handles the processing of the order sent as an HTML form over a secure connection using the HTTPS protocol. Since each InfiniteCD application places different requirements on the server, it is outside the scope of this paper to discuss further implementation details.


Download a Adobe Acrobat* version of the InfiniteCD Whitepaper

Back to Macromedia Users' Conference Overview

Last update: 13 October 97


* Legal Information © 1998 Intel Corporation