On Thu, Sep 17, 2009 at 9:03 AM, Chris <[email protected]> wrote: > > I posted over on the mongodb-user group and the developer of pymongo > stated that it should be ok to share the global connection across > threads. I suppose that means it is thread-safe, although it was not > explicitly stated such. > http://groups.google.com/group/mongodb-user/browse_thread/thread/9e98b2c41845c9da
It may be that key-value databases / document-oriented databases don't have the threading problems relational databases do. From my little understanding of CouchDB, all writes modify entire records atomically, and all reads generate a snapshot of data which is then off-line as far as the database is concerned. Whereas in a relational database, writes may modify individual fields in a record, and reads may keep a stateful pointer into the database (if you use that USE_RESULT option, which few people do). Plus a transaction may be held open for an arbitrarily long time, and you have to join tables, and SQLAlchemy has to synchronize database records to Python instances. On the other hand, Durus is not thread safe without a daemon, and Zope needs an extra layer in multithreaded environments. -- Mike Orr <[email protected]> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
