Racket mongrel2 Adapter
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.
A Racket mongrel2 handler must meet 3 API requirements.
- It must be a lambda expression / procedure
- The lambda expression must accept one paramater - a mongrel2-request struct
- 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
The source code is located at http://github.com/neomantic/racket-mongrel2-adapter
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.