The Application

A Flash Communication Server application is defined in the virtual host's application folder. The application is a collection of server-side ActionScripts (ASC), Flash video (FLV), and Stored object (FSO) files. All applications are subject to the limitations declared in the adaptor and virtual host configuration files. The application folder is commonly used in development to also store Flash (FLA, SWF) and HTML files. When moved to production, these files should be separated into a folder that is not accessible by the web server. If you access ASC files through a web server, the scripts will be exposed in a web browser?a major security risk. Moving the applications folder to a more secure location simply involves changing the <AppsDir> reference in the Vhost.xml file.

Folders

There are no folders related to the application in the conf folder. Applications are stored within the <AppsDir> folder. Each application folder usually contains a main.asc file that is used to control all server-side ActionScript. Within a single application folder, additional folders can be created by the server. Streams will be created to application instance folders containing FLV (video) files. SharedObjects will also contain application instance folders to save the data in persistent SharedObjects as FSO files.

Configuration: Application.xml

The application configuration file (see Listing 14.3) is located in the virtual host conf folder next to the Vhost.xml file. This is a global file that can be overwritten by each application. Each application within the virtual host can contain its own Application.xml file to override the global one. The file contains settings to micro-manage bandwidth, storage, and general application settings, such as the ability to be loaded when the server starts or reboots.

There are nodes you should be aware of in this file. The <ScriptLibPath> refers to the location of Class files that extend the server-side ActionScript library. This path is referred to when a SSAS load command cannot find a file in the application path. This folder contains the components.asc file and the NetServices.asc file used with the Flash UI components and Flash Remoting MX. It should be protected from access through the web server.

If you are using Flash Communication Server for video streaming, you might consider enabling the <EnhancedSeek> node. This node allows your video to seek accurately to the frame. It consumes additional server resources; however, it does produce a cleaner result for seeking.

Listing 14.3 The Application.xml configuration file
<Application>
      <LoadOnStartup>false</LoadOnStartup>
      <MaxAppIdleTime>1200</MaxAppIdleTime>
      <RecordAppLog>true</RecordAppLog>
      <JSEngine>
      <MaxTimeOut>0</MaxTimeOut>
      <ScriptLibPath> C:\inetpub\wwwroot\flashcom\scriptlib\</ScriptLibPath>
      </JSEngine>
      <StreamManager>
            <StorageDir></StorageDir>
            <GCInterval>20</GCInterval>
            <EnhancedSeek>false</EnhancedSeek>
      </StreamManager>
      <SharedObjManager>
            <StorageDir></StorageDir>
      </SharedObjManager>
      <Client>
            <Bandwidth override="yes">
                  <ServerToClient>250000</ServerToClient>
                  <ClientToServer>250000</ClientToServer>
            </Bandwidth>
            <BandwidthCap override="no">
                  <ServerToClient>10000000</ServerToClient>
                  <ClientToServer>10000000</ClientToServer>
            </BandwidthCap>
      </Client>
</Application>

Note

The <RunTimeSize> node within the <JSEngine> node that is mentioned in the Flash Communication Server manual is no longer used. Also, the default value of 250000 displayed in the <ServerToClient> node is the correct default value. The Flash Communication Server manual made reference to 25000.


Security

Application security is the responsibility of the developer. It is the responsibility of the application to control access to content and streams once a user has entered the system. Application security with the configuration files is limited to capping the bandwidth and the location of the storage.

Macromedia maintains a support site specifically for Flash Communication Server administration. If you are in charge of managing a Communication Server, check out Macromedia's support center for tech notes and updates at http://www.macromedia.com/support/flashcom/administration.html.

With your new knowledge of the server architecture, let's walk through a step-by-step process of creating a new adaptor and virtual hosts for your Flash Communication Server.



    Part I: 10 Quick Steps for Getting Started
     
    ASPTreeView.com
     
    Evaluation has №Н»КХЙЩБexpired.
    Info...