I've lost count of the number of times I started on 'external attachments'. :)

On 23 March 2012 17:09, Jens Alfke <[email protected]> wrote:
>
> On Mar 23, 2012, at 9:56 AM, Robert Newson wrote:
>
>> One way to avoid this is to
>> use one file for documents and another for attachments. If TouchDB is
>> effectively doing that, then that explains how you escape the issue.
>
> Yes — TouchDB stores every attachment as a separate file. It’s a very simple 
> content-indexed store, where the files are named according to their SHA-1 
> digests. The document metadata* contains attachment digests. (This then 
> requires that compaction run a mark-sweep phase where it collects the digests 
> of all available attachments, then deletes attachment files that don’t appear 
> in that list.)
>
> —Jens
>
> * https://github.com/couchbaselabs/TouchDB-iOS/wiki/Object-Design-And-Schema

Reply via email to