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 8034911659 for ; Fri, 10 May 2013 16:54:33 +0000 (UTC) Received: (qmail 42652 invoked by uid 500); 10 May 2013 16:54:32 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 42626 invoked by uid 500); 10 May 2013 16:54:31 -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 42616 invoked by uid 99); 10 May 2013 16:54:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 May 2013 16:54:31 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lancecarlson@gmail.com designates 209.85.210.174 as permitted sender) Received: from [209.85.210.174] (HELO mail-ia0-f174.google.com) (209.85.210.174) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 May 2013 16:54:27 +0000 Received: by mail-ia0-f174.google.com with SMTP id j3so3598982iae.33 for ; Fri, 10 May 2013 09:54:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=SNw8/CDVBQUQR3cixJcLK65sRopKT7eDXSmXF22nnns=; b=mLlb4TtStB2OqUqdwYkafN+Cf8D1neKH5y51QadKUQpbUJvWWLDYxJAKQ3jXRyWCWf r9n4yh66aveuwA4Bu9u0cGxMtiE+X4bq5Q21WptDBwIhQszIKYYM0fRiqQo1WKmLvEZo 0MtJXQ/Q4iLWmJUdtcs0k0bnSNkLRUrnnZmg3NtOcB0s/5G/71S2pudiy4T1k75pDVT6 TWp2L2LdoYCYEFYjb/IreiicVjO0puKN69IxMDkRgTg28znoWmZ0kmx1iqNojY6Dxlv7 WZRKUWhFvzs2ZmgYV5upMLRf+m24Mc0EZQ+M/z9XlwCcVV7irjW0vob+nmcplhfGVL2O Cdng== X-Received: by 10.50.61.232 with SMTP id t8mr2550371igr.37.1368204847255; Fri, 10 May 2013 09:54:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.31.42 with HTTP; Fri, 10 May 2013 09:53:47 -0700 (PDT) In-Reply-To: <20130509233215.0f6c86cf@svilendobrev.com> References: <518B16F5.2040306@alumni.gwu.edu> <8471588272415020431@unknownmsgid> <20130509155252.74edbd0e@svilendobrev.com> <518C0216.9000607@apache.org> <20130509233215.0f6c86cf@svilendobrev.com> From: Lance Carlson Date: Fri, 10 May 2013 12:53:47 -0400 Message-ID: Subject: Re: Mass updates To: "user@couchdb.apache.org" Content-Type: multipart/alternative; boundary=047d7bdc05e8e6afff04dc60039e X-Virus-Checked: Checked by ClamAV on apache.org --047d7bdc05e8e6afff04dc60039e Content-Type: text/plain; charset=ISO-8859-1 So, since I'm dealing with this problem now.. I open sourced a small script that helps at least get couch to Redis and a brain dump of my ideas are included in the README. Feedback appreciated! https://github.com/lancecarlson/couchout.go On Thu, May 9, 2013 at 4:32 PM, svilen wrote: > yeah i know. i've been through it, needing temporaly-versioned > code stored in a db, apart of the data for that time-period.. i know > what it is. Near to impossible - still, it's the only correct one. > > > Ideally, there would be some robust extension to couchdb to handle > > schema changes for large online databases in a sane way. > btw i read that something like virtual views is going to be > made.. one that would help multi-pass queries (which now are made just > via artificial temporary dbs). Maybe these multi-version schemas are > kind of that.. > > On Thu, 09 May 2013 13:07:50 -0700 > Wendall Cada wrote: > > > On 05/09/2013 05:52 AM, svilen wrote: > > >>>>>> The main concern I have is maintaining a consistent state > > >>>>>> across code releases. Presumably, our data model will change > > >>>>>> over the course of time, and when it does, we need to make the > > >>>>>> several million old documents conform to the new model. > > > a question: do u need to keep the old variant/state too? > > > (think bi-temporal stuff) > > > > > > that one, and if the once-off conversion process is going to take > > > loooong time, it might be better to bite the bullet and allow for > > > multiple (e.g. 2) versions of the "schema" to coexist - in both > > > server/views and client code. Thus once u already have some doc in > > > the new variant, use it. Else, fallback to runtime-conversion. > > > > > > i know it isn't easy to organise but otherwise u're fighting > > > reality. > > > > > > svilen > > > > This may sound ideal, but in my experience, this can lead to crazy, > > buggy, eventually un-maintainable code. Additionally, this approach > > ends up quickly in a situation where you're not supporting just two > > schemas, but multiple others as well, as you can never guarantee that > > the schema was updated across the entire database. > > > > This has been discussed at my workplace quite extensively recently. > > Ideally, there would be some robust extension to couchdb to handle > > schema changes for large online databases in a sane way. > > > > The real issue here isn't updating the schema in the db docs, it's > > updating the schema and the requisite view indexes. If the schema > > changes break your ddoc code, there isn't any live db solution > > available that can fix this issue. This part of any database > > maintenance is really, really hard work. It's what DBAs do for a > > living, and is just difficult in different ways depending on the > > database. > > > > Wendall > --047d7bdc05e8e6afff04dc60039e--