incubator-couchdb-user mailing list archives

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

- - 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 Schneider -
Version: GnuPG v1.4.10 (GNU/Linux)


View raw message