couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nils Breunese <>
Subject RE: Looking for advice using CouchDB for a FreeSoftware project
Date Sat, 13 Jun 2009 16:24:39 GMT

Some ideas:

- I think I'd make the movie hash a regular field in the document instead of the _id. Then
you can just have multiple subtitle documents for a movie and you could create a view that
emit this field as a key so you can query for it.
- JSON has booleans, so I'd make fansub a boolean instead of a True or False string.
- You could use attachments to store the subtitle files.

Nils Breunese.

Van: fana []
Verzonden: zaterdag 13 juni 2009 16:13
Onderwerp: Looking for advice using CouchDB for a FreeSoftware project


I heard about CouchDB in a german Podcast[1] last week
and I think I found the last missing piece for a FreeSoftware project[2].


There is a program called "SubDownloader"[3] which is an XML-RPC client
to the XML-RPC server of . It works like this:

 * You have a movie and you want a subtitle for it.
 * You open your movie with Subdownloader.
 * Subdownloader hashes[4] your movie file.
 * Subdownloader asks XML-RPC server whether it has a subtitle for this
movie hash and downloads it.

Problem now is that infrastructure can't handle the load
anymore[5] and it's not possible to scale it.

We now re-implement the XML-RPC server in Python but it was a big headache
designing the database, because we don't want to "navigate the ship in the
same iceberg" as did.

I think that CouchDB is perfect for us in terms of scalability,
replication, collaboration and design changes in the future.

As I want to eliminate as much mistakes from the beginning as possible
I would like to ask here for advice and created a first draft how our
database would look like.

Would this draft work out with CouchDB or is there a better way?


  "_id"              : "String",       (MD5 hash of subtitle file)
  "type"             : "subtitlefile",
  "format"           : "String",       (e.g. "SubRip")
  "language"         : "String",       (ISO 639-2 code)
  "hearing_impaired" : "String",       ("True" or "False")
  "fansub"           : "String",       ("True" or "False")
  "uploader"         : "String",
  "_attachments"     :

      "content_type" : "text\/plain",
      "data"         : "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ="


  (just peoples' file hashes)


  "_id"      : "String",               (Computed hash of movie file)
  "type"     : "moviefile",
  "length"   :  number,                (seconds)
  "filesize" :  number,                (kb)
  "fps"      :  number,
  "uploader" : "String"


                                       (here "_id" will be generated by
  "type"            : "relation"
  "id_subtitlefile" : "String",        (the MD5 hash of the subtitle)
  "id_moviefile"    : "String"         (the     hash of the movie file)


De informatie vervat in deze  e-mail en meegezonden bijlagen is uitsluitend bedoeld voor gebruik
door de geadresseerde en kan vertrouwelijke informatie bevatten. Openbaarmaking, vermenigvuldiging,
verspreiding en/of verstrekking van deze informatie aan derden is voorbehouden aan geadresseerde.
De VPRO staat niet in voor de juiste en volledige overbrenging van de inhoud van een verzonden
e-mail, noch voor tijdige ontvangst daarvan.

View raw message