Elserv: Yet another HTTP server on Emacsen
Project Summary on SourceForge
[Japanese | English]
Elserv is an HTTP server which runs on Emacs.
Since Emacs does not support server sockets, Elserv runs dedicated server
process (ruby script) as a backend process and communicate with it to
provide a server feature on Emacs.
What's New
Check here.
Features
-
Easy to start a web server (Just execute an emacs command).
-
Dynamic content can be developed using emacs lisp.
-
Contents can be replaced by simply `eval'uating the lisp code.
-
HTTP 1.1 GET, HEAD, POST is supported.
Requirements
Download
Newest version is 0.4.0.
elserv-0.4.0.tar.gz
Install
- Extract tarball.
- Type `make install'. (If you want to install as XEmacs package, type `make install-package')
- Debian package is also available.
Usage
Call (require 'elserv), then execute `elserv-start'. it invokes a new server.
It listens on port 8000 (by default setting).
You can register your own content by the function `elserv-publish'.
Access logs are recorded on the buffer "*Log of elserv*".
The command `elserv-stop' or killing the buffer "*elserv*" stops the server process.
Application
demo
es-demo.el is a sample server for demonstration.
wiki
es-wiki.el is an interface for emacs-wiki.
MHC
es-mhc.el is an interface for MHC.
remote
remote.el is a web based remote controller for Emacs.
web-custom
web-custom.el is web version of custom.
Demonstration Video
Here is an Elserv demo video via emacs-w3m.
elserv-demo.tty
(requires ttyrec, japanese (euc-jp) terminal)
TODO
- Content-Encoding
- Content Negotiation
- Cookie
- SSL?
Mailing List
elserv-devel@lists.sourceforge.net is a mailing list for Elserv development.
To subscribe, goto the elserv-devel mailing list page.
CVS
See CVS document on SourceForge. modulename is "Elserv" (Note that first letter 'E' is upper case).
ViewCVS is here.
Related Work
- httpd.el is an HTTP server embedded in the Emacs. It is invoked via tcpserver or inetd.
- httpd-serve is an emacs featured web server written in python script (it uses httpd.el).
- AllegroServe is a web server which runs on common lisp system.
Evaluation
Evaluation by http_load:
% http_load -parallel 10 -seconds 2 elserv-test
171 fetches, 10 max parallel, 191349 bytes, in 2.00573 seconds
1119 mean bytes/connection
85.2557 fetches/sec, 95401.1 bytes/sec
msecs/connect: 0.203205 mean, 1.205 max, 0.082 min
msecs/first-response: 77.3926 mean, 133.693 max, 27.229 min
Access from localhost to localhost.
Target page is the top page of `elserv-demo'.
Environment: Celeron 400MHz, FreeBSD 3.5.1, Emacs 21.
Yuuichi Teranishi<teranisi@gohome.org>