57291edeb323e161f641ad5504de054e069761e2
[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 The latter is where it gets interesting. Session cookies are automatically
11 used to create application instances which are persistent in memory
12 (TODO: drop them after an application-specified timeout of course...)
13
14 As this is an entirely single-process application, it's perfectly possible
15 to keep large complex data structures around that would otherwise be
16 impossible to serialise (such as data structures from c-based python modules,
17 or persistent database connection objects).
18
19 One of the reasons why this code has been put together is so that GNUmed
20 can keep per-user persistent database connections open, where the user
21 credentials are *different* on a per-user basis. GNUmed uses postgresql
22 "roles" for security purposes, and thus a "global database connection"
23 which is the "norm" for most web-based database frameworks, is completely
24 useless.
25