Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 6454 invoked from network); 1 Feb 2011 18:16:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Feb 2011 18:16:36 -0000 Received: (qmail 15480 invoked by uid 500); 1 Feb 2011 18:16:33 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 15254 invoked by uid 500); 1 Feb 2011 18:16:30 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 15240 invoked by uid 99); 1 Feb 2011 18:16:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Feb 2011 18:16:30 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of edlinuxguru@gmail.com designates 209.85.161.44 as permitted sender) Received: from [209.85.161.44] (HELO mail-fx0-f44.google.com) (209.85.161.44) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Feb 2011 18:16:25 +0000 Received: by fxm9 with SMTP id 9so7742626fxm.31 for ; Tue, 01 Feb 2011 10:16:04 -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:content-transfer-encoding; bh=iHCbksLdxLC/oAwxGR7lXFK+Br1znwPiFZ0en+HTrVk=; b=dUY1VHhj0iKI8o6mn/uIYboG6Ydoq53DIGowOjG4hHPn78ZqLCM6wD0vfIBnotzUMP Q7MGw9+lR9L8hhy9GOCad/iN6AgvBDXaEl/faU4AEy/dnTMVf9E2zsaD9tAljFcUnTxQ 8KbH1FbzcHJ4D7tylB6bWtoC12znLFgMohvCI= 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:content-transfer-encoding; b=ofq3pVAs6W7LGN+b7NsWs/uEz408bL7NaX/23Hkp9JG1XfwKJdjlTNWOOUSJq44CTd cloFVl9ze4O3py+6pPVn0EDrr26qNMKzoeWotownEX5rRdl2ermL+d6DmsS+9M3iy/3G kiLuhBSEIz6RIVg+5zvHhG/hmmoRAb9OkNlQw= MIME-Version: 1.0 Received: by 10.223.81.68 with SMTP id w4mr7517692fak.84.1296584163889; Tue, 01 Feb 2011 10:16:03 -0800 (PST) Received: by 10.223.115.12 with HTTP; Tue, 1 Feb 2011 10:16:03 -0800 (PST) In-Reply-To: References: <1296582141589-5981961.post@n2.nabble.com> Date: Tue, 1 Feb 2011 13:16:03 -0500 Message-ID: Subject: Re: cassandra as session store From: Edward Capriolo To: user@cassandra.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Tue, Feb 1, 2011 at 12:57 PM, Anthony John wrote= : > Not a concern - and here is why:- > From the wiki arch section captioned below - eventual consistency does no= t > have to mean inconsistent reads. The concern is the overhead for consiste= nt > reads. But remember in the use case being cited, the expensive read will > happen only during failover, not all the time. > > More specifically:=A0R=3Dread replica count=A0W=3Dwrite replica count=A0N= =3Dreplication > factor=A0Q=3DQUORUM=A0(Q =3D N / 2 + 1) > > If W + R > N, you will have consistency > > W=3D1, R=3DN > W=3DN, R=3D1 > W=3DQ, R=3DQ where Q =3D N / 2 + 1 > > On Tue, Feb 1, 2011 at 11:47 AM, Tong Zhu wrote: >> >> The problem is where to store the session data. If the session need to b= e >> accessible by more than one web servers, the external storage is needed. >> >> Cassandra only supports eventual consistency. If web server w1 saves the >> session at node 1 of cassendra while web server w2 retrieve the session = from >> different node, if these two requests are close enough, there is a chanc= e >> what w2 retrieved is different from what w1 saved. Is it a concern? >> >> Tong >> >> >> >> -----Original Message----- >> From: buddhasystem [mailto:potekhin@bnl.gov] >> Sent: Tuesday, February 01, 2011 9:42 AM >> To: cassandra-user@incubator.apache.org >> Subject: Re: cassandra as session store >> >> >> Most if not all modern web application frameworks support sessions. This >> applies to Django (with which I have most experience and also run it wit= h >> X.509 security layer) but also to Ruby on Rails and Pylons. >> >> So, why would you re-invent the wheel? Too messy. It's all out there for >> you >> to use. >> >> Regards, >> Maxim >> >> -- >> View this message in context: >> http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/cassand= ra-as-session-store-tp5981871p5981961.html >> Sent from the cassandra-user@incubator.apache.org mailing list archive a= t >> Nabble.com. >> >> >> This message and any attachments contain information that may be RMS Inc= . >> confidential and/or privileged. =A0If you are not the intended recipient= (or >> authorized to receive for the intended recipient), and have received thi= s >> message in error, any use, disclosure or distribution is strictly >> prohibited. =A0 If you have received this message in error, please notif= y the >> sender immediately by replying to the e-mail and permanently deleting th= e >> message from your computer and/or storage system. > > Ah. Eventual Consistency! Mama no! RUN! From: Download JSR-000315 Java Servlet 3.0 Final Release for Documentation, Engli= sh Distributed Environments Within an application marked as distributable, all requests that are part of a session must be handled by one JVM at a time. The container must be able to handle = all objects placed into instances of the HttpSession class using the setAttribu= te or putValue methods appropriately. The following restrictions are imposed to m= eet these conditions: This look to be the responsibly of the web cluster to ensure serialized access not the backend. (At least how I am reading it)