[version 0.8.1 ediware**20070404170018] { hunk ./CHANGELOG 1 +Version 0.8.1 +2007-04-04 +Added HUNCHENTOOT-MP package (suggested by Cyrus Harmon) +Only invoke MARK-AND-SWEEP for 32-bit versions of LW (thanks to Chris Dean) +Exported REASON-PHRASE + hunk ./doc/index.html 111 +
  • The HUNCHENTOOT-MP package +
  • Performance hunk ./doc/index.html 131 -
  • and my own Chunga, CL-PPCRE, and URL-REWRITE (plus CL-WHO for the example code). +
  • and my own FLEXI-STREAMS, Chunga, CL-PPCRE, and URL-REWRITE (plus CL-WHO for the example code). hunk ./doc/index.html 141 -current version is 0.8.0. There's also a port +current version is 0.8.1. There's also a port hunk ./doc/index.html 2108 +


    [Function] +
    reason-phrase return-code => string + +


    Returns a reason phrase for the HTTP return +code return-code (which should be an integer) +or NIL for return codes Hunchentoot doesn't know. +
    + +
     

    The HUNCHENTOOT-MP package

    + +Hunchentoot creates an +additional package HUNCHENTOOT-MP +which exports a couple of MP-related symbols +(namely MAKE-LOCK, WITH-LOCK, PROCESS-RUN-FUNCTION, +and PROCESS-KILL). These functions and macros have to be +in Hunchentoot's small portability shim anyway and even if you don't +spawn your own threads there might be occasions where you want to at +least use the lock-related functionality to write thread-safe portable +code. See the corresponding documentation strings and/or the source +code for more information. + +
     

    Performance

    + +If you're concerned about Hunchentoot's performance, you should first +and foremost check if you aren't wasting your time with premature +optimization. Make a reasonable estimate of the amount of traffic +your website should be able to handle and don't try to benchmark for +loads Google would be proud of. Here's a part of an interview with +someone called John Witchel about his experiences with his +company Red Gorilla that can't be quoted often enough (it +seems the original source of the interview has vanished): + +
    +Q: If you could go back and change anything, would Red Gorilla still be +in business today? +

    +A: Yes. I would start small and grow as the demand grew. That's what I'm +doing now. +

    +Back then we planned to be huge from the outset. So we built this +monster platform on BEA, Sun and Oracle. We had huge dedicated +connectivity pipes. We had two full racks clustered and fully +redundant. We had E450's with RAID-5 and all 4 CPU slots filled, +E250s, F5 load balancers... the cost of keeping that system on was +enormous. The headcount to keep it humming was enormous too. +

    +The truth is, we could have run the whole company on my laptop using a +cable modem connection. +

    + +Having said that, my experience is that Hunchentoot doesn't have to +hide behind Apache when it comes to +serving static files. If +you really have performance problems with Hunchentoot, there +are two things I'm aware of you should watch out for. + + hunk ./doc/index.html 2376 +
  • reason-phrase hunk ./doc/index.html 2452 -$Header: /usr/local/cvsrep/hunchentoot/doc/index.html,v 1.74 2007/03/30 23:59:29 edi Exp $ +$Header: /usr/local/cvsrep/hunchentoot/doc/index.html,v 1.76 2007/04/04 07:52:09 edi Exp $ hunk ./headers.lisp 2 -;;; $Header: /usr/local/cvsrep/hunchentoot/headers.lisp,v 1.16 2007/03/30 22:08:48 edi Exp $ +;;; $Header: /usr/local/cvsrep/hunchentoot/headers.lisp,v 1.17 2007/04/02 21:21:06 edi Exp $ hunk ./headers.lisp 92 - (status-line (status-line return-code)) + (reason-phrase (reason-phrase return-code)) hunk ./headers.lisp 125 - (unless status-line + (unless reason-phrase hunk ./headers.lisp 130 - status-line (status-line return-code))) + reason-phrase (reason-phrase return-code))) hunk ./headers.lisp 147 - (format nil "~D ~A

    ~A

    ~A


    ~A

    " - return-code status-line status-line + (format nil "~D ~A

    ~:*~A

    ~A


    ~A

    " + return-code reason-phrase hunk ./headers.lisp 168 - (write-header-line t "Status" (format nil "~D ~A" return-code status-line))) + (write-header-line t "Status" (format nil "~D ~A" return-code reason-phrase))) hunk ./headers.lisp 171 - (format nil "HTTP/1.1 ~D ~A" return-code status-line))) + (format nil "HTTP/1.1 ~D ~A" return-code reason-phrase))) hunk ./headers.lisp 304 - (status-line +http-continue+)))) + (reason-phrase +http-continue+)))) hunk ./hunchentoot.asd 2 -;;; $Header: /usr/local/cvsrep/hunchentoot/hunchentoot.asd,v 1.28 2007/03/30 23:59:28 edi Exp $ +;;; $Header: /usr/local/cvsrep/hunchentoot/hunchentoot.asd,v 1.29 2007/04/04 07:52:06 edi Exp $ hunk ./hunchentoot.asd 37 -(defvar *hunchentoot-version* "0.8.0" +(defvar *hunchentoot-version* "0.8.1" hunk ./packages.lisp 2 -;;; $Header: /usr/local/cvsrep/hunchentoot/packages.lisp,v 1.24 2007/03/30 22:08:48 edi Exp $ +;;; $Header: /usr/local/cvsrep/hunchentoot/packages.lisp,v 1.25 2007/04/04 07:52:06 edi Exp $ hunk ./packages.lisp 32 +(defpackage :hunchentoot-mp + (:nicknames :tbnl-mp) + (:export :make-lock + :with-lock + :process-run-function + :process-kill)) + hunk ./packages.lisp 41 - (:use :cl :cl-ppcre :chunga :flexi-streams :url-rewrite) + (:use :cl :cl-ppcre :chunga :flexi-streams :url-rewrite :hunchentoot-mp) hunk ./packages.lisp 219 + + hunk ./port-sbcl.lisp 2 -;;; $Header: /usr/local/cvsrep/hunchentoot/port-sbcl.lisp,v 1.10 2007/03/09 10:50:24 edi Exp $ +;;; $Header: /usr/local/cvsrep/hunchentoot/port-sbcl.lisp,v 1.11 2007/04/04 07:52:06 edi Exp $ hunk ./port-sbcl.lisp 71 + (declare (ignorable name)) hunk ./test/test.lisp 2 -;;; $Header: /usr/local/cvsrep/hunchentoot/test/test.lisp,v 1.17 2007/03/09 12:20:57 edi Exp $ +;;; $Header: /usr/local/cvsrep/hunchentoot/test/test.lisp,v 1.18 2007/04/02 21:21:19 edi Exp $ hunk ./test/test.lisp 56 - (let ((=value= (gensym))) + (let ((=value= (gensym)) + (=first= (gensym))) hunk ./test/test.lisp 72 - for first = t then nil - unless first + for ,=first= = t then nil + unless ,=first= hunk ./util.lisp 2 -;;; $Header: /usr/local/cvsrep/hunchentoot/util.lisp,v 1.24 2007/03/30 08:16:06 edi Exp $ +;;; $Header: /usr/local/cvsrep/hunchentoot/util.lisp,v 1.26 2007/04/04 07:52:06 edi Exp $ hunk ./util.lisp 153 -(defun status-line (return-code) - "Returns a meaningful status line for the http return code -RETURN-CODE \(which should be an integer) or NIL for uncommon return -codes." +(defun reason-phrase (return-code) + "Returns a reason phrase for the HTTP return code RETURN-CODE +\(which should be an integer) or NIL for return codes Hunchentoot +doesn't know." hunk ./util.lisp 464 - "The default for *CLEANUP-FUNCTION*. Invokes a GC on LispWorks and -does nothing on other Lisps." - #+:lispworks + "The default for *CLEANUP-FUNCTION*. Invokes a GC on 32-bit +LispWorks and does nothing on other Lisps." + #+(and :lispworks (not :lispworks-64bit)) hunk ./util.lisp 468 + }