couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Devendra Gera <>
Subject Re: Erlang vs Scala
Date Thu, 09 Apr 2009 05:10:05 GMT
On Thu, 09 Apr 2009, Elliot Murphy wrote:

> On 04/09/2009 12:10 AM, Devendra Gera wrote:
> > I recently developed a CouchDB imitation in python for testing, while I
> > was working on the document update notifications patch. Maybe I can put
> > some effort into porting it to C?
> > 
> > It was a purely in-memory store though.
> Does it faithfully reproduce the CouchDB interface and behavior? I would
> *love* to have something a bit lighter weight than a full blown couchdb
> instance for use by tests in our test suite.

Umm, no. :)

It does a subset. Some differences are :

 - No DELETEs : should be trivial to add.

 - Only one DB : should be extremely simple to extend.

 - No document revisions : shouldn't be too much effort.

 - Non-random (sequential) document IDs.

 - Single threaded : should be easy to fix, but would add locking
   requirements and make the code more complex.

 - No thought to replication : I don't know how difficult this would be
   to fix.

 - It does support the doc update hooks though (not as a process, but as
   python functions it loads from specified modules).

 - No persistence.

 - Stores the docs in a simple dict. Same for attachments.

Note that this was done as a quick solution to develop the rest of the
system, providing a functional substitute for CouchDB for rapid
development. This was with ~280 lines of Python code.

I have a bunch of unit tests (adding docs, adding attachments etc.)
which test for CouchDB like behaviour. I didn't bother to add negative
tests though.


View raw message