I’m in the process of developing a portable web app using python/cherrypy, which I’d like to ideally be able to simply extract to a folder and not have to install anything. One of the things potentially preventing this is my database back end. Most similar set ups seem to use SQLite, however I have a few concerns, as I may have up to 30 people connected to my server at once and am worried the write exclusive locks will have a large impact.
My questions:
- How badly will SQLite struggle with handling up to 30 connections attempting to read, with a few of those attempting to write, at the same time? What kind of wait time might an insert cause for people trying to read from the database?
- Does anyone have any alternative suggestions? I’d like to avoid MySQL as I have some commercial aspirations for my project, though if it’s necessary I’ll go down that route. I’d probably give up full portability and require a PostgreSQL install before I commit to MySQL though….
- Is it plausible to have a single desktop serving that many connections as long as bandwidth isn’t an issue?
Thanks in advance for your help, and apologies if I’m asking anything obvious or that’s been answered previously (I’ve spent a decent amount of time searching on here/online and haven’t seen anything definitive).
-repole
EDIT: By the way, some useful discussion here for anyone who stumbles upon this question later.
There are some pure python databases out there, not sure how good or stable they are:
If you are worried about licenses for distribution, then check out stuff with an Apache license. One of the currently hosted top tier database projects is CouchDB. Main issue I see is that distribution is not as easy as simply including a Python module.
Not sure what the architecture is like on your web app, but multiple Sqlite databases could be used to get around the locking issue.
Another option is Berkeley DB: http://docs.python.org/library/bsddb.html