move example to different port
[multitaskhttpd.git] / README
1 multitaskhttpd is a project to provide a single-process cooperative
2 multitasking web server toolkit, using multitask.py.
3
4 So far, this includes a basic HTTP server based on SimpleHTTPServer:
5 python httpd.py -d
6
7 and a JSONRPC test application:
8 python jsonapp.py
9
10 then run the jsonrpclib test:
11 python testjsonrpc.py
12
13 The jsonapp.py is where it gets interesting. Session cookies are automatically
14 used to create application instances which are persistent in memory
15 (TODO: drop them after an application-specified timeout of course...)
16
17 As this is an entirely single-process application, it's perfectly possible
18 to keep large complex data structures around that would otherwise be
19 impossible to serialise (such as data structures from c-based python modules,
20 or persistent database connection objects).
21
22 One of the reasons why this code has been put together is so that GNUmed
23 can keep per-user persistent database connections open, where the user
24 credentials are *different* on a per-user basis. GNUmed uses postgresql
25 "roles" for security purposes, and thus a "global database connection"
26 which is the "norm" for most web-based database frameworks, is completely
27 useless.
28
29