Re: [Zope3-Users] Re: Blobs in Z3 anyone?

2006-04-20 Thread Chris McDonough

On Apr 20, 2006, at 3:54 AM, Philipp von Weitershausen wrote:


Chris McDonough wrote:

Actually, stream iterator support is independent of blobs.


Right. Also, dealing with long-living requests or dribbling data piece
by piece is substantially something different than streaming large  
data
to the user agent without holding application resources forever.  
I'm not

sure Zope 2 actually differentiates between those two.


It indeed does.  The former is implemented as RESPONSE.write, the  
latter is implemented as returning something implementing  
IStreamIterator to the publisher.




There was some talk a while back about Zope 3 implementing some  
form of
IResult interface that allowed for streaming.  I'm not sure  
where that

ended up, though.  I seem to remember Jim checking something in.


Yes, there is support for streaming large data without holding
application resources. What you do is write the data to a (temp) 
file and

return the file object. The zope.publisher will know what to do. The
IResult interface was made private and nowadays just an  
implementation

detail.


Right, now I remember.  Thanks.

- C

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: Blobs in Z3 anyone?

2006-04-19 Thread Chris McDonough


On Apr 19, 2006, at 10:28 PM, David Pratt wrote:

Hi Chris. This is great. I was going to ask Philipp about streaming  
but thought once I had contacted you I would ask you since this is  
an important part of large file handling. Can you tell me how far  
along the ZODB blob support has advanced? Where is the project is  
located? I am keen on how objects will use blob storage direct with  
ZODB. I have been working with PGStorage and as an alternate  
backend to ZODB. I will be interested to see how blob storage will  
be handled selectively.


The zodb code is on the blob-merge-branch of ZODB in Zope's  
subversion repository.  I'm not sure when it's going to land in an  
actual ZODB release.  I'm fighting a bunch  of fires at the moment  
and it's on the backburner as a result. :-(




In building a repository product for Z2, I was concerned about the  
number of objects per folder so it automatically generated new  
folders for storage to keep the number of objects per folder to a  
max of 5000 since so it is easier for os utilities to handle.


The blob stuff creates a directory hierarchy that should nominally  
prevent too many files from ending up in any given directory.




Should this discussion be moved to a different list?


I think this is fine, although the typical place for ZODB discussion  
is zodb-dev.


- C

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Re: Blobs in Z3 anyone?

2006-04-18 Thread Philipp von Weitershausen
David Pratt wrote:
 Hi I had asked this question about a week ago with no response.
 Filesystem blobs are a valuable means of storing large object data in
 the filesystem instead of the ZODB.  I have previously written a
 repository product in zope2 for blobs but would like to migrate to Z3.
 Does Z3 have an equivalent stream iterator of that of zpublisher? How
 are large objects currently handled in Z3 to get them into the DB
 efficiently if this is not the case? Many thanks.

Christian Theune and Chris McDonough have been working on ZODB blob
support for a while. The ZODB as our persistence layer is the right
level to add blob support, not Zope 3. Once in the ZODB, blobs can be
used across both Zope versions.

Perhaps you might want to contact them and ask them whether you can help
with something so that blobs will make it into ZODB 3.7 (scheduled to be
released with Zope 2.10/3.3)

Philipp

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users