Back to Posting Recorded Scrabble Games

MarlDOoM Webcast: Administrator’s Guide

This document provides information for managing the live webcast of a Scrabble game using John Chew’s MarlDOoM software. For further information, please contact John at

A basic knowledge of Unix commands is required, including an ability to navigate the file structure and edit a text file.

Table of Contents

How Live Annotation All Works

The annotators use TinyFugue to connect to an instance of the MarlDOoM generic crossword game server, typically running on the web host.

When they replay their game on the server, the game server posts a .gcg game file to the appropriate game directory (usually of the form ~/www/games/EVENT/DATE) on the web host each time the game state changes.

When a browser views the game, using the showgcg CGI script, if the game is a current one, they are redirected to a cache file rendering the turn they asked for in HTML, and if the cache file is staler than the .gcg file, the cache file is rebuilt. (If the game is not current, the requested HTML content is served dynamically, to conserve host disk space.)

You can use the pgm CGI script to edit games on the server. When you open a game using pgm a private copy of the game is stored in your browser, which you can edit and resave (overwriting any changes that may have been posted in the interim, so it’s not a good idea to do this when annotators are working on the game). Whenever you save a game, it is validated, and if errors are reported you should correct the data before resaving.

Starting the Annotation Server

You need to start the server if it crashes, or if the host on which it is running is restarted.

  1. Open an ssh connection to the server. If you do not have the host name, TCP/IP port, user name and password to do so, please ask John.
  2. cd ~/scrabble/doom to the server directory.
  3. Enter the command ./go. This checks to make sure the server isn’t already running, makes a backup copy of the server database marldoom.db, rotates the server log and launches the server.
  4. Check the log file: tail -100 log. After a successful launch, the last line should read something like
    20080816 120703 up   process 6743 port 7777,7776
  5. If instead you see a long list of messages complaining about corrupt objects, the database may have been corrupted in a crash. The easiest way to fix this is to replace it with an old clean copy of the database: /bin/cp marldoom.db.clean marldoom.db. This will however erase any game that might have been in progress, and it will need to be reentered.

Shutting Down the Annotation Server

You do not need to shut down the server.

If you want to anyway, connect to the server as the wizard user and use the shutdown command.

If this does not work, look at the beginning of the log or in a ps process listing to find the server process ID and kill or kill -9 it.

Validating Annotated Games

For a variety of reasons, live annotators may have to post incorrect information about a game to the web and ask you to correct it using the pgm CGI script.

If they notice a mistaken play right after committing it, they will withdraw the play as though it were successfully challenged, then have their opponent pass the turn back to them so they can place the correct word. In this case, you should delete three turns from the game log: the original bad play, the '--' withdrawing it, and the '-' passing back.

If the annotators report that a time penalty was assessed, enter it at the end of the log as follows (e.g.):

1 RACK (time) -50 300
indicating in this example that Player 1 was caught with RACK on his rack, lost 50 points on time and ended up with 300 points. (If no tiles were left on the rack, leave just a space between the player number and (time).)

The scores that the annotators post will be the correct ones, but it is possible that the players may agree to an incorrect score. If so, you can add comments of the form

#note Players agreed that this turn scored 20
immediately after the erroneous line, or
#note Players agreed to a final score of 400-300
at the end of the log.

Recovering Live Annotated Games

If something goes horribly wrong with a live annotated game (such as the annotators overwriting an earlier round’s game), you can look through ~/scrabble/doom/bak, which contains a copy of every version of every .gcg file posted to the server. You can either copy it to the game directory, or paste the game log portion of it into pgm.

Deleting Annotated Games

You can delete games using the pgm CGI script. If you delete one and need to recover it, you can ask John Chew. If you have FTP access to the website, you can also move it back out of the trash folder, then resave it using pgm.

Permission Denied

There is an intermittent error that sometimes causes game directories to be created without read permissions. If you notice that this has happened, correct it using something like chmod a+rx ~/www/games/bast/2008sd/5 and chmod a+r ~/www/games/bast/2008sd/5/* (for round 5 at the 2008 BASD).