#274 ✓not-applicable
Bob Aman

dm-couchdb-adapter relies on abnormal naming scheme

Reported by Bob Aman | May 11th, 2008 @ 03:05 PM

Right now, the dm-couchdb-adapter expects a User resource to have a corresponding users database in CouchDB. This is very strange. This is what a typical CouchDB database looks like (taken from the Ajatus CRM):


In this example, there is 1 contact (E169028...) in the DB with 3 tags (4c480f9..., 66a500d4..., 92a28dd...).

Essentially, document type is determined by the internal structure of the document (typically by checking the _type property), not by which database it's in. CouchDB's not exactly a table/row based database. :-) The dm-couchdb-adapter really needs to be completely rewritten to be more flexible. I'll happily volunteer to take responsibility for this, assuming there's agreement that the change needs to happen.

Comments and changes to this ticket

  • Sam Smoot

    Sam Smoot May 14th, 2008 @ 10:21 PM

    It sounds sane to me, but I'd wait for Bernerd's input since it's his baby.

  • Bob Aman

    Bob Aman May 14th, 2008 @ 10:28 PM

    Well, rather than a rewrite, I opted to fix the main problem within the current codebase. The code still needs a significant reworking, but the issue of creating a new database for each type has been resolved.

  • Sam Smoot

    Sam Smoot May 21st, 2008 @ 01:11 AM

    • Milestone cleared.

    So you're happy with this? Not happy? I'm going to set the milestone to 1.0. Otherwise I'm guessing we're just waiting on Bernerd's input...

  • Bob Aman

    Bob Aman May 21st, 2008 @ 07:09 AM

    Content, sure. Happy... not yet.

  • Matt

    Matt May 28th, 2008 @ 03:15 PM

    might want to look at how couch_object does it http://couchobject.rubyforge.org/

  • Dan Kubb (dkubb)

    Dan Kubb (dkubb) December 1st, 2008 @ 01:41 AM

    • Tag set to dm-more
    • Milestone cleared.
    • State changed from “new” to “open”
    • Assigned user changed from “Bernerd Schaefer” to “Dan Kubb (dkubb)”
  • Dan Kubb (dkubb)

    Dan Kubb (dkubb) December 4th, 2008 @ 03:27 AM

    • State changed from “open” to “unconfirmed”
    • Assigned user changed from “Dan Kubb (dkubb)” to “geemus (Wesley Beary)”

    Wesley, would you mind looking into this?

    If you decide to take it on, would you also mind changing the ticket status to "accepted" so we know you're working on it.

  • geemus (Wesley Beary)

    geemus (Wesley Beary) December 4th, 2008 @ 12:17 PM

    • State changed from “unconfirmed” to “not-applicable”

    Although there may still be room for some of the other improvements that were left unspecified, the adapter has already been changed to store everything in one database, separated by a type attribute as suggested.

    If there are other changes I'd be happy to address them within the context of other tickets, but since this one was created there have already been some significant rewrites which (I hope) should make things much cleaner and easier to work with.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »