Assuming sufficient RAM is available to hold all static Web pages, both approaches should achieve the same results, although the disk caching approach can conserve memory because it works with memory less than the total size of all static pages.
CL-HTTP can run standalone or over an isolated AppleTalk network. This describes the configuration with or without domain name resolution service (DNS).
When DNS is available from a server such as Apple's MacDNS, set TCP to connect via AppleTalk.,enable AppleTalk, and use the Basic Configuration with the standard configuration file, Configuration.lisp or equivalent.
For standalone operation, the disconnected server talks to the browser via a AppleTalk loopback connection. However, running a DNS server may be too cumbersome for many standalone configurations. The main objective is to avoid resolving domain names. Thus, all references to URLs must use the IP address of the server. Any references to the local host in HTML should omit the host component so that URLs will be relative to the local host (IP address) serving the documents.
This configuration allows standalone service to clients running on the same host without a connection to a network. It also works for to clients running on other hosts and connecting to the server over an AppleTalk link (e.g., ethernet, LocalTalk cables, IrTalk wireless nets).
Local-Host.AppleTalk.Net A 127.0.0.3 ;AppleTalk operation (stand alone) WWW.AppleTalk.Net CNAME Local-Host.AppleTalk.Net ; canonical nameThis can be used to give your host the name local-host so that you don't need to remember its IP address, or names might be given to any number of local talk hosts by providing the IP-DNS mappings in the hosts file of each machine.
You can save a binary image containing CL-HTTP in order to reduce the time required to launch the server. These server application images are easiest to manage if they are unconfigured and contain no URL exports. They can be booted and configured in any way without concern to data that might be cached in the image, such as local host information, configuration preferences, or exported URLs.
(load "http:mcl;sysdcl")
(ccl:save-application "CL-HTTP-major.minor" :init-file "CL-HTTP-Init.lisp")
If you want to have the server launch automatically when the Lisp image is booted, CL-HTTP-Init.lisp should reload the logical pathname translations from http:mcl;translations.lisp, perform a standard server configuration, load an exports file, and enable HTTP service with http:enable-http-service. See the example init file in http;mcl;examples;cl-http-init.lisp. Otherwise, web configuration or the CL-HTTP toolbar item may be used to manually configure and launch the server.
When circumstances require saving configuration information and URL exports in lisp images, it is necessary to reconfigure the image and remap the URLs every time the image is booted on different host computers. Loading a configuration file like http:examples;configuration.lisp will update all the parameters, but it will be necessary to use url:remap-url-host to remap any local URLs from the old host to the new host.
When a server image is intended for users rather than developers, the binary image should be saved with the Digitool application generator in order to reduce the amount of disk space consumed by the application, and limit the facilities available to users.
If you have any questions or suggestions, send mail to www-cl@csail.mit.edu