From dev-return-22398-apmail-couchdb-dev-archive=couchdb.apache.org@couchdb.apache.org Fri Jun 8 12:16:09 2012 Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7F0A8CA0B for ; Fri, 8 Jun 2012 12:16:09 +0000 (UTC) Received: (qmail 25332 invoked by uid 500); 8 Jun 2012 12:16:09 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 24974 invoked by uid 500); 8 Jun 2012 12:16:06 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 23989 invoked by uid 99); 8 Jun 2012 12:16:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jun 2012 12:16:05 +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 (nike.apache.org: domain of simon@cloudant.com designates 74.125.83.52 as permitted sender) Received: from [74.125.83.52] (HELO mail-ee0-f52.google.com) (74.125.83.52) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jun 2012 12:15:56 +0000 Received: by eeke53 with SMTP id e53so1265035eek.11 for ; Fri, 08 Jun 2012 05:15:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:message-id:in-reply-to:references:subject:x-mailer :mime-version:content-type:x-gm-message-state; bh=yORJkHZvEgmiZWyOd0VGxM+yMfgcQMuelipT4qeFd/8=; b=W2NOg7PDrToUE2190Nh/hM4+m7bE9k9NuzhI1J+1KSgjS+MW8C/g0g2ATbc1gtXC9W c+z0q45xwAiTXnxv+0+80HNjkSUWUXSZewt4veUTxbR9hRam9fMvVvLXlUxOJXtovL/g T7cDYYjIHVToBEpANBPYfPv9oXANtpIpEe2ELmrXJoNze8VA+zf+4mcKd3VaE36x9SA5 DhW7ttoBIrSW7kKW7dLtHLxP8+DGRUoc6WX6DkBEq5OABQzxUs7xKLHN24CdM0DmWWbk csxoMylgqjdF2Djgi8g88HjHI9rBenvMP8CrRK5DkWGIxGHD7NbnjVh24N2se3JPOxar +DCA== Received: by 10.14.101.78 with SMTP id a54mr4065413eeg.92.1339157735665; Fri, 08 Jun 2012 05:15:35 -0700 (PDT) Received: from [192.168.1.83] (93-97-111-13.zone5.bethere.co.uk. [93.97.111.13]) by mx.google.com with ESMTPS id j4sm924334wiz.1.2012.06.08.05.15.34 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 08 Jun 2012 05:15:34 -0700 (PDT) Date: Fri, 8 Jun 2012 13:15:33 +0100 From: Simon Metson To: dev@couchdb.apache.org Message-ID: <1BC8BB788FC4481DA3A0D525C11218CA@cloudant.com> In-Reply-To: References: Subject: Re: versioning for sensors data storage X-Mailer: sparrow 1.6 (build 1081.27) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="4fd1ece5_12f9357a_11e68" X-Gm-Message-State: ALoCoQm5ygOw91G4EZCYxwLremjNELMdxtHX4GF7me5i6yfYrViqRFOiT600W49cKaG7+23/RaRn --4fd1ece5_12f9357a_11e68 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, > From the "architecture" point of view it could be a nice solution with > CouchDB, where each sensor is represented by a document and each > sample of sensor data is a version of this document. > > You don't want to do that, as soon as a compaction occurs you'll loose your history. Instead make a document for each sample, and include the sensor id in that document, so you can build a view of the samples for a given sensor. > The questions are: > - do we have time/date information for versions > > No, you'd need to add that into the document yourself. > - is it easy/good to access document version history > - what is a limit on number of versions and how it affects performance > > See above > - is it possible/easy/good to get a time snapshot of database > > > You mean for backup? Sure, either copy the db file or if you need to access it remotely you can page through _all_docs to get a snapshot. You could also use the _changes feed to do a rolling backup. Cheers Simon --4fd1ece5_12f9357a_11e68--