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 C10F2DD0A for ; Thu, 13 Dec 2012 16:36:35 +0000 (UTC) Received: (qmail 11109 invoked by uid 500); 13 Dec 2012 16:36:35 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 10798 invoked by uid 500); 13 Dec 2012 16:36:35 -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 10784 invoked by uid 99); 13 Dec 2012 16:36:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Dec 2012 16:36:34 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.214.52] (HELO mail-bk0-f52.google.com) (209.85.214.52) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Dec 2012 16:36:27 +0000 Received: by mail-bk0-f52.google.com with SMTP id w5so1261520bku.11 for ; Thu, 13 Dec 2012 08:36:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudno.de; s=mail; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=qyKFkBdq2LZia1PdVFCczGu5N+VUkaviR3TvfXVwxsU=; b=pm1JqyvImdzG3IxhcAxwBW2hT2Um9POUBSROakJGtYy/b6QQdOELFsKWO+jDnbxXsY giXkfsQEe+md5AMlppqE6JIqcZCoq9jR43IP0a7ztIgyaghc0o7LQ2UvCf9HPwqZVIY9 ZohMDg4z0hC0+mAfvSacrWGu6R7LMuV8AqzTA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=qyKFkBdq2LZia1PdVFCczGu5N+VUkaviR3TvfXVwxsU=; b=G/3W+jGi35fU4l/LADLMRFTPiTx0cvigEhxnrMfOe90ECjh1p65bxXWI0s+LpBjA39 gRUi6sDjrWfrHNkXOOGSh5ORi+tljtNPKm7py6DtaHwKCtUvP7kyDJQAfosuuZwMZ9T1 xpLezP9Fu15nLUJaHuIZGkIdrzEcDBWkAQUq4DhDjz2LeRGyODBIDJGphuvd0XSYYROa 0T6HQiwek4JC2+fQzpJ1pSjmspKCtYxchec/H4pCeyPnAG0BslTFMhhzMCan+bN2aKaQ kaIkn2CY8FxW7oG7ueTvbd5kcrXDXYI0FAbFv6YLBafyf74KGZPxe1QIQSQTkz6Qub3d pyJw== Received: by 10.204.11.142 with SMTP id t14mr1378410bkt.9.1355416565032; Thu, 13 Dec 2012 08:36:05 -0800 (PST) Received: from [192.168.0.193] (dslb-084-061-172-146.pools.arcor-ip.net. [84.61.172.146]) by mx.google.com with ESMTPS id r16sm1956859bkv.3.2012.12.13.08.36.03 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 13 Dec 2012 08:36:04 -0800 (PST) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: database design question: concurrent writes From: Hans J Schroeder In-Reply-To: Date: Thu, 13 Dec 2012 17:36:00 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: dev@couchdb.apache.org X-Mailer: Apple Mail (2.1499) X-Gm-Message-State: ALoCoQlz6+uJXzKtB0xVfiiml8E7hRa/66hN9LW6eDnw3y8SU1hmlvMLfqMzZNQZLPxgJkZSZDie X-Virus-Checked: Checked by ClamAV on apache.org On Dec 13, 2012, at 5:06 PM, Benoit Chesneau = wrote: > Hi all, >=20 >=20 > This morning I was back reading a lot of fundamentals about databases = and > such and was asking myself how we could increase the number of = concurrent > writes. >=20 > These days the theory is that it will be solved by sharding the = databases > in multiples database files and merging results of the queries. Since = the > databases will be shareded then the writes on the same db will be > concurrents. A map of the shards willl be kept aside. All of this = thanks to > the introduction of bigcouch. >=20 > The question I have is why don't we already do that? Ie balancing = datas on > different files on one db? for example the db folder could be >=20 > database/XY.couch >=20 > where XY are the first letters of an id or content hash or any = consistent > hashing method. >=20 > I am currently asking myself such question because I am wondering how = will > the backup works when couchdb will be used as a single node. How to = backup > only one db without having to query for the mapping and such? How to = keep > it it simple. >=20 > Related to that why did bigcouch used that design? Why mapping shards = in a > db database instead of having some kind of natural balancing on the fs = and > having a consistent hashing algorithm used to balance on different > machines/vms as well ? >=20 >=20 > - beno=EEt Hi,=20 That's like "horizontal partitioning" in conventional databases and I = think its a great idea. Having a writer process for each partition will = make it scale. Does Bigcouch have anything for the view files too or are they just = sharding the backing files? - Hans=