Re: PATCH, gdiff, and random-access I/O

Justin Chapweske wrote:

> 
>>>In any case, I think it is important that the specification
>>>recommend a delta format that can meet the needs of both diff/patch
>>>type usage as well as remote random-access I/O patterns.
>>
>>I am not sure I agree. Would it be better to provide a different
>>method for remote random-access I/O patterns? Random I/Os seem to have
>>different enough priorities and possibly different set of essential
>>operations to justify the increased complexity of morphing two content
>>modification methods together.
> 
> 
> I doubt that a different method is needed besides PATCH, but perhaps a
> simple alternate diff format that can express these random-access I/Os
> would be appropriate.

Exactly.

It seems to me that the ability to map file operations directly to a 
PATCH format is essential. It will be extremely useful for all WebDAV 
clients that act as filesystem drivers (there are at least three 
different ones for Windows, one for Linux and one for OS/X).

Also, I think we should keep the number of REQUIRED patch formats 
minimal, and the ones that are indeed required should be dead simple tim 
implement. If there isn't a simple format to which file i/o (write 
bytes, seek, truncate) can be mapped, we should specify one.

Such as:

SEEK <bytes> (only positive offsets accepted, seeking beyond end of 
"document" appends zero bytes)
WRITE <bytes> <bytestream>
TRUNCATE

Example:

SEEK 1234<lf>
WRITE 5<lf>
abcde<lf>
TRUNCATE<lf>

would seek by 1234 bytes, write the bytes stream "abcde" (format is 
binary), then truncate at this position.

> Honestly I don't know what the answer is since I have no expertise on
> the specific diff/delta algorithms that are being discussed.  I would
> just like to see a base-line format that can express these types of I/O
> patterns in an easily implementable manner.

Yep.

Best regards, Julian

-- 
<green/>bytes GmbH -- http://www.greenbytes.de -- tel:+492512807760

Received on Friday, 30 April 2004 03:24:36 UTC