1 multitaskhttpd is a project to provide a single-process cooperative
2 multitasking web server toolkit, using multitask.py.
4 So far, this includes a basic HTTP server based on SimpleHTTPServer:
7 and a JSONRPC test application:
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...)
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).
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