From: Luke Kenneth Casson Leighton Date: Mon, 12 Jul 2010 22:34:39 +0000 (+0100) Subject: add demo README X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a7dc1d1aa7e2a547c6167b06e2c047ba1e475c78;p=multitaskhttpd.git add demo README --- diff --git a/README b/README new file mode 100644 index 0000000..5651454 --- /dev/null +++ b/README @@ -0,0 +1,22 @@ +So far, this includes a basic HTTP server based on SimpleHTTPServer: + python httpd.py -d + +and a JSONRPC test application: + python jsonapp.py + +The latter is where it gets interesting. Session cookies are automatically +used to create application instances which are persistent in memory +(TODO: drop them after an application-specified timeout of course...) + +As this is an entirely single-process application, it's perfectly possible +to keep large complex data structures around that would otherwise be +impossible to serialise (such as data structures from c-based python modules, +or persistent database connection objects). + +One of the reasons why this code has been put together is so that GNUmed +can keep per-user persistent database connections open, where the user +credentials are *different* on a per-user basis. GNUmed uses postgresql +"roles" for security purposes, and thus a "global database connection" +which is the "norm" for most web-based database frameworks, is completely +useless. +