A mongrel2 webserver adapter written in Racket Scheme
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Racket mongrel2 Adapter

A mongrel2 adapter written in Racket Scheme.

Design Goals

This mongrel2 Racket adapter facilitates the communication between a mongrel2 webserver and a mongrel2 handler which follows the API described below. It does not attempt to craft or manipulate either the http request/response headers or the http request/response body between the handler and the adapter. Processing a http request and creating a valid http response is delegated to and the sole responsibility of the handler.


  • mongrel2 (tested using mongrel2 1.7.5)
  • the 0mq library
  • (require (planet jaymccarthy/zeromq:2:1/zmq)))
  • (require (planet gerard/tnetstrings:1:0)))


An example is supplied in the example directory. It simply shows a primitive mongrel2 handler following the API requirements below.

Handler Requirements

A Racket mongrel2 handler must meet 3 API requirements.

  1. It must be a lambda expression / procedure
  2. The lambda expression must accept one paramater - a mongrel2-request struct
  3. It must return a mongrel2-response struct that contains...
    • the server-uuid (available in the mongrel2-request struct)
    • a source id (also available in mongrel2-request struct) contained in a list
    • an an option string body

Source code

The source code is located at http://github.com/neomantic/racket-mongrel2-adapter

Release status

As of commit 8cafec8c, this is a beta release. Code reviews and comments are greatly appreciated, and would bring this release out of beta. Between beta and a full release, the API will most likely change and be polished. Additionally, unit-tests and more documentation will be added.

Issues and feature requests

Please use the issue tracker supplied by github for this repository.


This source code is licensed under the GPL v3. See the LICENSE document included with source code for the full terms of use.