> From: "Emiliano Heyns" <[EMAIL PROTECTED]>
> The problem with this approach is that you certainly don't want to
> server BLOBs this way. BSOBs, maybe, but imagine serving a 12MB file
> this way: it first gets sucked into memory in its entirety and is then
> flushed to the client. You would not want this to be a popular
> download.
> Anyway, BLOBs can be efficiently (albeit somewhat less securely) stored
> in the FS as long as Midgard handles their management: serving, access
> control, create/delete, etc.
>
> Emile

I will hopefully be moving a commercial site which deals with _really_ big
photos to Midgard in the near future, so I will have to deal with this same
issue.  We're undecided so far on how to store the images (file vs.
database), and would love it if Midgard gave us more than one good option.

I agree that pulling large files into memory before sending them isn't
typically realistic.  I think the danger is that this functionality will get
implemented in Midgard with a specific data source (MySql) in mind, instead
of allowing more options.  Midgard should never be optimized for just one
particular kind of database (or OS, or filesystem, etc.).  Ideally, I would
like Midgard to abstract large file sends in a stream function which can
handle all kinds of data sources (be they file-based, from a database, from
a Java servlet, or whatever).

The stream function should:
1) Know what the source type is for a particular file (e.g MySql, Oracle).
2) Know how to stream directly from sources that allow it (Oracle, SGI).
3) Know how to fake it with sources that can't.
   a) With a simple file system, it could read the files in chunks,
preventing an initial delay and eliminating the need for much memory.
   b) With a database that can't stream (e.g. MySql), there could be a
Midgard function for storing large files.  This function would store a large
file in several chunks (preventing the need to read everything at once).
The Midgard streaming function would transparently send it as if it were a
single file.

Hopefully any of these ideas inspire something ;-)

-Pat
[EMAIL PROTECTED]



--
This is The Midgard Project's mailing list. For more information,
please visit the project's web site at http://www.midgard-project.org

To unsubscribe the list, send an empty email message to address
[EMAIL PROTECTED]

Reply via email to