incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Copenhaver <>
Subject Re: nodejs couchapp
Date Tue, 08 Nov 2011 19:02:53 GMT
Just read this thread, thought I would throw out a few thoughts.

It would be great to see some best practices for medium and large scale (as
in size and complexity) applications utilizing CouchDB. I do not have any
so the next section is speculation.

I feel like the evolution of a CouchApp is something like:

   1. Basic CouchApp, CouchDB providing data as a service and app hosting
   with a browser running thick client JavaScript. Can be super fast to get
   2. Need a little more control over CouchDB interaction, auth/auth, or
   output and add a thin web layer using something like node.js's Express or
   Ruby's Sinatra.
   3. Need external services to react to system events being published
   through CouchDB (could be from the client or replication if in a
   distributed system). Also provides a means for system to system

You could go from 1 to 3 then add 2, but I feel like this is a situation
where CouchDB shines with it's replicator db and _changes feed. Gives you
an event driven system where things are reactive. I feel like CouchDB is
best when it's a centerpiece or right out in front. Plus since you could be
in a disconnected or high latency (mobile or just flaky wifi) situation
this model could provide a responsive UI wen you rely on publishing an
event and notifying the user when there are changes.

I'll admit this doesn't fit all apps, but you could use CouchDB's proxy
feature to delegate out to services for sync' behavior or use 2.

Does anyone have experience or thoughts on the matter?

On Tue, Nov 8, 2011 at 1:37 PM, Ryan Ramage <> wrote:

> > Sometimes it's easy to forget how much of building couchapps is simple
> because CouchDB is simple, and writing an app in node.js with CouchDB as a
> datastore is still quite simple even if it's a little more complicated than
> a couchapp and as you start doing those backflips it might be simpler to
> break out of the couchapp model and keep CouchDB as a backend store.
> >
> I totally agree. But I think most developers tend to try and find the
> biggest box to use. So when they look at couchapps they go hmm, nope,
> not going to try, not a big enough box.
> What might be useful to explore is some docs/best practices for
> growing your app out of the couchapp box. "How should I migirate
> assets into a node front end?", "What about auth", etc. That way
> people can feel comfortable starting with couchapps knowing they can
> move upwards if needed.
> Maybe I have not investigated if such resources exist, but it might be
> useful for the various couchapp communities to provide.
> Ryan

“The limits of language are the limits of one's world. “ - Ludwig von

"Water is fluid, soft and yielding. But water will wear away rock, which is
rigid and cannot yield. As a rule, whatever is fluid, soft and yielding
will overcome whatever is rigid and hard. This is another paradox: what is
soft is strong." - Lao-Tzu

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message