On Thu, Apr 23, 2009 at 1:45 PM, Adam Jacob adam@opscode.com wrote:
On Thu, Apr 23, 2009 at 12:45 AM, David Lee david.lee@kanji.com.au
wrote:I'm not sure I understand how the search indexes help solve Miguel's
problem?I was just curious about how difficult the implementation is likely to
be.
An ActiveRecord, with polymorphic joins etc, would likely require less
work
than one using native database interaction.But I gather it would have to be built directly on top of couch; I have
little sense of the difficulty involved at this point, and I'm curious.CouchDB is particularly ill-suited to ad-hoc queries of that sort -
while you would be easily able to pull out single objects, you really
don't have the ability to string together arbitrary queries in the way
you are thinking. This is a side-effect of being schema-free and
document oriented, and it's why something like a full text index for
the CouchDB documents is necessary.We're chatting about ways to make this better in the long term - we
would love to hear your thoughts on the matter.Adam
I'll throw in my thoughts on this. For the amount of free formed data being
stored, I think couchdb is overkill. It's another moving part that imo is
not really adding much value. If you were storing gigabytes of data and
doing map/reduce over distributed data sets I could see the point, but right
now couchdb is more a point of frustration for doing lots of stuff that
would be easier with datamapper/activerecord.
Why not just serialize the node attributes and stick them in a text column?
Index them, even keep them all in memory if you want, it's not a large
amount of data even with hundreds of servers. You could store it as just
one large hash. Another thing is that couchdb plus an sql db would end up
being too much, it really needs to be one or the other. Which one will add
the most value overall? I'm guessing datamapper/activerecord will make chef
easier to work with, get more people contributing, and result in more people
using it.
Chris