Re: [Zope-dev] Serving large files
Sidnei da Silva wrote: > On Sun, Sep 17, 2006 at 09:24:40PM +0200, Christian Theune wrote: > | I wonder whether this statement is true: > | > |Any connection handed out after the connection breaks the ACID > |compliance of the request. > | > | I think this is because: > | > |When finishing the actual work we have to either commit or abort the > |running transaction. > | > |In the time until we set up another transaction, there already might > |have been a change to the database by a third transaction, making the > |request neither isolated nor atomic. > > Suppose the request finishes with 'tid=X' and that it should be > possible to open a read-only connection which would be a snaphsot of > the database at 'tid=X'? Jup. That's what I was thinking about. But what then. Then you end up again with "application code" that needs to do work. (In the iterator.) The thing about the iterator is that currently (I think) it is assumed that all resources are cleaned up by GC. If you do this however, I suspect you have to do work to get rid of the resources you allocated (a transaction, a connection, ...) Christian -- gocept gmbh & co. kg - forsterstraße 29 - 06112 halle/saale - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 - fax +49 345 122 9889 1 - zope and plone consulting and development signature.asc Description: OpenPGP digital signature ___ Zope-Dev maillist - Zope-Dev@zope.org 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] Serving large files
On Sun, Sep 17, 2006 at 09:24:40PM +0200, Christian Theune wrote: | I wonder whether this statement is true: | |Any connection handed out after the connection breaks the ACID |compliance of the request. | | I think this is because: | |When finishing the actual work we have to either commit or abort the |running transaction. | |In the time until we set up another transaction, there already might |have been a change to the database by a third transaction, making the |request neither isolated nor atomic. Suppose the request finishes with 'tid=X' and that it should be possible to open a read-only connection which would be a snaphsot of the database at 'tid=X'? -- Sidnei da Silva Enfold Systemshttp://enfoldsystems.com Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214 signature.asc Description: Digital signature ___ Zope-Dev maillist - Zope-Dev@zope.org 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] Serving large files
Hi, Sidnei da Silva wrote: > I remember having a conversation with Jim at some point where he > proposed a strategy for requests that could potentially take a long > time to finish. If I recall correctly, he proposed having a separate > ZODB connection pool. > > One thing that is problematic today is serving large files > from the ZODB (ignoring the upcoming blob support). > > a) You can't return an iterator that reads from the ZODB, because by >the time the iterator is consumed the connection has already been >closed. I believe the iterator is not consumed in the same thread, >which can cause yet more issues. > > b) If you dump the data to a temp file and return that as a file >iterator, it can potentially take twice the time. > > c) If you use RESPONSE.write() you can break other >applications. ExternalEditor comes to mind. > > d) If you just return the file as a string you can potentially run out >of memory if the file is too big. > > I would like to be able to return an iterator that can read from the > ZODB. That would probably benefit the WSGI integration as well. Anyone > has ideas about how to solve this? I wonder whether this statement is true: Any connection handed out after the connection breaks the ACID compliance of the request. I think this is because: When finishing the actual work we have to either commit or abort the running transaction. In the time until we set up another transaction, there already might have been a change to the database by a third transaction, making the request neither isolated nor atomic. My statement is probably only true for all solutions not paying attention to the statement. ;) Christian -- gocept gmbh & co. kg - forsterstraße 29 - 06112 halle/saale - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 - fax +49 345 122 9889 1 - zope and plone consulting and development signature.asc Description: OpenPGP digital signature ___ Zope-Dev maillist - Zope-Dev@zope.org 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] Serving large files
Sidnei da Silva schrieb: I remember having a conversation with Jim at some point where he proposed a strategy for requests that could potentially take a long time to finish. If I recall correctly, he proposed having a separate ZODB connection pool. One thing that is problematic today is serving large files from the ZODB (ignoring the upcoming blob support). a) You can't return an iterator that reads from the ZODB, because by the time the iterator is consumed the connection has already been closed. I believe the iterator is not consumed in the same thread, which can cause yet more issues. ... I would like to be able to return an iterator that can read from the ZODB. That would probably benefit the WSGI integration as well. Anyone has ideas about how to solve this? It should be possible to feed a fifo (at least on unix) and reopen the connection each time via publisher or something alike (similar to the retry mechanism on database conflicts) and fill the buffer again. Regards Tino ___ Zope-Dev maillist - Zope-Dev@zope.org 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 )
[Zope-dev] Serving large files
I remember having a conversation with Jim at some point where he proposed a strategy for requests that could potentially take a long time to finish. If I recall correctly, he proposed having a separate ZODB connection pool. One thing that is problematic today is serving large files from the ZODB (ignoring the upcoming blob support). a) You can't return an iterator that reads from the ZODB, because by the time the iterator is consumed the connection has already been closed. I believe the iterator is not consumed in the same thread, which can cause yet more issues. b) If you dump the data to a temp file and return that as a file iterator, it can potentially take twice the time. c) If you use RESPONSE.write() you can break other applications. ExternalEditor comes to mind. d) If you just return the file as a string you can potentially run out of memory if the file is too big. I would like to be able to return an iterator that can read from the ZODB. That would probably benefit the WSGI integration as well. Anyone has ideas about how to solve this? -- Sidnei da Silva Enfold Systemshttp://enfoldsystems.com Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214 ___ Zope-Dev maillist - Zope-Dev@zope.org 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 )
[Zope-dev] Re: WebDAV PUT factory tests failing on 2.10 branch
--On 17. September 2006 12:38:11 +0200 Philipp von Weitershausen <[EMAIL PROTECTED]> wrote: AFAIK, Stefan Hollek checked it in to demonstrate an incompatibility of Zope 2.10 vs. 2.9. See http://www.zope.org/Collectors/Zope/2187. Ahh..I remember. @Stefan: is this a blocker? Any chance to get this fixed? Andreas pgpPZ8CyIWHxw.pgp Description: PGP signature ___ Zope-Dev maillist - Zope-Dev@zope.org 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 )
[Zope-dev] Re: WebDAV PUT factory tests failing on 2.10 branch
AFAIK, Stefan Hollek checked it in to demonstrate an incompatibility of Zope 2.10 vs. 2.9. See http://www.zope.org/Collectors/Zope/2187. Andreas Jung wrote: Those two tests are currently failing on the 2.10 branch (updated with the Zope 3.3.0rc1 code). Any hints? Andreas --- Error in test testSubfolderInsideOutVirtualHosting (webdav.tests.testPUT_factory.TestPUTFactory) Traceback (most recent call last): File "/opt/python-2.4.3/lib/python2.4/unittest.py", line 260, in run testMethod() File "/develop/sandboxes/Zope-2.10/Zope/lib/python/webdav/tests/testPUT_factory.py", line 66, in testSubfolderInsideOutVirtualHosting put = request.traverse('/VirtualHostBase/http/foo.com:80/folder/VirtualHostRoot/_vh_foo/doc') File "/develop/sandboxes/Zope-2.10/Zope/lib/python/ZPublisher/BaseRequest.py", line 463, in traverse subobject = self.traverseName(object, entry_name) File "/develop/sandboxes/Zope-2.10/Zope/lib/python/ZPublisher/BaseRequest.py", line 318, in traverseName ob2 = adapter.publishTraverse(self, name) File "/develop/sandboxes/Zope-2.10/Zope/lib/python/ZPublisher/BaseRequest.py", line 77, in publishTraverse subobject=object.__bobo_traverse__(request, name) File "/develop/sandboxes/Zope-2.10/Zope/lib/python/webdav/NullResource.py", line 67, in __bobo_traverse__ raise Conflict, 'Collection ancestors must already exist.' Conflict: Collection ancestors must already exist. . Error in test testSubfolderVirtualHosting (webdav.tests.testPUT_factory.TestPUTFactory) Traceback (most recent call last): File "/opt/python-2.4.3/lib/python2.4/unittest.py", line 260, in run testMethod() File "/develop/sandboxes/Zope-2.10/Zope/lib/python/webdav/tests/testPUT_factory.py", line 54, in testSubfolderVirtualHosting put = request.traverse('/VirtualHostBase/http/foo.com:80/folder/VirtualHostRoot/doc') File "/develop/sandboxes/Zope-2.10/Zope/lib/python/ZPublisher/BaseRequest.py", line 463, in traverse subobject = self.traverseName(object, entry_name) File "/develop/sandboxes/Zope-2.10/Zope/lib/python/ZPublisher/BaseRequest.py", line 318, in traverseName ob2 = adapter.publishTraverse(self, name) File "/develop/sandboxes/Zope-2.10/Zope/lib/python/ZPublisher/BaseRequest.py", line 77, in publishTraverse subobject=object.__bobo_traverse__(request, name) File "/develop/sandboxes/Zope-2.10/Zope/lib/python/webdav/NullResource.py", line 67, in __bobo_traverse__ raise Conflict, 'Collection ancestors must already exist.' Conflict: Collection ancestors must already exist. ___ Zope-Dev maillist - Zope-Dev@zope.org 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 ) ___ Zope-Dev maillist - Zope-Dev@zope.org 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 )
[Zope-dev] WebDAV PUT factory tests failing on 2.10 branch
Those two tests are currently failing on the 2.10 branch (updated with the Zope 3.3.0rc1 code). Any hints? Andreas --- Error in test testSubfolderInsideOutVirtualHosting (webdav.tests.testPUT_factory.TestPUTFactory) Traceback (most recent call last): File "/opt/python-2.4.3/lib/python2.4/unittest.py", line 260, in run testMethod() File "/develop/sandboxes/Zope-2.10/Zope/lib/python/webdav/tests/testPUT_factory.py", line 66, in testSubfolderInsideOutVirtualHosting put = request.traverse('/VirtualHostBase/http/foo.com:80/folder/VirtualHostRoot/_vh_foo/doc') File "/develop/sandboxes/Zope-2.10/Zope/lib/python/ZPublisher/BaseRequest.py", line 463, in traverse subobject = self.traverseName(object, entry_name) File "/develop/sandboxes/Zope-2.10/Zope/lib/python/ZPublisher/BaseRequest.py", line 318, in traverseName ob2 = adapter.publishTraverse(self, name) File "/develop/sandboxes/Zope-2.10/Zope/lib/python/ZPublisher/BaseRequest.py", line 77, in publishTraverse subobject=object.__bobo_traverse__(request, name) File "/develop/sandboxes/Zope-2.10/Zope/lib/python/webdav/NullResource.py", line 67, in __bobo_traverse__ raise Conflict, 'Collection ancestors must already exist.' Conflict: Collection ancestors must already exist. . Error in test testSubfolderVirtualHosting (webdav.tests.testPUT_factory.TestPUTFactory) Traceback (most recent call last): File "/opt/python-2.4.3/lib/python2.4/unittest.py", line 260, in run testMethod() File "/develop/sandboxes/Zope-2.10/Zope/lib/python/webdav/tests/testPUT_factory.py", line 54, in testSubfolderVirtualHosting put = request.traverse('/VirtualHostBase/http/foo.com:80/folder/VirtualHostRoot/doc') File "/develop/sandboxes/Zope-2.10/Zope/lib/python/ZPublisher/BaseRequest.py", line 463, in traverse subobject = self.traverseName(object, entry_name) File "/develop/sandboxes/Zope-2.10/Zope/lib/python/ZPublisher/BaseRequest.py", line 318, in traverseName ob2 = adapter.publishTraverse(self, name) File "/develop/sandboxes/Zope-2.10/Zope/lib/python/ZPublisher/BaseRequest.py", line 77, in publishTraverse subobject=object.__bobo_traverse__(request, name) File "/develop/sandboxes/Zope-2.10/Zope/lib/python/webdav/NullResource.py", line 67, in __bobo_traverse__ raise Conflict, 'Collection ancestors must already exist.' Conflict: Collection ancestors must already exist. pgpZh088kZsvm.pgp Description: PGP signature ___ Zope-Dev maillist - Zope-Dev@zope.org 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 )
[Zope-dev] buildbot failure in Zope branches 2.10 2.4 Linux zc-buildbot
The Buildbot has detected a failed build of Zope branches 2.10 2.4 Linux zc-buildbot. Buildbot URL: http://buildbot.zope.org/ Build Reason: changes Build Source Stamp: 7699 Blamelist: andreasjung BUILD FAILED: failed test sincerely, -The Buildbot ___ Zope-Dev maillist - Zope-Dev@zope.org 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 )
[Zope-dev] buildbot failure in Zope branches 2.10 2.4 Linux zc-buildbot
The Buildbot has detected a failed build of Zope branches 2.10 2.4 Linux zc-buildbot. Buildbot URL: http://buildbot.zope.org/ Build Reason: changes Build Source Stamp: 7698 Blamelist: andreasjung,benji_york,chrism,ctheune,dobe,fdrake,flox,jim,jukart,mgedmin,poster,rogerineichen,srichter BUILD FAILED: failed test sincerely, -The Buildbot ___ Zope-Dev maillist - Zope-Dev@zope.org 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 )