Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D99DA4CDC for ; Mon, 27 Jun 2011 11:56:32 +0000 (UTC) Received: (qmail 23043 invoked by uid 500); 27 Jun 2011 11:56:31 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 22922 invoked by uid 500); 27 Jun 2011 11:56:30 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 22914 invoked by uid 99); 27 Jun 2011 11:56:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Jun 2011 11:56:29 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sean.copenhaver@gmail.com designates 209.85.212.52 as permitted sender) Received: from [209.85.212.52] (HELO mail-vw0-f52.google.com) (209.85.212.52) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Jun 2011 11:56:23 +0000 Received: by vws16 with SMTP id 16so4867864vws.11 for ; Mon, 27 Jun 2011 04:56:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=b4s2zeYx/g2K5Gx4zlapWDjfqmDMPJedLPtl9m1j2jc=; b=gAiWq3HOKcmg34+LXIQB596XvNRkf0UgfZb9kETNhv0nK30LbQkE+1F7Aeq7m5Vl41 k1LGnYrjaoVNQCfHOz6HUM+HvuE5uEnIbGTkahsCWjvNN6/9ugJCJx5hmKBNmG4gGEut L+mZ2N/WPicXn8GtKvJDm+YWWFdBJRq9TvzOs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=PX4vlKgtn8yHUge6PLxACqf8p7pFC9dsk5ReXp9uoFL2crTfKkFnnyQWBJxfRt6AlQ gU4FV+XYpd1zNXhuRv5Eat0P/bGiw1g4PIMkr0l5E8jxThHL4vs1REOXliFgZBl45OmW /F6DUrK1GbmeJ7tR+uiXlI/vwXuxMLhLJufLg= MIME-Version: 1.0 Received: by 10.52.97.41 with SMTP id dx9mr7946416vdb.217.1309175762159; Mon, 27 Jun 2011 04:56:02 -0700 (PDT) Received: by 10.52.181.100 with HTTP; Mon, 27 Jun 2011 04:56:01 -0700 (PDT) In-Reply-To: References: Date: Mon, 27 Jun 2011 07:56:01 -0400 Message-ID: Subject: Re: CouchDB vs RavenDB (Specific features) From: Sean Copenhaver To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=20cf307f38064089b904a6b03c21 X-Virus-Checked: Checked by ClamAV on apache.org --20cf307f38064089b904a6b03c21 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable When Ayende first started looking into document databases he actually read the CouchDB source, so you'll find a lot of similarities between the two. Now I believe you have to pay to use RavenDB for commercial purposes and some of the official plug-ins are not available to the community edition. I would double check on all that because a Window's license might not be the only thing you have to think about. *Transactions: As they have said for aggregated amounts you can easily accomplish this wit= h a reduced view. If you wanted to keep up with the value inside another document an update function could help you there. Now CouchDB does have an 'all_or_nothing' option in it's bulk docs API. Either all documents will be stored or non if there is a problem. This is not really transactional as it does not handle conflicts so what wrote is not what you would read. Once you started thinking about replication betwee= n databases all semantics of transactions goes out the window anyway. I would be curious if RavenDB maintains versioning on the documents and has to handle conflicts, or if you would always have to lock the document to be safe (does RavenDB does locking during transactions?). Single document transaction sure. CouchDB does the whole append only b-tree= , so if it doesn't finish the commit to disk, it'll just go back to the last completed write. *Writing to disk I don't have much to add, but I would certainly do some performance testing= . You can force each write to get flushed to disk and the difference between that and automatic batching can be pretty substantial. *Auto Indexing I'm guessing you are talking about if you can issue CouchDB a dynamic/temporary view and if CouchDB will build and store the index. I don't believe it does and when you issue the temporary view I believe CouchDB basically does all the work and then throws it away. Those are really meant for development/testing purposes. I would say the biggest draw for me (I'm a .NET programming by day) is that RavenDB has first class .NET client with all the framework tie-ins and idioms you would be accustom to. A big draw for me with CouchDB is that it can be the center of my world (web server, database, simple middle tier, simple auth). If I needed more back end process, then it can become a message queue (_changes API makes this nice) or with HTTP proxying (new feature in 1.1) the middle man. On Mon, Jun 27, 2011 at 5:04 AM, Marcello Nuccio wrote: > 2011/6/27 Ryan Zec : > > *Transactions > > *This is kind of important for me. An example would be sending scores = to > > the database. When someone sends a score to the database, first I am > going > > to store that score as its own entity. Then I am going to want to upda= te > > the record that stores the total for the day, week, month, etc... If a= ny > > one of these updates fail, I don't want to any of the updates to save > > (saving the insert is fine). Is there a way to do this for CouchDB? > > I don't think you will need to store a record with the totals in CouchDB. > You should use a view for that. > http://wiki.apache.org/couchdb/Introduction_to_CouchDB_views > > > > *Writing To Disk > > *I really like that RavenDB by default writes to disk as it makes sure > that > > when data is sent to the server, the data will be there even if there i= s > a > > power outage or some other event that happens that is out or your > control. > > I would rather sacrifice a little write performance to maintain a much > > better chance that data is not lost. While that data I am storage is n= ot > > super mission critical (like payment information), it is still pretty > > important to the players of the game and important if we want the meta > game > > to be successful. Can CouchDB configured to write to disk instead of > memory > > (or does it do that be default)? > > You can turn off delayed commits for maximum safety, but make sure to > do some performance test. > You can read about delayed commits at > http://guide.couchdb.org/draft/performance.html#single > > > > *Auto Indexing > > *One thing that is really nice with RavenDB is that is has auto index > where > > if you use an index that is not manually create a lot, RavenDB will > > automatically turn the temporary index into an real index for you. Can > > CouchDB do this? > > In CouchDB you build an index by adding a view, i.e. a Map function > and, optionally, a Reduce function. So I don't think it is technically > possible to automatically build it. > > ...just my 2cents. > > Marcello > > PS: I have never used RavenDB so I do not know how does it compare to > CouchDB. > --=20 =93The limits of language are the limits of one's world. =93 -Ludwig von Wittgenstein --20cf307f38064089b904a6b03c21--