[PEAK] Including PySQLite in PEAK

Phillip J. Eby pje at telecommunity.com
Mon Dec 6 19:40:56 EST 2004


Does anybody see any place where problems might arise from including 
PySQLite in PEAK?  Any objections?  Preference as to whether it should get 
stuck under peak.util or just installed at the main level?  Should the 
default SQLite connection object use the bundled sqlite module?

There are several places that I'm thinking PySQLite would be useful to have 
as "standard equipment" in PEAK.  For one thing, its "memory" mode 
(acessible in PEAK by looking up "sqlite::memory:") allows you to have a 
scratch database, which is invaluable for testing things that need to run 
against a database, when you don't want to actually create a database.

For another, its small footprint and single-file basis makes it an 
excellent choice for applications' writable run-time configuration (such as 
user preferences) or for implementing persistent registries of various 
types.  (And for transient registries, the memory mode will do just fine.)

One particular kind of registry that would be handy to implement would be a 
persistent naming service.  Currently, all of PEAK's naming services are 
read-only, although some are based on files that can be edited in order to 
modify values.  It would be nice to have a naming service that you can 
actually store things in, for example by using n2 as an 
editor.  Applications could then depend on the availability of a suitable 
naming or preference service, rather than directly writing to SQLite or 
having to create their own configuration file formats.

There are, of course, many applications that SQLite is not suitable for; 
anything that requires high-concurrency write support, for 
example.  However, it does not have any obvious impediments for 
frequent-read infrequent-write scenarios of the kind that are needed for 
run-time configuration and naming services.

However, I personally have only extremely limited experience with SQLite's 
actual performance and reliability in practice, so I would be very 
interested to hear from anyone who has more experience using it.




More information about the PEAK mailing list