On Sun, Jul 26, 2009 at 12:24 PM, Senthilkumar Peelikkampatti Muthusamy<[email protected]> wrote: > Thanks for the reply Damien. I am posting it to the mailing list. > > I have another question, > It is again architectural question > If I use Erlang, should I use REST interface or direct Erlang interface to > couchDB, I think currently Erlang is interfacing with CouchDB through REST > only. It has advantage like fronting with load balancer but if CouchDB has > direct Erlang API, it would alleviate lot of overhead (protocol). > I can still have 2 system load balanced from the web layer and effectively > share between multiple redundant application. > > [1-browser] ------ http (ajax) -----> [2-load balancer] |-----> [3a- > Mochiweb + Application Code ] -----Erlang Process Communication---> > [CouchDB] > > |-----> [3b- Mochiweb + Application Code ] -----Erlang Process > Communication---> [CouchDB] > > > Erlang Process Communication can be registered process I can sent a async or > sync message to them. >
I'd discourage you from going the all-Erlang route. If you do this, you will need to handle your own partitioning, proxying, and load-balancing. If you stick with HTTP there are lots of tools that can help you scale CouchDB. The first thing you should look at is the CouchDB-Lounge project, which makes a cluster of machines look like a single logical Couch using an HTTP proxy system. http://code.google.com/p/couchdb-lounge/ Even if you decide to write your own Erlang partitioner, you should take the time to understand CouchDB Lounge. In my opinion the architecture for an all-Erlang distributed CouchDB should look like this. There may already be an effort underway to port CouchDB-Lounge to Erlang. If so you might do well to collaborate on that project. There are also architecture write-ups on the dev list which you can find in the archives. Here's one of the more detailed threads describing something like CouchDB Lounge: http://mail-archives.apache.org/mod_mbox/couchdb-dev/200904.mbox/%[email protected]%3e Cheers, Chris > > > > On Jul 26, 2009, at 1:32 PM, Damien Katz wrote: > > Looks good to me, but you might want to try sending this to the CouchDB user > mailing list: > > http://couchdb.apache.org/community/lists.html > > -Damien > > On Jul 22, 2009, at 9:12 PM, Senthilkumar Peelikkampatti wrote: > > Hi Damien Katz, > I am Senthilkumar I looked at couchdb earlier and left soon after > reading few pages in the apach couchdb site. After sometime, I again fall on > to couchdb this time I looked carefully. The reason was I was looking for > honest solution for Internet Scale application. I, initially resisted to > learn Elrang and did a great effort working with hbase, its not bad, though. > Again I am not convinced with Java as it is my primary language of choice > for Internet scale application. So I decided to learn Erlang. I am thinking > of developing some internet application. > I selected following tools/components, > > 1. Erlang Web application development language > 2. Mochiweb --- Web server cum Erlang app server > 3. RabbitMQ for Message related aspects > 4. CouchDB as my DB - Storage Engine > 5. JQuery based UI engine for UI related aspects > > > Related to CouchDB, > How to handle images (around 4 MB of size each) and video files (20 MB of > size)? > > I am thinking that, flow would be similar to > [1-browser] ------ http (ajax) -----> [2-load balancer] |-----> [3a- > Mochiweb] -----Http (REST)----> [4a - Mochiweb ---> CouchDB] > > |-----> [3b- Mochiweb] -----Http (REST)----> [4b - Mochiweb ---> CouchDB] > Here, 4a and 4b will be couchdb self replicated. > > > May be Nginx as load balancer/reverse proxy > > Please provide your thoughts on this. > > > > Thanks, > Senthil > http://pmsenthilkumar.blogspot.com/ > -- Chris Anderson http://jchrisa.net http://couch.io
