mod_scheme is an embedded Scheme module for Apache2, much like mod_perl for Perl or mod_python for Python.

It works in every MPM that I have tried so far, but it is intended for use in worker, perchild, and winnt to gain the advantages of threading. mod_scheme currently uses TinyScheme, which is thread-safe (and tiny). Thus in threaded mode, Apache2 doesn't need to keep alive an interpreter for every connection -- mod_scheme keeps a pool of separate interps within one process, and assigns them to threads as they are needed. This allows much lower memory usage than, for example, mod_perl in Apache/prefork, which requires an interpreter in every connection.

I plan to develop it towards the fun parts of shared-memory access in threads, like a single session repository, database connection pooling, and central caching for memoized functions and the like. See Aolserver to get a good example of some of the things worth implementing.

TinyScheme is a full R4RS Scheme interpreter. As such, many of the useful things in R5RS are missing, which bites. I am working on linking in SLIB, to get some of that back. Alternatively, I might switch to Gauche, which is R5RS and has a bunch of extra features for scripting usage. I have played with Guile, but it is too far away from thread-safety to be useful in the near-term.

Log in or register to write something here or to contact authors.