RMS II
RMS Librarian Application

(rev. 7-Mar-08)


RMS Librarian


Introduction

The RMS Librarian application lets you automatically:

Incoming sound, scan, script, log and web monitor log files are fed to the Librarian by placing them in a special "Incoming" folder (in much the same way books are returned to a real library in a return slot). The files may be manually dragged to the "Incoming" folder, or they may be FTP'ed to the folder, or they may be e-mailed as attachments with the receiving e-mail client or server configured to drop attachments into the folder.

The Librarian periodically scans the "Incoming" folder for new files. When a new file appears, the Librarian determines where it belongs within a well-known "RMS Data" folder structure. The file is then moved to the proper folder within the "RMS Data" structure (in our library metaphor this is analogous to returning a book to its proper shelf). If the file is corrupt, it moves it to a "Catch All" folder.

Folders encountered in the "Incoming" folder are emptied out and the folder contents are routed to the proper place in the "RMS Data" structure. StuffIt archives encountered in the "Incoming" folder are unstuffed, and the archive contents are routed to the proper place. Eudora EIMS "save as" text files (creator is 'EIMP') encountered in the "Incoming" folder are un-binhexed and unstuffed, and the resulting files are routed to the proper place.

Once data files are stored in the "RMS Data" structure, the RMS Player CGI and RMS WebMonitor CGI know how to access them very quickly as they satisfy ad hoc web queries.

If left unbounded, the "RMS Data" folder structure would soon be bulging with thousands of data files. The final major feature that the Librarian provides is an auto-purge/archive facility. This feature lets you specify a time once each day when the Librarian pauses to throw away data files that are at least N days old. Optionally, the Librarian can be configured to archive sound and/or scan and/or web monitor log files before they are purged, and to send those archives to an FTP server.

The RMS Librarian also maintains a status HTML page that lists pertinent information about each RMS Server from which the Librarian receives log and script files. For each RMS Server location, this page displays: 1) a link to the most recent log file received; 2) a link to the most recent script file received. In addition, the page contains links to the folders containing all the log and script files for every RMS Server location. From this one page, users can easily access the log and script files for each RMS Server.

The Status.htm page is contained within the folder designated as the "RMS Data Folder" in the Librarian's preference settings. This HTML page is periodically updated by the Librarian and the status page's refresh interval can be changed via the Librarian preference settings (see below). A key feature of the Status.htm page includes an indication of which RMS Server locations haven't recently transmitted a log and/or script file. The RMS Librarian maintains preference settings which let users set the time thresholds for when non-receipt of a log or script file is considered a warning condition or an alarm condition. Normally, the background color surrounding the link to the most recent log and script file is white. When a warning condition exists, the background color switches to yellow, and when an alarm condition exists, the background color switches to red. This color coding scheme lets users see at a glance which, if any, RMS Server sites may be having difficulties.

In summary, the RMS Librarian application lets you receive, store, purge, and archive RMS data files automatically and unattended.

System Requirements

CPU:           Any PowerPC Macintosh or PowerBook
Memory Usage:  8MB
Disk Usage:    1MB + however much space is needed to store incoming data files
Network:       Internet connection (most likely)
OS:            System 9.1 or later, with CarbonLib 1.6 or later; or OS X 10.4 or later

Software Components

Software Installation

  1. For complete OS X installation instuctions, see Reference_E: OS X Installation Notes.

Software Setup

To use the RMS Librarian, you must first configure the Preferences to suit your particular installation. You will specify where the "Incoming" and "RMS Data" folders are located, and setup the auto-purge and archive/FTP parameters for your installation.

  1. Create the Bands file. Each line in the Bands file contains a single text string, which describes the frequency band in MHz and the frequency range for the band; for example, "9:9300-9995" represents the 9MHz frequency band, with a frequency range from 9300kHz to 9995kHz. In general, lines within the Bands file have the following format: "<frequency band in MHz>: <minimum frequency in band> - <maximum frequency in band>". To edit the Bands file:
    • Open the Bands file in the BBEdit application. Simply add/change/remove strings from the text file and then save the file. Note that all leading and trailing spaces on a line, as well as blank lines, will be ignored. The next time you run the RMS Librarian (and Player) applications, they will utilize the new Band settings.
  2. Launch the Librarian application by double-clicking its icon in the Finder.
  3. Choose "Preferences" from the File menu to open the Preferences dialog.
  4. In the Finder, create a folder to act as the "Incoming" folder. You may name it anything you want, and place it anywhere you want.
  5. In the Preferences dialog click the Incoming Folder "Set..." button. Navigate to, and select, the folder you set up to be the "Incoming" folder.
  6. In the Finder, create a folder to act as the root "RMS Data" folder. You may name it anything you want, and place it anywhere you want, as long as the folder resides on the same volume as the "Incoming" folder, and does not appear inside the "Incoming" folder.
  7. In the Preferences dialog click the RMS Data Folder "Set..." button. Navigate to, and select, the folder you set up to be the root "RMS Data" folder.
  8. The "More Neighborly --- Better Performance" slider in the Preferences lets you control the priority of the entire Librarian application in relation to the other applications running on the same Mac (e.g. the Web Server and Player CGI). "More Neighborly" makes the Librarian execute for smaller periods of time before relinquishing the Mac to other applications; "Better Performance" hogs the Mac for a longer period of time before relinquishing control.

    For faster Web Player query responses, set the slider towards More Neighborly. In fact, a good strategy is to set the slider all the way to the left (the most neighborly), and only move it to the right one "notch" at a time if you discover through trial and error that the Librarian cannot keep up with the incoming stream of files. This strategy ensures that the Web Player will respond to web queries as quick as possible.
  9. The Librarian keeps a log file of activity and errors. Set the log parameters in the Preferences dialog. The Verbose logging option creates many log entries, so you should only turn it on for debugging purposes; otherwise it will slow down Librarian operation.
  10. The Checksum verification check box in the Preferences dialog lets you turn on or off this option. If turned on, the Librarian will look for a pre-calculated checksum in any incoming StuffIt archive. If one is found, the Librarian will verify that checksum by recalculating the checksum on its own and comparing it to the pre-calculated one. If they differ, the archive is deemed corrupt -- an error is logged and the archive is moved to a catch all folder. This prevents corrupt archives from crashing the StuffIt engine, at the expense of some extra computation.
  11. The Librarian takes the time once per day to do purging/archiving/FTP housekeeping chores. Set these parameters in the Preferences dialog as follows:
    • Specify the UTC time of day when you want the housekeeping to take place. It is best to choose a time that you expect the Librarian to have a light workload of incoming files.
    • Specify how old the data files should be before they are purged. This lets you regulate how many days of data you want to keep around to have available to the WebPlayer. There are separate settings for sounds/scans and web monitor logs.
    • You may optionally archive (.sit or .zip or .tgz) sound files before they are purged. Select "Sounds" in the popup under the Archive/Purge section. Check the "Archive Sound files..." check box to enable sounds archiving. If you want this option, you must specify which broadcaster's sound files to archive. Enter the 3-letter broadcaster code and click the Add button to add a broadcaster to the list. Sound files whose broadcaster appears in the list will be archived before they are purged.
      To have the archives for a specific broadcaster automatically FTP'ed to another computer, select the broadcaster in the list. Then check the "Also FTP archives for this broadcaster to" check box, and enter the FTP URL for where you want that broadcaster's archives to be sent. Repeat for each broadcaster whose archives you want FTP'ed. An example of an FTP URL is "ftp://john_doe:password@internet.address.com/dir1/dir2".
    • You may optionally archive (.sit or .zip) scan files once per month before they are purged. Select "Scans" in the popup under the Archive/Purge section. Check the "Archive the last N days..." check box to enable scans archiving. On the 7th day of each month, the Librarian will archive the last N days of scans, creating one archive for each of the N days.
      To have the archives automatically FTP'ed to another computer check the "Also FTP archives to" check box, and enter the FTP URL for where you want the archives to be sent. An example of an FTP URL is "ftp://john_doe:password@internet.address.com/dir1/dir2".
    • You may optionally archive (.sit or .zip) web monitor log files once per month before they are purged. Select "WebMon Logs" in the popup under the Archive/Purge section. Check the "Archive webmon logs before purging..." check box to enable webmon log archiving.
      To have the archives automatically FTP'ed to another computer check the "Also FTP archives to" check box, and enter the FTP URL for where you want the archives to be sent. An example of an FTP URL is "ftp://john_doe:password@internet.address.com/dir1/dir2".
  12. The Status settings in the Preferences dialog let you control the operation of the Status.htm page, which the Librarian maintains to provide current status about the RMS Server sites it's supporting.
    • The "Update status.htm web page every..." setting specifies how often the Librarian refreshes the Status.htm page. It's recommended that you use the default setting of 60 minutes. Setting this value to less than 60 minutes is not recommended and can waste valuable Librarian processing cycles.
    • The "Show warning if..." setting specifies the amount of time that can elapse before the non-receipt of a new log/script file is considered a warning condition. When a warning condition exists, the background color of the link (in the status.htm page) to the log or script file is colored yellow.
    • The "Show alarm if..." setting specifies the amount of time that can elapse before the non-receipt of a new log/script file is considered an alarm condition. When an alarm condition exists, the background color of the link (in the status.htm page) to the log or script file is colored red.
    • The "Make web browser auto-refresh..." setting specifies how often to refresh the status page information when viewed from a Web browser. This option is useful when you want to have a browser continuously display the Status.htm Web page and have it auto-update without intervention by a user.

Notes