Configuring CL-HTTP for MCL

  1. Basic Configuration
  2. Production Configuration
  3. AppleTalk & Standalone Configuration
  4. PowerBook Configuration
  5. Saving Binary Images

  1. Basic Configuration
  2. 1. Physical Memory: CL-HTTP runs well with 9192K bytes of memory and virtual memory turned off. You may want to set the preferred size of MCL using Get Info from the File Menu in the Finder on the MCL Application. You may be able to run with 6-8 megabytes if you do not intend to compile or use much space.
    2. Load Server:On a Macintosh, http:http;mac-sysdcl.lisp will just load the server while http:http;mac-start-server.lisp will load the server and start it running by automatically performing steps 3-5.
    3. Set Configuration Switches: Load Configuration.lisp or equivalent to initialize a number of variables controlling the operation of the server. The comments describe the significance of the various parameters. Consider enabling email so that automatic bug reporting and other programatic email transmission can work.
    4. Export URLs: Use http:export-url function to make URL available through the server.At first, load the examples in Exports.lisp. Then, you can adapt or extend these examples to meet your own needs.
    5. Start Server: Evaluate the function http:enable-http-service to start the server.
    6. Stop Server: Evaluate http:disable-http-service to stop the server. In MCL 2.0.1 or earlier, use Command-. before evaluating http:disable-http-service.

  3. Production Configuration
  4. Once you are ready to open up your server to production level loads, you can improve server performance by making the following changes to your version of Configuration.lisp:

    Keep Lisp in Foreground: MAC CL-HTTP is able to control the amount of the machine allocated to HTTP service most effectively when the CL-HTTP application is in the foreground. When it is in the background, scheduling depends on the whims of other applications running on the MAC. In general, fewer competing applications will mean better HTTP performance.
    Disable Log Domain Resolution: Set the variable http:*resolve-ip-addresses-for-log* to NIL or your machine be be bogged down trying to resolve client domain names.
    Disable Log Notifications: Turn off log notifications on the console with http:log-notifications-on.
    Turn off Virtual Memory Load up your server with enough physical memory so that you can run MCL without virtual memory turned on. This will reduce disk contention.
    Tune Simultaneous Connections: Adjust the number of simultaneous connections that you allow with http:set-maximum-number-of-connections.
    Enable Email Interface: Set the variable smtp:*network-mail-host* to the primary store-and-forward mail host at your site, and provide some alternates on smtp:*store-and-forward-mail-hosts* in case the primary mailer is unavailable. This will enable automatic bug reporting via www-utils:report-bug and allow response function to send email during www-utils:send-mail-from.

  5. AppleTalk & Standalone Configuration
  6. CL-HTTP can run over a AppleTalk network provided no domain names are resolved. 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 or to clients running on other hosts with a AppleTalk connection.

    MacTCP Configuration: Set MacTCP on both the server and client machines as follows:
    • Use AppleTalk.
    • Obtain address Manually.
    • Set IP Address uniquely.
    • Make sure AppleTalk is active.
    AppleTalk Configuration: Proceed with the Basic Configuration except substitute the configuration file, Configuration-Apple-talk.lisp or equivalent.
    Host Names: Domain names may be used after you have specified the mapping from the IP address to the host name in the Hosts file in your system folder. Here is an example of what might appear in your Macintosh HD:System Folder:Hosts file:
    Local-Host.Apple-talk.Net A 127.0.0.1 ;AppleTalk operation (stand alone)
    www.apple-talk.net CNAME Local-Host.Apple-talk.Net      ; canonical name
    This 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 files for each machines.

  7. PowerBook Configuration
  8. Disconnected Operation: Use the AppleTalk Configuration.
    Power Cycling: Disable the power saving feature whereby the computer conserves power by sleeping the computer.
    Sleeping: Make sure that the processor cannot go to sleep while Web serving and while the network is active.

  9. Saving Binary Images
  10. You can save a binary image containing CL-HTTP in order to reduce the time required to launch the server. These sever 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 Server: Load the server without any configuration file or URL exports into a fresh MCL image.
      (load "http:http;mac-sysdcl")
    Save Image: Save the application using:
      (ccl:save-application "CL-HTTP-major.minor" :init-file "CL-HTTP-Init.lisp")

    If it desired to have the server come up running when the image is launched, CL-HTTP-Init.lisp should reload the logical pathname translations from http:http;mac-translations.lisp, perform a standard server configuration, load an exports file, and enable HTTP service with http:enable-http-service. 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@ai.mit.edu