Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 87345 invoked from network); 21 Jan 2011 15:05:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Jan 2011 15:05:06 -0000 Received: (qmail 71261 invoked by uid 500); 21 Jan 2011 15:05:04 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 70953 invoked by uid 500); 21 Jan 2011 15:05:01 -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 70943 invoked by uid 99); 21 Jan 2011 15:05:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jan 2011 15:05:00 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=10.0 tests=FREEMAIL_FROM,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 bchesneau@gmail.com designates 209.85.210.180 as permitted sender) Received: from [209.85.210.180] (HELO mail-iy0-f180.google.com) (209.85.210.180) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jan 2011 15:04:51 +0000 Received: by iyj21 with SMTP id 21so1863790iyj.11 for ; Fri, 21 Jan 2011 07:04:29 -0800 (PST) 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=xUcxOo8NsBzYVKhUIV75FFkmcbYGbquPTZel7FwJbUM=; b=YuGlp6Gh3IdykUZtGUyhTBAw1fExjOz5ZHNRiHpp2NU8WyZTOFhfoqxqcnCYAEqIeo dKSdpLM6w2HlwRtK7NTVchydE1A7OmiPbimzRwZCQfwaouL5Qx6Y0W91dU+aghW4VqDW wDt+mpo/iP6MC8KMzR10fb9/z+WwNajKs8Gbc= 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=cIAEqxsbo5+iIMYIBQRRzlKjLah1h+DkO0OiKICd5TFvE0TbTFG2Ir4FplXY6BZNQ6 jfGPXhWprijeKuCCvLwCM9CdnJqdjRj+zQ8qPEJ1ruGmFDm+xTSXo0hxbSCJoDRKIG4h o76GrIuy3LbyZs2aQFH6W2ISso8XGD+pgaeMk= MIME-Version: 1.0 Received: by 10.231.20.68 with SMTP id e4mr844420ibb.194.1295622268837; Fri, 21 Jan 2011 07:04:28 -0800 (PST) Received: by 10.231.32.193 with HTTP; Fri, 21 Jan 2011 07:04:28 -0800 (PST) In-Reply-To: References: Date: Fri, 21 Jan 2011 16:04:28 +0100 Message-ID: Subject: Re: CouchDB suitable as session store? From: Benoit Chesneau To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On Fri, Jan 21, 2011 at 3:58 PM, He Shiming wrote: > Hi, > > I've created a beaker extension to use CouchDB as session store > (because my application is already using couchdb under pylons / > python). The beaker library serializes a dict of objects using pickle. > So it's essentially a key (session id) value (serialized content) > pair. My application puts lots of information in sessions. And some of > them are constantly changing during user navigation. > > I quickly noticed that a single user can create some 5MB large > documents during like 3 minutes of navigation. After compacting it's > like 20KB. This doesn't look good because it's taking up too much > space and I may need to constantly go to futon to compact it. > Compacting might be slow because of the size. > > I was wondering if there's an option for me to compact a particular > document after each time I save? > > Or should I just go for redis for session store? > I used couchdb for session on friendpaste/couchit and other sites but then decided to use redis for that and only use couchdb as a datastore. Since session don't really need to be fully persistent, redis fit well. Or kyoto tycoon . - benoit