[Twisted-Python] Twisted - SQLite and SQLObject

Ken Kinder kkinder at gmail.com
Tue Oct 25 11:47:26 MDT 2005


On 10/25/05, Jim McCoy <jim.mccoy at gmail.com> wrote:
>
> If you are going to use sqlite/sqlobject as an embedded db (as the
> original poster suggested) then you are probably better off just
> writing your own deferred wrapper for your sql ops. Treat your db
> access (at least your select/set/update ops on your SQLObject schema
> classes) as you would any other blocking operation; if your db is not
> huge you can probably be more productive by applying twisted to other
> parts of your application.
>
> Since you are using sqlite as an embedded db you are not going to get
> any benefit from the connection marshalling and threading that seems
> to be t.enterprise.adbapi's raison d'etre. Rather than digging into
> the adbapi docs or looking at axiom you would probably be better
> served by just building a wrapper around your db that returns
> deferred's for the various db CRUD operations.
>
> Jim


I've been using an in-memory sqlite database with trivial amounts of data
and actually have been treating it as non-blocking. You wouldn't defer
moving around python data structures, and in my experience, for a small
in-memory sqlite database, you get better performance using it synchronously
inline.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20051025/ab92e8c6/attachment.html>


More information about the Twisted-Python mailing list