Re: Blobs: An alternate (complementary?) binary data proposal (Was: File IO...)

2008-05-13 Thread Charles McCathieNevile
On Mon, 12 May 2008 07:40:44 +0200, Chris Prince [EMAIL PROTECTED] wrote: On Sun, May 11, 2008 at 9:22 PM, Aaron Boodman [EMAIL PROTECTED] wrote: On Sun, May 11, 2008 at 6:46 PM, Maciej Stachowiak Open question: can a File be stored in a SQL database? If so, does the database store

Re: Blobs: An alternate (complementary?) binary data proposal (Was: File IO...)

2008-05-13 Thread Charles McCathieNevile
On Sun, 11 May 2008 05:10:57 +0200, Aaron Boodman [EMAIL PROTECTED] wrote: On Sat, May 10, 2008 at 1:18 AM, Maciej Stachowiak [EMAIL PROTECTED] wrote: ... I'm not really clear on why Blobs must be distinct from ByteArrays. As I read it, the Blob proposal also explicitly ties in a bit of

Re: Blobs: An alternate (complementary?) binary data proposal (Was: File IO...)

2008-05-13 Thread Maciej Stachowiak
On May 13, 2008, at 5:08 AM, Charles McCathieNevile wrote: On Sun, 11 May 2008 05:10:57 +0200, Aaron Boodman [EMAIL PROTECTED] wrote: On Sat, May 10, 2008 at 1:18 AM, Maciej Stachowiak [EMAIL PROTECTED] wrote: ... I'm not really clear on why Blobs must be distinct from ByteArrays.

Re: Blobs: An alternate (complementary?) binary data proposal (Was: File IO...)

2008-05-13 Thread Ian Hickson
On Tue, 13 May 2008, Maciej Stachowiak wrote: On May 13, 2008, at 5:08 AM, Charles McCathieNevile wrote: (I suspect that if we are still relying on a thing called 'blob' because we still don't have real file system access with some sense of security by the time we want to hand around

Re: Blobs: An alternate (complementary?) binary data proposal (Was: File IO...)

2008-05-11 Thread Chris Prince
Responses to several of the comments so far: On Fri, May 9, 2008 at 9:15 PM, Ian Hickson [EMAIL PROTECTED] wrote: I'm not sure I like the way that the bytes are made accessible, but that's a minor detail really. I tend to agree. The 'Creating Blobs' section and the readAs*() methods were

Re: Blobs: An alternate (complementary?) binary data proposal (Was: File IO...)

2008-05-11 Thread Maciej Stachowiak
On May 10, 2008, at 11:39 PM, Chris Prince wrote: On Sat, May 10, 2008 at 1:18 AM, Maciej Stachowiak [EMAIL PROTECTED] wrote: I'm not really clear on why Blobs must be distinct from ByteArrays. The only explanation is: The primary difference is that Blobs are immutable*, and can therefore

Re: Blobs: An alternate (complementary?) binary data proposal (Was: File IO...)

2008-05-11 Thread Maciej Stachowiak
On May 11, 2008, at 4:08 PM, Aaron Boodman wrote: On Sun, May 11, 2008 at 3:02 PM, Maciej Stachowiak [EMAIL PROTECTED] wrote: Both of these can be addressed by the APIs (including the worker transfer mechanism) making a copy, which can use a copy-on-write mechanism to avoid actually

Re: Blobs: An alternate (complementary?) binary data proposal (Was: File IO...)

2008-05-11 Thread Aaron Boodman
On Sun, May 11, 2008 at 4:22 PM, Maciej Stachowiak [EMAIL PROTECTED] wrote: Here's one additional question on how this would work with ByteArray. The read API for ByteArray is currently synchronous. Doesn't this mean that with large files accessing bytearray[n] could block? If the ByteArray

Re: Blobs: An alternate (complementary?) binary data proposal (Was: File IO...)

2008-05-11 Thread Maciej Stachowiak
On May 11, 2008, at 4:40 PM, Aaron Boodman wrote: On Sun, May 11, 2008 at 4:22 PM, Maciej Stachowiak [EMAIL PROTECTED] wrote: Here's one additional question on how this would work with ByteArray. The read API for ByteArray is currently synchronous. Doesn't this mean that with large

Re: Blobs: An alternate (complementary?) binary data proposal (Was: File IO...)

2008-05-11 Thread Aaron Boodman
On Sun, May 11, 2008 at 5:46 PM, Maciej Stachowiak [EMAIL PROTECTED] wrote: Well, that depends on how good the OS buffer cache is at prefetching. But in general, there would be some disk access. It seems better if the read API is just async for this case to prevent the problem. I see what

Re: Blobs: An alternate (complementary?) binary data proposal (Was: File IO...)

2008-05-11 Thread Maciej Stachowiak
On May 11, 2008, at 6:01 PM, Aaron Boodman wrote: On Sun, May 11, 2008 at 5:46 PM, Maciej Stachowiak [EMAIL PROTECTED] wrote: Well, that depends on how good the OS buffer cache is at prefetching. But in general, there would be some disk access. It seems better if the read API is just

Re: Blobs: An alternate (complementary?) binary data proposal (Was: File IO...)

2008-05-11 Thread Aaron Boodman
On Sun, May 11, 2008 at 6:46 PM, Maciej Stachowiak It seems better if the read API is just async for this case to prevent the problem. It can't entirely prevent the problem. If you read a big enough chunk, it will cause swapping which hits the disk just as much as file reads. Possibly more,

Re: Blobs: An alternate (complementary?) binary data proposal (Was: File IO...)

2008-05-11 Thread Chris Prince
On Sun, May 11, 2008 at 9:22 PM, Aaron Boodman [EMAIL PROTECTED] wrote: On Sun, May 11, 2008 at 6:46 PM, Maciej Stachowiak Open question: can a File be stored in a SQL database? If so, does the database store the data or a reference (such as a path or Mac OS X Alias)? There

Re: Blobs: An alternate (complementary?) binary data proposal (Was: File IO...)

2008-05-10 Thread Maciej Stachowiak
On May 7, 2008, at 10:08 PM, Aaron Boodman wrote: Hi everyone, Opera has a proposal for a specification that would revive (and supersede) the file upload API that has been lingering so long as a work item. The Gears team has also been putting together a proposal for file access which

Re: Blobs: An alternate (complementary?) binary data proposal (Was: File IO...)

2008-05-10 Thread Charles McCathieNevile
On Sat, 10 May 2008 06:15:01 +0200, Ian Hickson [EMAIL PROTECTED] wrote: On Wed, 7 May 2008, Aaron Boodman wrote: The Gears team has also been putting together a proposal for file access which overlaps in some ways with Opera's, but is also orthogonal in some ways:

Re: Blobs: An alternate (complementary?) binary data proposal (Was: File IO...)

2008-05-10 Thread Ian Hickson
On Sun, 11 May 2008, Charles McCathieNevile wrote: Do we have the resources to have someone champion this spec? Are you asking the WG, or Google? The Web community as a whole. I don't care which working group (if any) owns it, and I don't have any reason to prefer that Google work on

Re: Blobs: An alternate (complementary?) binary data proposal (Was: File IO...)

2008-05-10 Thread Aaron Boodman
On Sat, May 10, 2008 at 1:18 AM, Maciej Stachowiak [EMAIL PROTECTED] wrote: I really like the idea of adding consistent APIs for binary data in the many places in the Web platform that need them. However, I'm not really clear on why Blobs must be distinct from ByteArrays. The only explanation

Re: Blobs: An alternate (complementary?) binary data proposal (Was: File IO...)

2008-05-09 Thread Ian Hickson
On Wed, 7 May 2008, Aaron Boodman wrote: Charles wrote: Opera has a proposal for a specification that would revive (and supersede) the file upload API that has been lingering so long as a work item. I would echo the other comments people have made regarding the security model being the