Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 53039 invoked from network); 8 Sep 2010 20:58:02 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 8 Sep 2010 20:58:02 -0000 Received: (qmail 88975 invoked by uid 500); 8 Sep 2010 20:58:01 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 88782 invoked by uid 500); 8 Sep 2010 20:58:00 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 88774 invoked by uid 99); 8 Sep 2010 20:58:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Sep 2010 20:58:00 +0000 X-ASF-Spam-Status: No, hits=3.6 required=10.0 tests=FS_REPLICA,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [188.40.238.168] (HELO cedarsoft.eu) (188.40.238.168) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Sep 2010 20:57:54 +0000 Received: from [192.168.0.36] (HSI-KBW-109-192-131-180.hsi6.kabel-badenwuerttemberg.de [109.192.131.180]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by cedarsoft.eu (Postfix) with ESMTP id 47C1412E6008 for ; Wed, 8 Sep 2010 22:57:32 +0200 (CEST) Message-ID: <4C87F8BA.30807@cedarsoft.com> Date: Wed, 08 Sep 2010 22:57:30 +0200 From: Johannes Schneider User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.8) Gecko/20100802 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 To: user@couchdb.apache.org Subject: How to structure? Databases, partial replication... X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi guys, I want to put my photos into CouchDB. I have several devices, I want be able to access those photos from. CouchDB seems to be a great choice, since I want to be able to access them when being offline. And of course I want the database locally, so that there is no latency... And since I try to understand CouchDB and how to structure my data, I assume that there are a lot of users... And each of those users has private and public data... So I have to create (at least) two databases per user? One private, one public? Scenario: - - Storing photos: - RAW format (very large, only used on the Desktop) - JPEGs (converted from RAW) in several resolutions (used for slide shows, web upload etc). - - Multiple users - each with (at least) a private and public bucket Now I could just replicate my database(s) multiple times. But I have very different requirements on those devices: - - Server: Contains all public data from all users. Maybe also the private data as backup? - - Desktop: Here I want all my media (private and public) in all resolutions including RAWs. - - Notebook: Here I want all my media - but not the RAW files - don't have such a large disk here. - - Android: Here I want only a subsubset of the database. Only a part of the database (e.g. based on the date and/or rating) and of course only the images in the resolution matching the screen size of my mobile. How to solve the replication? Server <--> Desktop: Simple, just replicate everything in both directions. Server <--> Notebook: Not so simple. How can I skip the RAWs? Filtered replication works only for complete documents. So I have to move the RAW attachment to another document? Maybe even to an own database? Server <--> Android: Not so simple also. Filtered replication should help. So I could just replicate the pictures from the last 7 days. But how can I cleanup the database? Is it possible to remove documents from the database (but not deleting them to avoid replication of that deletion to the server)? And of course I just want a subset of the attachments - depending on the screen resolution... So I think I have to separate the attachments from each other (and the document describing the image)... Thanks a lot for reading this ;-), Johannes - -- Johannes Schneider - blog.cedarsoft.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQEcBAEBAgAGBQJMh/i3AAoJEAytD9R7Qv6d+GUH/1HRpbvJXoBisHOUp11KBflB mblgXKoSFfyCvCksT/RT0FtmMmOeOFHlu/BpBjUT4/pcl3P9KPow+hiK2qqmqnW/ n1C5RWK4hADyNrdhTdv3U31X59MxwadvEhy4EFGJnmhBsg1qxomBQ2fae1ISop5W i3mZWCihBNkS5MHwKq7S+TD/2GhxMt5LSfMcTxZVCjK/mgKzdJVhR4MvfZBAmyy7 p2ZB4MMDgIGwxHLQOxoM7yiDUG6/4rI8DFpSTLHNpUR59xmEx3dU19n/v+gN97NO Uw3Xy0dkiUTI3WJWoiZxeSG4vAdiwaAEbanYYSJheV1VB20CDvPXnH/ldEs0/xs= =7Fqs -----END PGP SIGNATURE-----