[Tutor] Web programming
Alan Gauld
alan.gauld at btinternet.com
Sun Nov 18 00:32:01 CET 2007
"Dinesh B Vadhia" <dineshbvadhia at hotmail.com> wrote
> web application consisting of a client that makes simple queries
> to a backend which returns data from a database (initially
> pysqlite3).
When you say a client do you mean a robotic browser?
Or do you mean the web application will be a client/server
architecture?
> Are the Python urlparse, urllib, urllib2,
These will build a robotic client of that's what you need.
> httplib,
You probably won't need this if it's just a simple app.
> BaseHTTPServer, SimpleHTTPServer etc.
These are OK to start with but you will also need the
cgi module to create the server code
> The number of queries per second will initially be low, in the
> 10's/second.
tens per second is quite high for a simple CGI app
accessing a database. Up to 10 per second should be fine but
if you get up to 20,30 or more I'd consider using a real web
server (Apache or a simpler one like Xitami) and you may even
want to investigate fastCGI or some of the simpler web
frameworks like CherryPy.
Finally watch out for locking issues around the database
if your transactions are writing as well as reading data.
HTH,
--
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld
More information about the Tutor
mailing list