views:

1030

answers:

4

I'm looking for a document-oriented db with a Ruby API that has SQLite-like properties:

  • self-contained,
  • serverless,
  • zero-configuration.

Are there light alternatives to MongoDB or CouchDB?

Is RDDB a possibility?

If not, what are the best paths to walk then?

+3  A: 

You can use Tokyo Cabinet via it's Ruby API.

Farrel
Is it possible to use Tokyo Cabinet in a Windows environment?
Theo
I looked at Tokyo Cabinet. From the doc's I see, it hasn't a search feature like MongoDB has. Tokyo Dystopia hasn't a Ruby API.Plus, Tokyo Cabinet isn't really document oriented.
davidbe
+3  A: 

It's not ready yet, but embeddable version of CouchDB are on the long term roadmap.

Replication is intended to enable offline applications with CouchDB. If you ended up with very specific needs you could replicate data from couchdb to a local datastructure, store it locally, update it, and push the data back via replication but it would take some code.

mikeal
A: 

I almost feel you could do some sort of hack to achieve this.

Have a table using sqlite's row ids along with a field for collection name and text blob that would be json code.

Have another table for indexing with fields in a collection (collection name, field name, field value, document row id).

You could do some wrapper class to handle things like updates and lookups. Would be interesting.

RobKohr
+1  A: 

If you were using Perl, I'd recommend DBM::Deep, which stores arbitrary data structures on disk, including transactions with commit/rollback, and it's a non-C one-Perl-module install. Doesn't get much lighter than that.

Randal Schwartz