Damian Cugley’s Weblog

As mentioned earlier, I am working on a version of the Picky Picky Game that does not need to write to files (since some web servers will be set up that way for security reasons). In some ways this simplifies things, because it means there is only one URL hierarchy to worry about.

The URL design now looks like this:

picky.cgi/sample/ GET Home page, dynamically generated
picky.cgi/sample/main.css GET Style sheets and other static files
picky.cgi/sample/13/foo.png GET One of the candidates in the 13th panel
picky.cgi/sample/13/votes POST Ballot box for panel 13
picky.cgi/sample/14/pictures POST Where to post candidates for panel 14

Previously only the POST URLs used the CGI script; all the static resources came from files and had a separate URL hierarchy.

The dynamically generated resources that previously were stored on disc can now instead be stored in the object database that holds the other metadata. This means the host web server (Apache) is no longer responsible for such details as Content-Length headers or handling If-Modified-Since, and I need to implement them. So far I am halfway done.

For some reason, pictures stored on disc (what I could now call ‘legacy’ resources) are not being served properly; I will look in to that when I next have some spare time. In the meantime, you can try out the fairly broken-looking prototype at http://caption.org/caption-cgi/hello.cgi/sample/.

4 May 2003

Article Archive by Year