On Fri, 28 Jan 2000, Patrick Hayes wrote:

> 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,

2.0 is going to use ODBC, so this should not be an issue.

> 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).

It's not serving that's the problem -- specifially, you can mix Midgard,
CGI and Servlet serving within one site without problem even now.

Management is the key.

> 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.

PHP has the readfile function for this.

>    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).

With MySQL you'll still have the same problem: there's no way (to my
knowledge) to get BLOBs in chunks from it, so even if you do send it
to the FS first you still get it in memory first.

What I've been thinking about is a way for midgard to be able to manage
BLOBs and store them in the FS or DB given some kind of hint from the
setup or Midgard site managing them. Access to these BLOBs would from
be transparent to the Midgard environment afterwards.

If we want to manage BLOBs as first-class Midgard citizens (access control,
replication, etc), which I do, we need full control over the repository.
FS and DB offer that. If there are more options I'd love to hear about it.

emile


--
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