This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Remote Access (DBServer)

    In this chapter, you will learn how to make your database available to mAirList instances outside the local network, e.g. at a remote studio or the home of a voice tracking DJ, using mAirList DBServer.

    Overview

    In a typical LAN setup, each mAirList computer connects directly to the SQL server, and accesses the audio files through a network share. Neither is a good idea over the internet: SQL servers and Windows file shares should not be exposed to the public, and they are not designed for connections with high latency.

    DBServer solves this by acting as a gateway: It runs on a computer in your LAN that has direct access to the database and the audio files, and provides both to remote clients through a single HTTP (or HTTPS) port:

    • All database requests (library, playlists, logging, etc.) are forwarded to the database.
    • Audio files are downloaded from the storages through the server, and voice tracks and other files can be uploaded into the storages.
    • Optionally, audio files can be transcoded to a lower quality on the fly, in order to save bandwidth.

    On the remote computer, the database is set up as a mAirListDB (Internet Client) connection, see Client Setup below.

    Server Setup

    Starting DBServer

    DBServer is part of the regular mAirList installation. Start it from the Windows Start Menu (Database Server), or by running mAirList.exe -mode dbserver.

    DBServer works with any database connection configured in this mAirList installation (SQL server or local database). If there is more than one database connection, you are asked which one to serve. You can also specify the database on the command line using its Database ID: mAirList.exe -mode dbserver -db <ID>.

    Only one DBServer can run per database. If you start it again for the same database, the existing window is brought to the front.

    When you minimize the DBServer window, it is hidden into the notification area (system tray). Click the icon to restore it, or right-click it to exit DBServer. When you exit DBServer, you are asked for confirmation, and the shutdown password if one is set in the configuration.

    Server Settings

    The DBServer window has the following settings on the General tab:

    • Enable server: Starts or stops the server. The other settings can only be changed while the server is stopped.
    • Mode: HTTP only, HTTPS only, or HTTP and HTTPS.
    • HTTP Port: The TCP port for HTTP connections. Default is 8840.
    • HTTPS Port: The TCP port for HTTPS connections. Default is 9840.
    • SSL Certificate Files: For HTTPS, select the Certificate, the Key and the Root Certificate file (PEM format).

    The settings are saved automatically, and DBServer starts serving the database right away when it is launched with Enable server checked.

    In order to make the server reachable from the internet, you must forward the selected port(s) from your router or firewall to the DBServer computer.

    Storages

    DBServer serves the audio files from the storage folders, so the computer it runs on must have access to all storages. The location of each storage is taken from the storage configuration, and the Storage Redirection settings of the database connection on the DBServer computer, if any.

    Files can only be served from storages located in a Windows folder (local or network share).

    The storages are read when the server is started, so restart the server (or uncheck and check Enable server) after making changes to the storage configuration.

    Transcoding

    On the Transcoding tab, you can set up DBServer to convert audio files to a different format before sending them to the client. There is one tab for each of the quality levels Default, High, Medium and Low. For each level, you can set:

    • Enable transcoding for this quality level: If unchecked, the original file is sent for requests with this quality level.
    • File Format: Click the button to select the format and bitrate, e.g. MP3 with 128 kbps.
    • Cache Folder: Optionally, a folder where transcoded files are kept. When the same file is requested again, it is served from the cache, unless the original file has been modified in the meantime. Leave empty to transcode the file again on each request.

    The client decides which quality level to request for which purpose (see Client Setup). By default, all requests use the Default level, so enabling transcoding for Default will affect all files downloaded by all clients.

    Log

    The Log tab shows the requests processed by the server, along with any errors. It holds the last 1,000 entries.

    Users and Permissions

    Remote clients must log in with a user account of the database. The permissions of that user (user level, permitted stations, etc.) apply to all requests made through DBServer, in the same way as for a direct connection. See User Management for information on how to create users and assign permissions.

    Some functions require a particular user level, for example:

    • Uploading files (e.g. voice tracks) requires the VT DJ level or higher.
    • Deleting files from a storage requires the Manager level or higher, and the permission to delete files.

    Note that the user management dialog itself is not available through a DBServer connection. Use a direct SQL connection to manage users.

    Client Setup

    On the remote computer, add a new database connection in the configuration app, and select mAirListDB (Internet Client) as the connection type.

    On the Database Server tab, enter:

    • Host name or IP: The public host name or IP address of the DBServer computer (or your router).
    • Port: The HTTP or HTTPS port configured on the server.
    • Path: Leave empty, unless the server is behind a reverse proxy that uses a different path.
    • Use SSL/HTTPS: Check this if you use HTTPS, and make sure to enter the HTTPS port.

    On the Connection tab, enter the username and password of the database user, or sign in to create a token, see Database Login. Click Test Login to verify the connection.

    Audio Quality

    On the Transcoding tab of the client connection, you can choose which quality level (Default, High, Medium, Low) is requested for each purpose, e.g. On Air Playback, PFL or Voice Tracking. For example, you could request Low quality for PFL, so that previewing a song starts faster, but keep Default for on air playback.

    These settings only have an effect if transcoding is enabled for the respective quality level on the server.