title: Java data access to CouchDB: ORM or REST?
body: <p>I'm working on an application acts as an event service bus for integrating various legacy components....The application utilizes a data store to audit all events and requests sent between systems as well as to store metadata about bus-subscribing endpoints...etc. I want to utilize CouchDB as the data store since it already has many of my application's requirements built-in (REST API, replication, versioning metadata documents...etc). Now here's how my app stack looks like:</p>
  
  <pre><code>  [spring-integration filters/routers/service activators]
    [service layer]
    [dao layer]
    [database]
  </code></pre>
  
  <p>With the database being CouchDB, I guess the the DAO layer would be either Ektorp Java library or  a simple REST client. Here's my question though: isn't building a DAO layer with Ektorp kind of redundant? I mean, why not just use a RestTemplate in the service layer that talks to the views and design documents in CouchDB and save me some coding effort? </p>
  
  <p>Am I missing something?</p>
  
  <p>Thanks,</p>