incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johannes Schneider <maili...@cedarsoft.com>
Subject How to structure? Databases, partial replication...
Date Wed, 08 Sep 2010 20:57:30 GMT
-----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-----

Mime
View raw message