You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by J Aaron Farr <fa...@apache.org> on 2009/03/12 17:21:01 UTC

[RT] sling and couchdb

I was thinking tonight about sling and couchdb and how similar they are
in many respects.  And this had me thinking about why couchdb is out of
incubation and growing while we've had trouble building a community
around sling.

I think it might be in this team's interest to do a comparison between
couch and sling and publish it.  Having people start to look at sling as
a couchdb alternative for Java could be a very good thing.

And if no one between the communities is talking yet, you should be.
You're solving similar problems and perhaps there could be something
learned between the two groups.

Or maybe I'm totally off base and the sling committers consider sling
completely different than couchdb, but if so, I'd be really interested
to hear why.

oh, and I'll be mentioning and showing sling at my "Day of REST"
training at ApacheCon Europe.

-- 
  J Aaron Farr     jadetower.com        [US] +1 724-964-4515
    馮傑仁         cubiclemuses.com     [HK] +852 8123-7905

Re: [RT] sling and couchdb

Posted by J Aaron Farr <fa...@apache.org>.
On Fri 13 Mar 2009 01:15, Chris Zumbrunn <ch...@zumbrunn.com> wrote:

> On Mar 12, 2009, at 17:21 , J Aaron Farr wrote:
>
>> Or maybe I'm totally off base and the sling committers consider sling
>> completely different than couchdb, but if so, I'd be really interested
>> to hear why.
>
>
> Wouldn't it be more appropriate to compare CouchDB with Jackrabbit
> rather than Sling?
>
> Sling is a web framework on top of a data backend. CouchDB is a data
> backend on top of which one could build a web framework.

One more addition to this.  Check out Chris Anderson's "sofa" project, a
full blog powered by nothing other than CouchDB:
  
  http://github.com/jchris/sofa/tree/master

running here:

  http://jchrisa.net

He's just getting it together, but it illustrates what I'm talking about.

-- 
  J Aaron Farr     jadetower.com        [US] +1 724-964-4515
    馮傑仁         cubiclemuses.com     [HK] +852 8123-7905

Re: [RT] sling and couchdb

Posted by J Aaron Farr <fa...@apache.org>.
On Fri 13 Mar 2009 01:15, Chris Zumbrunn <ch...@zumbrunn.com> wrote:

> On Mar 12, 2009, at 17:21 , J Aaron Farr wrote:
>
>> Or maybe I'm totally off base and the sling committers consider sling
>> completely different than couchdb, but if so, I'd be really interested
>> to hear why.
>
>
> Wouldn't it be more appropriate to compare CouchDB with Jackrabbit
> rather than Sling?

Maybe, but I think that's becoming less and less true.

For example, the only interface to couchdb is HTTP which makes working
with it feel more like Sling than Jackrabbit.  And lately the emphasis
with CouchDB are "CouchApps" which are basically webapps that run inside
couchdb.  You upload your site templates, html, css, and so on to
couchdb which can execute server-side javascript.  It's not quite like
ESPs, but there are several similarities.

In some respects, CouchDB is quite behind Sling as being an application
framework, but they're working on it.

-- 
  J Aaron Farr     jadetower.com        [US] +1 724-964-4515
    馮傑仁         cubiclemuses.com     [HK] +852 8123-7905

Re: [RT] sling and couchdb

Posted by Chris Zumbrunn <ch...@zumbrunn.com>.
On Mar 12, 2009, at 17:21 , J Aaron Farr wrote:

> Or maybe I'm totally off base and the sling committers consider sling
> completely different than couchdb, but if so, I'd be really interested
> to hear why.


Wouldn't it be more appropriate to compare CouchDB with Jackrabbit  
rather than Sling?

Sling is a web framework on top of a data backend. CouchDB is a data  
backend on top of which one could build a web framework.

Based on which similarities do you directly compare Sling and CouchDB?

Chris



Re: [RT] sling and couchdb

Posted by Felix Meschberger <fm...@gmail.com>.
Hi,

J Aaron Farr schrieb:
> I was thinking tonight about sling and couchdb and how similar they are
> in many respects.  And this had me thinking about why couchdb is out of
> incubation and growing while we've had trouble building a community
> around sling.
> 
> I think it might be in this team's interest to do a comparison between
> couch and sling and publish it.  Having people start to look at sling as
> a couchdb alternative for Java could be a very good thing.
> 
> And if no one between the communities is talking yet, you should be.
> You're solving similar problems and perhaps there could be something
> learned between the two groups.
> 
> Or maybe I'm totally off base and the sling committers consider sling
> completely different than couchdb, but if so, I'd be really interested
> to hear why.

I have to admit, that I don't know much more of couchdb, than that is
interesting and is an Apache project ;-)

But I would be interested to learn more (though my timing at the moment
does not permit much, unfortunately). Though, I think, Rory has provided
quite an interesting first run-down.

> 
> oh, and I'll be mentioning and showing sling at my "Day of REST"
> training at ApacheCon Europe.

That is great. Thanks ;-) Since I cannot make it to the training, I
wonder whether the Slides would be available after the training ?

Regards
Felix


Re: [RT] sling and couchdb

Posted by J Aaron Farr <fa...@apache.org>.
On Fri 13 Mar 2009 01:24, Rory Douglas <ro...@oracle.com> wrote:

> I'm not very familiar with CouchDB at all, but after reviewing the
> CouchDB wiki & website, this is what stands out to me:

I'm not a couchdb expert either.  I bumped into it back in March 2007
long before it came to Apache, but haven't built anything serious with
it.  And it's changed *a lot* in the last few months.  Well, they've
added more and more support for CouchApps.

> Similarities:
> ...
> 5) Both support development in a variety of scripting & formal languages

Actually, couchdb is pretty much limited to JavaScript.  Despite being
written in erlang, users of couchdb see it as a very JavaScript-y
system.

> 3) Sling can generate any kind of representation for a specific
> "document", not just JSON

couchdb can render html and xml.  plus you can "attach" arbitrary files
to any couchdb document, so couchdb can serve static images, etc.

>    c) CouchDB is a standalone server architecture - you store your
> data there, not your application

While CouchDB is typically used this way, Chris and others have been
doing a lot to allow CouchDB to actually host your application.  So your
pages are documents served and interpretted by couchdb.  Consider this
bit of JavaScript stored as a CouchDB document:

 http://github.com/jchris/sofa/blob/0b91432eb79666ad50b142b02af5ac780cdc91dc/lists/index.js

> If any of the above is off-base or plain wrong, I apologize.  I
> thought it was an interesting question because I'd wondered about
> CouchDB myself in the past (but haven't had nearly enough time to
> truly investigate it).

Nothing to apologize about.  I was just trying to raise an interesting
question.

I suggest the sling team touch base with the couchdb guys.  The upcoming
ApacheCon Europe conference should be a good place to do that.  The
projects are certainly in similar spaces.

And finally, with my mentor hat on, if sling wants to pick up more
committers and interest, I recommend looking into couchdb more.  They've
got a lot of good buzz going.

-- 
  J Aaron Farr     jadetower.com        [US] +1 724-964-4515
    馮傑仁         cubiclemuses.com     [HK] +852 8123-7905

Re: [RT] sling and couchdb

Posted by Rory Douglas <ro...@oracle.com>.
J Aaron Farr wrote:
> I think it might be in this team's interest to do a comparison between
> couch and sling and publish it.  Having people start to look at sling as
> a couchdb alternative for Java could be a very good thing.
>   
I'm not very familiar with CouchDB at all, but after reviewing the 
CouchDB wiki & website, this is what stands out to me:

Similarities:

1) Both frameworks can be thought of as schema-free "document" or 
"content" centric data storage
2) Both can generate JSON representations of these documents
3) Both support distributed replication of data to multiple nodes
4) Both are integrated with search technology and provide methods for 
querying stored data
5) Both support development in a variety of scripting & formal languages

Differences:

1) Sling (well Jackrabbit) can optionally enforce schema statically 
through primary & mixin node types
2) The concurrent conflict resolution process & locking (or lack of it) 
appear quite different.  For content editing purposes with multiple 
writers, the CouchDB approach appears quite powerful.
3) Sling can generate any kind of representation for a specific 
"document", not just JSON
4) a) Sling is more concerned with providing flexible ways to generate 
different representations for logical content types - it is more 
"content"-centric
    b) As a consequence, it provides many features useful to a CMS 
system: flexible script resolution, background job architecture, 
extensible content model (resources)
5) a) CouchDB is more concerned with providing flexible ways to 
manipulate unstructured data - it is more "data"-centric
    b) As a consequence, it provides many features useful to a database 
system: high performance updates, replication, conflict resolution
    c) CouchDB is a standalone server architecture - you store your data 
there, not your application
6) Sling is built on the OSGI framework & Java, which means you normally 
build your Sling apps on those platforms.  By providing bundles with 
custom code, scripts & contents you essentially build apps "in" Sling.  
The whole app is deployed like a standard Java web application.  
Underlying data storage is delegated to whatever Jackrabbit persistence 
mechanism  you plug in (typically a standard relational DB).
7) You also could use Sling as a standalone data storage server from a 
completely separate web application platform (e.g. .Net), accessing JSON 
or XML data representations via HTTP client libraries, or client-side 
scripting languages.

If any of the above is off-base or plain wrong, I apologize.  I thought 
it was an interesting question because I'd wondered about CouchDB myself 
in the past (but haven't had nearly enough time to truly investigate it).

Regards,
Rory