MUG '02 -- 16th Daylight User Group Meeting -- 26 Feb - 1 Mar 2002
HTTP Toolkit
Dave Weininger, Daylight CIS

To be covered:

  1. HTTP service as program paradigm
  2. The HTTP toolkit supports the HTTP object
  3. HTTP toolkit: object properties
  4. New concepts
  5. /factory services
  6. A microserver example: ethanol
  7. A full-featured example: logpstar
  8. Other cool stuff.
  9. ... in conclusion ...

1.  HTTP service as program paradigm

Goals haven't changed much since this was presented at EuroMUG 2000.

2.  The HTTP toolkit supports the HTTP object


3.  HTTP toolkit: object properties


4.  New concepts


5.  /factory services

The HTTP toolkit provides a set of built-in resources, to enhance robustness and convenience. The caller's _loop_cb method is invoked for /factory URI's; such requests can be denied (return 403 Forbidden or 404 Not Found) use the intrinsic service (return 303 Moved Temporarily), or serviced in the normal manner (overriding intrinsic behavior).

6.  A microserver example: ethanol

You've heard of microbreweries? Here's a microserver.
$ make ethanol
/opt/SUNWspro/bin/cc -v -Xc -DDP_SOLARIS -D_POSIX_PTHREAD_SEMANTICS -D_REEN
...
$ strip ethanol
$ ls -l ethanol
-rwxr-xr-x   1 dave     staff       6748 Feb 23 17:29 ethanol
$ ./ethanol
ethanol server starting up on port 22002

And the link <A HREF='http://sun2.daylight.com:22002/'>.

The small size of the executable (6748 bytes) is due to linking against the SMILES and HTTP libraries in run time ... but any way you cut it, those are 6748 hard-working bytes! Simple as this example is, it meets the ambitious requirements listed at the beginning of this talk.


7.  A full-featured example: logpstar

The 4.81 release will have this as a programming example in contrib, or something like it.
<A HREF='http://sun2.daylight.com:11053/'>.

8.  Other cool stuff


9.  ... in conclusion ...