RealNetworks corporate logo

Developing for the RealSystem iQ Server 8 Web-based Management Application, the RealSystem Administrator

Table of Contents:

Introduction

Server 8 Configuration File

Server 8 Registry

The Adminfs Plug-in

Special URLs

Customizing RealSystem Administrator

Appendix A – The Sandbox Approach: Adding A Second RealSystem Administrator Directory for Development

Appendix B - Additional Resources for RealSystem Administrator Developers

Glossary

Introduction

This white paper provides the scripting details of RealSystem Administrator, the Web-based management application for Server 8 (as well as the previous versions of RealServer G2 and RealServer 7.0.) It is targeted at developers interested in extending the Administrator to manage their custom plug-ins, and assumes a solid understanding of HTML and JavaScript.

The first section of this white paper introduces the key architectural components of Server 8 and its RealSystem Administrator, including the configuration file and server registry. The second section details the functionality provided by the Administrator file system plug-in (referred to as the adminfs plug-in) for setting and retrieving configuration data from the server registry. In closing, Appendix A demonstrates a sample extension of the RealSystem Administrator, while Appendix B collates additional developer resources.

Server 8 Architecture

Server 8 was designed on an architecture that allows greater extensibility and interoperability with third-party solutions. This extensibility is possible by using a COM-based plug-in architecture. Using the RealSystem Software Development Kit (SDK), a developer can create custom Server 8 plug-ins for monitoring, logging, filtering, and extending the server. Managing custom plug-ins is easy, due to the extensible nature of the Server 8 configuration file and registry, and the server-side scripting capabilities provided by the adminfs plug-in.

The following diagram outlines the communication flow among Server 8 and RealSystem Administrator components:

System overview

Server 8 Configuration File

The Server 8 configuration file is an XML-based file which defines all of the server's operating parameters, such as mount point locations, ports, directories, and other properties. The default configuration file (rmserver.cfg) is installed in the RealServer directory. At start up, Server 8 loads the configuration file into the server registry, where its properties become available to the server, plug-ins, and the RealSystem Administrator Web application. Changes made through the Administrator are then written to this configuration file.

The excerpt below illustrates the hierarchical nature of the configuration file, as well as the fact that developers are free to add their own sections to the configuration file for use by their custom plug-ins. Any customizations to the configuration file are automatically reflected in the Server 8 registry, after restarting the server. The configuration file's syntax and contents are described fully in the Server Administration Guide, published at http://service.real.com/help/library/guides/server8/realsrvr.htm.

<!--            M Y   C O N F I G   S E C T I O N          -->
<!--            ---------------------------------          -->
<List Name="MyPropertyList">
  <Var Protocol="TCP"/>
  	<Var Timeout="30"/>
</List>

Server 8 Registry

The server's registry is a hierarchical structure of lists of name/value pairs (properties), capable of storing string, buffer, and integer data types. Properties are organized into lists and sub-lists. Each list in the registry acts like a private name-space, meaning that while property and list names must be unique within a list, you can reuse them in other lists.

hierarchical XML

At runtime, this registry contains configuration information, Server statistics, and system status. RealSystem Administrator Web pages have read-only access to the registry via special server-side Javascript functions and HTML tags. Data that you type into the Web page fields can be transmitted on-the-fly via special URLs, recognized by the adminfs plug-in, to modify the server registry and/or configuration file. "On-the-fly" means the changes are written instantaneously, as the Server 8 is running. There is no need to restart Server 8.

Registry Path Syntax

Registry lists and properties are identified by property paths, with the "." character used as the path separator between sub-lists. Using the example above in the My Config Section, you would specify the Protocolproperty in the MyPropertyList using this notation:

MyPropertyList.Protocol

This path notation applies to the SDK's registry, to the JavaScript extensions supported by the adminfs plug-in, and when using the special Administrator URLs. Note that the use of the "." as a path separator excludes the use of the "." character in list names, and that list and property names are case-sensitive.

Main Registry Lists

The server registry is partitioned into several major sub-lists, detailed in the table below. Conceptually, it is important to understand that the server registry is not related to the Windows system registry---it is specific to Server 8.

config The configuration file properties are stored here.

Example: "config.PNAPort"

configdefaults Default configuration property values used in the absence of the property in the configuration file.

Example: "configdefaults.PNAPort"

license Reflects the contents of the valid license files found in the server's license directory.

Example: "license.License0.General.ClientConnections"

headers

Reflects the HTTP headers of the currently executing Administrator page.

Example: "headers.User-Agent"

server

Reflects various system status information.

Example: "server.version"

The Registry Viewer

Server 8 has a useful tool called the registry viewer. This tool allows you to search your machine's registry to find particular data types. You can access the viewer with this URL: http://yourserver:adminport/admin/regview.html.

Registry viewer

The adminfs Plug-in

adminfs stands for the Administration File System plug-in. This plug-in (named admi3260.dll on a Windows system, adminfs.so.6.0 on UNIX) is used by Server 8 to fulfill requests for URLs using the /admin/ mount point and admin port. The Adminfs plug-in executes server-side JavaScript and other special tags in each page it serves. This plug-in also responds to several virtual URLs that allow the client to:

Server-Side JavaScript

The adminfs plug-in hosts a JavaScript runtime engine, based on Netscape's version 1.4 of the core Javascript language. Netscape’s Server-Side JavaScript extensions are not supported in adminfs, but adminfs adds its own extensions to access the Server 8 registry, and to send output to the HTTP client. These functions are detailed below.

The <SERVER> Tag and RMAOutput

To run JavaScript on Server 8, enclose script statements in <SERVER language="JavaScript"></SERVER> tags. Note that the adminfs plug-in requires that the "language" attribute in the <SERVER> tag be all lower case, as in the example above. This applies to RealServer version 7.0 and earlier. To emit output to the HTTP client, adminfs provides a function called RMAOutput(). The link below leads to a demonstration of a page with a simple example of server-side scripting, adminfs-style.

A Simple Server-Side Javascript Example

Server-Side JavaScript Error Handling

If an error is encountered in server-side Javascript (due to syntax or run-time) the error message will be inserted into the HTML document in the form of an HTML comment. Use your browser's "View Source" function to view the error message. If your page doesn’t look or function properly, always check the source code for server-side errors. Also, keep in mind that if your client-side script depends on your server-side script, then the browser may display client-side errors when the actual mistake is in the server-side script. When in doubt, always use your browser's "View Source" function to troubleshoot.

Sample with intentional server-side JavaScript Error
Sample View Source of error message

RMA JavaScript Extensions

In addition to the RMAOutput function mentioned above, the adminfs plug-in provides a set of functions for accessing the Server 8 registry. The table below is a complete list of the server-side JavaScript functions that adminfs exports:

RMAOutput( s )
Sends parameters to the client (inserts it into the current HTTP output).

Analogous to the write() function in Netscape's server-side extensions, or the ASP (Active Server Pages) Response.write() method in Internet Information Server.

Example:

RMAOutput( "Hello World" );

RMAGetFirstProperty(listPath)

Returns (from the Registry) the complete property path of the first property of the list represented by the listPath parameter. Returns null if the list is empty, missing, or is a property and not a list. Use with RMAGetNextProperty() to enumerate the contents of a list demonstrated below). Warning: All calls to RMAGetFirstProperty and RMAGetNextProperty share a global list enumerator, so use with caution.

Example:

RMAGetFirstProperty("config.MyPropertyList")

returns "config.MyPropertyList.Protocol"

RMAGetNextProperty()

Returns the complete property path of the next property of the list specified in the last call to RMAGetFirstProperty(). Returns null if the end of the list has been reached, or if the previous call to RMAGetFirstProperty() returned null.

Example:

RMAGetNextProperty()

returns "config.MyPropertyList.Timeout"

RMAGetNthProperty( listPath, listIndex );

Returns the complete property path of the nth property of the listPath list. Returns null if the list or list item does not exist. This function is more useful for enumeration in library code, since it does not use a global enumerator.

RMAGetPropertyValue( propPath )

Returns the value of the property propPath. Returns null if the property does not exist, or if propPath is a list and not a property.

Example:

RMAGetPropertyValue("config.MyPropertyList.Protocol")

returns "TCP"

The following examples demonstrate the use of the RMA registry functions. Click on descriptive links to see the actual source code.

Server-side JavaScript Examples

Special Server-Side Tags

The adminfs plug-in recognizes five special tags that perform server-side actions. One tag provides the ability to include another file into the current file; the others provide 'syntactic short cuts' for inserting registry property values into the client-bound HTML. These tags are detailed and demonstrated below.

The Include Tag

<!--#INCLUDE file="file name" -->

Use this tag to include another file within the current file. Be careful not to do a recursive include, as this could cause RealServer to crash. This tag is useful for including boilerplate html and/or server-side script libraries in your pages. You must specify the relative path of the included file from the current mount point, regardless of the location of the including file.

Example:

The admin mount point base path is C:\RealServer\RealAdministrator.
Your custom page C:\RealServer\RealAdministrator\custom\mypage.html
includes the file C:\RealServer\RealAdministrator\custom\include\include.html.
The include tag would be <!—INCLUDE file="custom\include\include.html" -->.

As noted earlier, if the adminfs plug-in encounters an error executing the include tag, an error message is inserted into the HTML file sent to the client, in the form of an HTML comment.

Include tag example

The Property Value Tags

<!--$(registry property path)-->

Before sending the page to the client, adminfs replaces this tag with the value of the quoted registry property.

Example:

<!--$(server.ClientCount)-->

The previous property tag is functionally equivalent to the following server-side JavaScript:

<SERVER language="Javascript">RMAOutput(RMAGetPropertyValue("server.ClientCount"));</SERVER>

<!--#(registry property path)-->

adminfs inserts the value of the quoted registry property in the HTML output. The property tag remains as an HTML comment. Note: do not use this tag inside a client-side <SCRIPT> tag, as the HTML comment will cause a syntax error.

<!--^(registry property name)-->

Like the <!--$()--> tag, this tag is replaced by the value of the quoted registry property. In addition, any embedded backslashes found in the property value are escaped. This is useful for initializing client-side Javascript variables.

Example:

<SCRIPT>

// example use of escape tag
var logPath = "<!--^(config.LogPath)-->";

</SCRIPT>

This causes the logPath variable to be initialized as
"C:\\Program Files\\Real\\RealServer\\Logs\\rmaccess.log"
(on a Windows NT Server 8, using the default installation directory). If the backslashes had not been escaped, they would have been interpreted as escape characters themselves.

<!--%(registry property name)-->

Like the <!--#()--> tag, this tag inserts the property value into the HTTP output and leaves the tag as an HTML comment. As with the <!--^()--> tag, the value is backslash-escaped. Warning: do not use this tag inside a client-side <SCRIPT> tag, as the HTML comment will cause a syntax error.

This script example demonstrates the use of the property tags.

HTTP Headers

Another important source of run-time information for server-side scripts are the "server", "headers", and "parameters" registry lists. The headers list reflects the HTTP headers that are sent by the client. Each header is represented by a property in the list of the same name. For example, "headers.Accept", "headers.Cookie", "headers.User-Agent", and so on. The script example for the RMAGetFirst/Next functions demonstrates how to enumerate the headers list.

The parameters list provides convenient access to query string parameters – each name/value pair is represented by a property in the parameters list.

Example:

When the page "query_string.html" is requested via the following URL:

http://server:admin_port/admin/query_string.html?color=blue&size=large,

the parameters list will look like this (only while this URL is executing, i.e. the headers and parameters lists reflect only the current URL being processed.)

parameters.color = "blue"
parameters.size  = "large"

Modifying the Registry via Special URLs

Since the adminfs plug-in doesn’t support typical CGI functionality through server-side script, changes to the Server 8 configuration file or running state must be accomplished through the use of special 'virtual' URLs. These URLs do not correspond to actual files under the /admin/ mountpoint, but are recognized and handled internally by adminfs. Configuration changes are specified using the query string portion of these URLs, which are discussed in detail below.

The Configuration URLs

servvar.set.html

This URL modifies both the server registry and the configuration file. Use this URL only for properties that can be modified without a Server restart. If a property can't be modified on-the-fly, an error is generated. Consult with the plug-in developer to determine whether its properties can be changed on-the-fly. If a Server restart is necessary to effect a property change, use the configvar.set.html URL, explained below.

configvar.set.html

This URL modifies only the configuration file. A server restart is required to effect the change(s).

Using the Special URLs

Using the list notation described above, lists and properties can be added or deleted, and property values can be modified.

Examples of Query Strings in Action

?config.RTSPPort=4400 Sets the value of configuration property RTSPPort to 4400. The property is created if it did not already exist.
?config.MyList.MyProp=SomeValue Sets the value of configuration property MyProp in the list 'MyList' to 'SomeValue'. Both the list and property are created if they did not already exist.
?config.MyList.MyProp= The lack of a value (after the "=") causes the configuration property "MyProp" to be deleted from the list 'MyList'.
?config.MyList= Deletes the list "MyList".

To see the query string used for configuration changes that you make with RealSystem Administrator, select the Configuration Results page after submitting changes. Then, if you're using Internet Explorer, use the File>Properties menu command, or if you’re using Navigator, use the View>Page Info menu command to view the underlying code.

Summary of the Configuration URL Parameter Rules

  1. You cannot add a property without specifying a value, as in this example: "?config.MyEmptyProperty=" since that syntax is reserved for deleting properties and lists. There is no way to create a property with an empty string ("") value.

  2. You cannot add a list without adding at least one property: "?config.MyList.MyEmptyList=" deletes "MyEmptyList".

    Stated another way, rules 1 and 2 imply that you delete a property or sub-list by assigning an empty value.

  3. All intermediate paths are interpreted as property lists and are created in the registry if they don’t already exist. The name/value pairs are processed in order, so that you can clear a list early in the query string, and then recreate it with the same or different properties and values later in the query string. The following example shows this order:
    ?config.MyList.MySubList=&config.MyList.MySubList.MyProp1=Value1&config.MyList.MySubList.MyProp2=Value2

  4. When using JavaScript to build a query string, the standard rules for URL- encoding apply: property paths and property values should be URL-encoded. Example:
    <SCRIPT>
    var myPropertyPath = "config.MyList.MyProperty" ;
    var myPropertyValue = "Some Value";
    var myQueryString = "?" + escape( myPropertyPath ) + "=" + escape( myPropertyValue );
    </SCRIPT>
    

The Response Page Parameter

The configuration URLs look for a parameter in the query string called "respage". The value of this parameter should be a relative URL to a page under the RealSystem Administrator mount point. The adminfs plug-in returns this page to the browser after it has completed its work. Typically, this page is used to display the results of your changes in a separate browser window. An exception is the servvar.restart URL, which sends the respage page back to the client just prior to restarting the Server.

Example query string

http://<yourserver:adminport>/admin/servvar.set.html?respage=showresults.html&config.RTSPPort=4040

The Administrator uses the following two pages, config_results_ie.nc.html and config_results_nav.nc.html (for Internet Explorer and Netscape clients, respectively) as the respage parameter for most uses of the configuration URLs. Note: when developing a custom Administrator Web page, you are encouraged to use the config_results_XX.nc.html page to display results, as it works for any configuration change, even for custom properties.

Displaying Configuration Change Results

When the adminfs plug-in updates either the registry or configuration file, it makes an entry in a special registry section, called "result", for each configuration property that was changed.

The result list has the following properties ("PROPNAME" is a placeholder for the complete property path of the property that was modified, for example, "config.FSMounts.RealSystem Content.BasePath").

result.PROPNAME.action The type of modification attempted; one of the following "Set", or "Delete".
result.PROPNAME.oldval The old value of the property. This will be an empty string if the property was newly-created.
result.PROPNAME.newval The new value of the property (if the modification succeeded). This will be an empty string if the property was deleted.
result.PROPNAME.success Either "Succeeded", or "Failed".
result.PROPNAME.info An error message (if the modification was not successful).

The following example walks you through the registry changes that occur when a configuration URL is executed:

  1. In this example, the values being changed are the protocol and timeout variables.
  2. Registry excerpt before change

  3. The URL used to apply these changes is http://realserver:adminport/admin/servvar.set.html?config.MyPropertyList.Protocol=TCP&config.MyPropertyList.Timeout=45&respage=config_results_nav.nc.html
  4. The registry excerpt below shows the changes:
  5. Registry excerpt after change

  6. These changes have been entered into a special section of the Server's registry, called result. The diagram below shows the full effect of these changes:
  7. Registry results

  8. The screenshot below shows the actual results page (respage) you receive, noting if the changes were successfully applied.

Successful configuration changes

Handling Configuration Failures

Generally, all configuration changes made via configvar.set.html will succeed as long as the property path syntax is correct and each property path begins with "config.". However, changes made by servvar.set.html can easily fail if the property being changed was not designed to handle on-the-fly changes or is susceptible to invalid data, such as a bad path. Consult with the original plug-in developer for direction.

When the Administrator's results page encounters an configuration error using servvar.set.html, it provides the option to resubmit the change via configvar.set.html, which will save the change in the configuration file only. Then, you can restart the Server to effect your change by reloading the configuration file.

Configuration error screenshot

Note: The RealSystem Administrator only uses servvar.set.html with configuration properties that have been pre-programmed in RealServer to be changes on-the-fly. You should rarely encounter configuration errors while using the Administrator.

Additional Server URLs

There are two additional server-related URLs to use in modifying data:

servvar.restart.html

Causes the server to restart. A response page will be sent to the Administrator before the Server restarts. Under UNIX systems, this behavior can also be caused by sending a SIGUSR2 command to the Server's controller process.

servvar.reconfig.html

Causes the server to reload its configuration file. Note that items that failed to set on-the-fly using the servvar.set URL, would also fail to set using the server.reconfig URL. Under UNIX systems, this behavior can also be caused by sending a SIGHUP command to the server's controller process.

Authentication URLs

The Administrator's Security sections, Access Control, Authentication, Commerce, and Databases, use their own specific URLs in setting data. They are listed in the table below:

auth.addtime Add more seconds of viewing time to an existing permission.
auth.adduser Add user to realm.
auth.changedate Change the expiration date for an existing permission.
auth.changeuserpass Change the user's password.
auth.grantuser Grant user access to authenticated content, and write this change to the associated database.
auth.removetime Remove seconds of viewing time from an existing permission.
auth.removeuser Remove user from realm.
auth.revokeuser Revoke user's access to authenticated content, and write this change to the associated database.
auth.revokealluser Revoke all access privileges to authenticated content, and write this change to associated database

Customizing RealSystem Administrator

This section demonstrates how to create your own configuration page and integrate it within the Administrator Web site.

The RealSystem Administrator Web Site

The Administrator Web site is a collection of HTML pages, style sheets, JavaScript files, and images that reside in the RealServer/RealAdministrator directory. The Administrator is designed to launch automatically after RealServer installation. During installation, the Server will prompt for a user name and password, as well as assigning a random port number, specifically for Administrator access. This ensures that only authorized users can access the Administrator.

The mount point that the Administrator uses to process requests is /admin. You can launch the Administrator by using the following URL: http://yourserver:adminport/admin/index.html. The following URL works as well, substituting localhost for your machine name: http://localhost:adminport/admin/index.html.

The Administrator Web site is organized as a frameset (index.html). The top frame (header.html) reflects the name or IP address of the Server it is monitoring, and displays icons indicating system alerts. The Pending Changes icon means that you must restart he Server before changes you have made, will be applied; the Restart Server icon indicates the Server must be restarted; and the Reload pages icon is a simple method of reloading a specific page.

The Table of Contents left-hand frame (toc.html) launches the configuration sections of the Administrator, as well as displaying a Java-based monitor, links to a reports package, sample clips for ensuring your Server is running, and in-depth documentation and other technical support resources. To check on licensing abilities, there is a link that displays this information. Finally, there is a link to the Virtual Account Manager, which assists in upgrading your Server.

snapshot of Administrator

The Configure section of a fully-enabled Server has this logical progression:
  • General Setup
  • Broadcasting
  • Splitting
  • Multicasting
  • Cache
  • Security
  • Advertising
  • View Source
  • License Group

The right-hand side of the frame initially begins with the Welcome page (welcome.html), with a link to a Quick Start section; this section has concrete tasks that ensure Server 8 is streaming its media well. As you configure your server, the Welcome page will change to reflect the functionality of the page you are working in. For example, if you click the 'Ports" link under the General Setup section, the Welcome page (welcome.html) is replaced by the Ports page (config_ports.html).

Administrator frameshot

Customization Examples

Now that we have walked through the system and coding practices overview, we will cover the task of creating and housing your own page with the Administrator. The following examples assume you are creating a page to manage a small set of custom properties. The example properties are displayed below, as a configuration file excerpt.

<List Name="MyPropertyList">
   <Var Protocol="TCP"/>
   <Var Timeout="30"/>
</List>

In order for you to run or modify these examples, you will need to copy these files to your server’s RealSystem Administrator directory. You will also need an Admin user name and password to access RealSystem Administrator via your browser. An alternative to creating and editing files in your RealSystem Administrator directory is to set up a second mount point for a practice version, a "sandbox" for the Administrator. The steps for accomplishing this are detailed in Appendix A.

The first example is a simple page that displays the current property values and allows them to be modified using the servvar.set.html configuration URL. The property values are retrieved using the <!--$()--> property tag, explained earlier. This page is designed to be used independently of the Administrator frameset and supporting JavaScript libraries.

Similar in functionality to Sample 1, Sample 2 uses the RMAGetPropertyValue() function to retrieve registry values. Sample 2 also makes use of the JavaScript libraries that ship as part of the Administrator.

The RealSystem Administrator Table of Contents

As noted earlier, the Administrator Table of Contents (TOC) file is called toc.html. This is the source page for the left-hand side of the Administrator frameset. The source code for this page consists of these main elements:

  • TOCEntry – a server-side JavaScript class that defines when and how each link in the TOC is inserted into the HTML page sent to the client.
  • Client-side DHTML functions for collapsing/expanding the TOC headings.
  • Client-side functions for initializing and controlling the main (right-hand) frame of the Administrator frameset.

To add a heading or link to the TOC, create a TOCEntry object at the desired location in the source file. While it is helpful to understand how the TOCEntry class works, if you simply want the task instructions, you can skip the following section and proceed to "Adding Your Page to RealSystem Administrator TOC".

The TOCEntry Class Constructor


function TOCEntry(title, url, parent, key)
title the link text that is displayed for this entry in the TOC
url The URL for the page associated with the entry; use the empty string ("") for a TOC Heading that doesn’t have a URL. The URL parameter is used for the HREF attribute for the link element that is inserted into TOC page. The target window for TOC links is assumed to be the main or right-hand frame of the Administrator frameset. Use a JavaScript URL to target a different browser window.
parent Optional. The parent heading for this entry (a reference to another TOCEntry object). If this parameter is omitted or set to null, the entry is assumed to be root level heading. A root level entry is not indented and is always displayed.
key Optional. Full path to a registry property whose value must be non-zero value in order for this entry to be inserted into the TOC. If this parameter is omitted or set to null, then the entry is inserted. Primarily used to filter out configuration pages for features that are not licensed on the current Server.

This excerpt from the toc.html defines the View Source heading and the three links that appear underneath it, when the heading is expanded.

// *** ViewSource *** 
/* 
The following statement creates a new TOCEntry object and saves a (temporary) 
reference to it. This entry is a TOC heading and has no page associated with 
it so the URL parameter is an empty string. Since this heading is a ‘child’ 
of the "Config" heading, a reference to the config TOCEntry object 
is passed as the parent parameter. A key parameter is not passed in since the 
View Source feature is available on all Servers, and is not controlled by the 
Server license. 
*/ 
tmpParent = new TOCEntry( "View Source", "", config ); 

//The next three statements create TOC links as children of the ViewSource heading.
new TOCEntry( "Source Access", "config_viewsrc.html", tmpParent);
new TOCEntry( "Content Access", "config_content_browsing.html", tmpParent );
new TOCEntry( "Browse Content Now", "Javascript:launchHome('browse_content.html')", tmpParent );
/* 
Normally the target window for the URL parameter is assumed to be the 
Administrator’s main or right-hand frame. However, there can be exceptions: since the "Browse Content Now" page 
is designed to be displayed in a separate browser window, the URL to this link 
is a JavaScript function that will open the ‘browse-content.html’ page in a new 
window. 
*/
Adding a Page to the Table of Contents Frame

To add your configuration page to the Table of Contents (TOC) frame, you need to decide if it will appear under a new header or an existing one, and where to insert the new header/link. The following example creates a new header and a link to the sample configuration pages, and inserts them immediately after the ‘View Source" links.

Open the toc.html page and find the View Source section. Insert the following immediately after the "Browse Content Now" TOCEntry line.

/* create a subheading in the TOC for the sample pages */ 
tmpParent = new TOCEntry( "Sample Config Pages", "", config );
/* create the links to the sample pages under the new subheading */
new TOCEntry( "Sample 1", "config_sample1.html", tmpParent);
new TOCEntry( "Sample 2", "config_sample2.html", tmpParent);

Conclusion

By now you should have a good overview of how the RealSystem Administrator interacts with Server 8, including the special URLs it uses in setting data in the configuration file and registry, and how to add your own configuration page to the Administrator's frameset.

A final tip: keep track of the differences between Internet Explorer and Navigator, as you implement your HTML code (RealSystem Administrator is designed for 4.0 browsers and above.)

The appendixes below provide additional development guidelines. Appendix A walks you through the creation of a practice directory, called a "sandbox", while Appendix B collates additional resources: JavaScript resources, the SDK location, and developer forum. Finally, a short glossary defines any unfamiliar terms.

Appendix A – Sandbox: How to set up a working directory for the admin files

A good practice to follow when customizing the Administrator is to avoid making modifications to the already installed RealSystem Administrator directory. Instead, create a ‘sandbox’ so that you don’t risk your system. You’ll also be able to compare your changes to the original directory. It’s also recommended that you copy the samples accompanying this white paper, to your sandbox.

Setting Up Your Sandbox

  1. Create your sandbox directory any where on the same machine as your development RealServer, where you have read.write privileges. The path you create will be referred to as <YOUR SANDBOX PATH> in the following steps and examples.
  2. Copy all of the files from RealServer/RealSystem Administrator directory to <YOUR SANDBOX>, but do not copy the subdirectories.
  3. Make a copy of your RealServer configuration file, and name this copy sandbox.cfg.
  4. Open the sandbox.cfg with a text editor, and add the following section inside the <List Name="FSMount"> tag:
  5. <!-- Local File System; HTML -->
    <List Name="RealSystem Administrator HTML - sandbox">
       <Var ShortName="pn-local"/>
       <Var MountPoint="/sandbox/html/"/>
       <Var BasePath="<YOUR SANDBOX PATH>"/>
    </List>
    <!-- Local File System; IMAGES; use the install directory via the /sandbox/ mountpoint -->
    <List Name="RealSystem Administrator IMAGES - sandbox">
       <Var ShortName="pn-local"/>
       <Var BasePath="<REAL SERVER PATH>\RealAdministrator\images"/>
       <Var MountPoint="/sandbox/images/"/>
    </List>
    <!-- Local File System; DOCS; use the install directory via the /sandbox/ mountpoint -->
    <List Name="RealSystem Administrator DOCS - sandbox">
       <Var ShortName="pn-local"/>
       <Var MountPoint="/sandbox/Docs/"/>
       <Var BasePath="<REAL SERVER PATH>\RealAdministrator\Docs"/>
    </List>
    <!-- XML Tag Handler File System -->
    <List Name="Real System Administrator SSI - sandbox">
       <Var ShortName="pn-xmltag"/>
       <Var MountPoint="/sandbox/includes/"/>
       <Var BaseMountPoint="/sandbox/html/"/>
        <List Name="TagHandlers">
           <Var h1="pn-includer"/>
           <Var h2="pn-vsrctaghdlr"/>
        </List>
    </List>
    <!-- Admin File System -->
    <List Name="RealSystem Administrator Files - sandbox">
       <Var ShortName="pn-admin"/>
       <Var MountPoint="/sandbox/"/>
       <Var BaseMountPoint="/sandbox/includes/"/>
       <Var Realm="<REAL SERVER MACHINE NAME>.AdminRealm"/>
    </List>
    
  6. Add the following line to the "HTTPDeliverable" list:
  7. <VAR Path_99="/sandbox"/>
  8. Replace <YOUR SANDBOX PATH> with the absolute path to your sandbox directory.
  9. Replace <REAL SERVER PATH> with the absolute path to where your Server 8 is installed.
  10. Replace <REAL SERVER MACHINE NAME> with the name of your server machine (use the same value from the Realm property in the default "RealSystem Administrator Files" list).
  11. Given a default Windows NT RealServer installation and a sandbox directory of C:\sandbox and a machine name of "ra_dev", here is how the sandbox config file should look:

    <List Name ="HTTPDeliverable"> 
        <VAR Path_99="/sandbox"/> 
    <|  |  |  > 
    
    <List Name ="FSMount"> 
    <!-- Local File System; HTML --> 
        <List Name="RealSystem Administrator HTML - sandbox"> 
            <Var ShortName="pn-local"/> 
            <Var MountPoint="/sandbox/html/"/> 
            <Var BasePath="C:\sandbox"/> 
        </List> 
        <!-- Local File System; IMAGES; use the install directory via the /sandbox/ mountpoint --> 
        <List Name="RealSystem Administrator IMAGES - sandbox"> 
            <Var ShortName="pn-local"/> 
            <Var BasePath="C:\Program Files\Real\RealServer\RealAdministrator\images"/> 
            <Var MountPoint="/sandbox/images/"/> 
        </List> 
        <!-- Local File System; DOCS; use the install directory via the /sandbox/ mountpoint --> 
        <List Name="RealSystem Administrator DOCS - sandbox"> 
            <Var ShortName="pn-local"/> 
            <Var MountPoint="/sandbox/Docs/"/> 
            <Var BasePath="C:\Program Files\Real\RealServer\RealAdministrator\Docs"/> 
        </List> 
        <!-- XML Tag Handler File System --> 
        <List Name="Real System Administrator SSI - sandbox"> 
            <Var ShortName="pn-xmltag"/> 
            <Var MountPoint="/sandbox/includes/"/> 
            <Var BaseMountPoint="/sandbox/html/"/> 
            <List Name="TagHandlers"> 
                <Var h1="pn-includer"/> 
                <Var h2="pn-vsrctaghdlr"/> 
            </List> 
        </List> 
        <!-- Admin File System --> 
        <List Name="RealSystem Administrator Files - sandbox"> 
            <Var ShortName="pn-admin"/> 
            <Var MountPoint="/sandbox/"/> 
            <Var BaseMountPoint="/sandbox/includes/"/> 
            <Var Realm="ra_dev.AdminRealm"/> 
        </List> 
    <|  |  | >
    

    Note: You can also "sandbox" the RealSystem Administrator images subdirectory if you’re going to add or modify images. Copy the /images subdirectory from the installation directory to your sandbox directory, and then modify the base path property of the "RealSystem Administrator IMAGES - sandbox" list to point to the <YOUR SANDBOX PATH>/images path.

  12. Restart your Server 8 using the sandbox.cfg file. Note: any changes made using RealSystem Administrator will be saved in the sandbox.cfg file.
  13. Move to the RealServer Bin directory and restart your RealServer with this command line:

    on a Windows system: rmserver..\sandbox.cfg

    on a UNIX system: Bin/rrmserver sandbox.cfg

  14. Access your sandboxed version of the RealSystem Administrator using the /sandbox/ mount point. For example: http://<yourserver:adminport>/sandbox/index.html

Appendix B - Additional Resources

Obtaining the RealSystem Administrator

The RealSystem Administrator, as part of RealSystem Server 8, can be downloaded from the RealNetworks Server page, at http://www.real.com/solutions/servers/index.html

The RealSystem SDK

Detailed information about RealNetwork's implementation of COM and plug-in development guidelines can be found in the RealSystem SDK, which contains a RealPlayer, Server 8, documentation, and samples that demonstrate just about every interface in the system. It is available free of charge at http://proforma.real.com/mario/devzone/rmsdk.html.

JavaScript Documentation and Resources

Microsoft's Javascript documentation and resources, including a client-side script debugger, is published at http://msdn.microsoft.com/scripting/

Netscape's JavaScript documentation and resources is published at http://developer.netscape.com/tech/javascript/index.html

Netscape's JavaScript debugger documentation is published at http://developer.netscape.com/software/tools/index.html?content=/software/jsdebug.html

RealForum Discussion Group

For further help, developers are invited to join the Real Forum online discussion group. The Real Forum listserv is a monitored email discussion group focused on using RealNetworks products. Here, developers post messages and share answers about the best methods for planning and implementation of streaming media networks, and creating content.

Documentation Library and Technical Support

Other RealNetwork product documentation is online, as well as Technical Support's searchable Knowledge Base.

Glossary


Configuration File
The XML-based file, called rmserver.cfg, that Server 8 uses to read in its parameters. It is composed of four types of tags: the XML version declaration tag, optional comment tags, list tags, and variable tags. If you choose to make an edit manually, rather than using the Web-based Administrator, always make a back-up copy of the original configuration file.

Query String
Query strings pass data from the user's input, to the server.

RealPlayer
RealNetworks client designed to play multimedia presentations streamed by Server 8.

RealSystem Administrator
The Administrator is a Web-based application that is used to set up and customize RealServer features.

RealSystem iQ
The system for streaming clips such as RealAudio and RealVideo over a network. It consists of Server 8, Proxy 8, Player 8, and production tools.

RealSystem Server 8
RealNetworks server software used to stream multimedia presentations to RealPlayer.

RealSystem Software Development Kit (SDK)
The kit contains a RealPlayer, Server 8, documentation, and samples that demonstrate the RMA interfaces.

Response Page
HTML page (respage.html) that the server displays, showing you the results of your changes.

Sandbox
Experimental directory, deliberately set aside from a running program (in this case, Server 8) to allow safe execution of test code.

URL Encoding
Parameters encoded in a special way for processing by Server 8.

Virtual URLs
Custom URLs used internally by the server to set data. The two main URLs are servvar.set.html and configvar.html. The two secondary URLs are servvar.restart.html, and servvar.reconfig.html.

XML
XML stands for eXtensible Markup Language, a text-based, non-binary format that is used to describe the type of information the Server's configuration file contains, and its organization. XML is an official standard approved by the World Wide Web Consortium (W3C).


Date of Revision: 15 December 2000
Date of Publication: 17 March 2000. Copyright RealNetworks, 2000. All Rights Reserved.