curator
curator copied to clipboard
Implementing a CouchDB data store
Hi guys,
I'm implementing a CouchDB datastore to contribute back and I'm having a number of questions.
My plan at the minute is to get some sort of reasonable implementation, then post a pull-request with the intention of getting feedback on design decisions and polishing off anything you think needs improved.
Of import at the moment is whether or not Curator is considered to be thread-safe.
Under ordinary circumstances, CouchDB will generate an ID for new documents on creation if one isn't provided.
However, as a means of collection separation (and to allow us to 'find all' by collection without the need for a design doc), the data store will store docs with an ID of "#{collection_name}_#{uuid}"
- where the UUID is fresh from a cache inside Curator from Couch's /_uuids API.
Apologies for the information overload - is Curator currently considered thread-safe? Such a UUID cache would require (minor) thought to be made thread-safe, as Ruby's arrays currently aren't.
Thanks
Hi Brian,
Thanks for contributing! A CouchDB data store would be great.
We have not done any work to make Curator explicitly thread-safe, so it's likely not thread-safe by default.
I look forward to seeing your pull request.