Re: [Zope-dev] ZODB with twisted web.
Syver Enstad wrote: I am checking out how to use ZODB with twisted web. Not sure, but you could check the SchoolTool project, which I know uses ZODB and twisted, just not sure if it uses twisted.web or not... Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZODB with twisted web.
On Fri, 2004-04-02 at 17:37, Dieter Maurer wrote: > Syver Enstad wrote at 2004-4-2 11:38 +0200: > >I am checking out how to use ZODB with twisted web. I thought that I > >would have the DB instance globally accesible and call the open method > >to get a connection on each request. I thought that if I use > >connection.getTransaction().commit() before sending the response I > >will commit on the connection for that request. Is this necesarily > >true when using twisted web because it is single threaded and it seems > >that ZODB finds the correct transaction by checking the thread. > > This is true only, when you are working with "local transaction mode" > (i.e. you are calling "connection.setLocalTransaction()"). > > Currently, this mode restricts you to a single transaction client. > Neither relational databases nor other transactional clients > understand this mode. Moreover, you cannot use "DBTab" to > "mount" several ZODB storages. > i wouldnt say it restricts you to a single txn client, local transaction mode with twisted allows for the primary goal of using single threaded twisted with zodb txn semantics bound to protocol instances/clients, and the txn framework is still perfectly capable, just that the resource integration of other txn aware resources needs to play well with zodb conn based txns, which basically rules out most of the existing zope products as they use a global accessor to the transaction as opposed to call getTransaction on a conn which would still allow zodb to play a txn authority/manager role. but at the level of using twisted and zodb directly those products wouldn't likely be all that useful. -cheers, -kapil ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZODB with twisted web.
Syver Enstad wrote at 2004-4-2 11:38 +0200: >I am checking out how to use ZODB with twisted web. I thought that I >would have the DB instance globally accesible and call the open method >to get a connection on each request. I thought that if I use >connection.getTransaction().commit() before sending the response I >will commit on the connection for that request. Is this necesarily >true when using twisted web because it is single threaded and it seems >that ZODB finds the correct transaction by checking the thread. This is true only, when you are working with "local transaction mode" (i.e. you are calling "connection.setLocalTransaction()"). Currently, this mode restricts you to a single transaction client. Neither relational databases nor other transactional clients understand this mode. Moreover, you cannot use "DBTab" to "mount" several ZODB storages. Jeremy is working on a new transaction interface for Zope 2.8./ZODB 3.3 I expect that it will fully support a thread independent transaction mode. -- Dieter ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )