CouchDB Java client

2020-08-13 07:12发布

问题:

This wiki page, http://wiki.apache.org/couchdb/Getting_started_with_Java, lists several CouchDB Java clients. I wonder if any of the clients mentioned is significantly more dominant/popular/better/supported than the others.

回答1:

I think Ektorp is pretty much the clear leader at the mo. I've certainly been very happy with it, and I've never seen anybody using anything else.

In addition, as a quick metric, Ektorp is clearly far more actively maintained than any of the others: currently the last commit on Ektorp was 5 hours ago, vs 4 years for CouchDB4j, a little over 1 year for jcouchdb and 2 years for jRelax.



回答2:

Lightcouch seems to be most active nowadays. Ektorp is also still active, however.

Each has its own strengths, however, so I'd pick based on what level you want to be abstracted from CouchDB's HTTP API. Myself, I'd use Lightcouch.



回答3:

I tried CouchDB4j and it has only a few methods implemented. They are not so well documented and you might find the complete lack of code example implementations very frustrating as it happened to me.That is why I would not recommend it. To give you a feel about this API, I tried attaching a certain file to an already existing document from the database and it does not support this kind of process.

I will now give Ektorp a shot and will come back with an edit as I go along. Looking at the recent activity between these two it is a big difference: Ektorp has been last updated a month ago vs CouchDB4j having been updated 3 years ago at the moment when this comment was written. Hope this will help.

EDIT: Ektorp is definitely the way to go. It allows you to build your own kind of entry in the database, with as many and variate fields as you want. It also allows easy manipulation of attachments. For me, it did the trick.



标签: java couchdb