From user-return-27940-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Thu Aug 2 05:26:45 2012 Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-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 32C1290C7 for ; Thu, 2 Aug 2012 05:26:45 +0000 (UTC) Received: (qmail 17152 invoked by uid 500); 2 Aug 2012 04:57:20 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 16983 invoked by uid 500); 2 Aug 2012 04:57:19 -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 16941 invoked by uid 99); 2 Aug 2012 04:57:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Aug 2012 04:57:18 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=FREEMAIL_REPLY,FSL_RCVD_USER,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jeffpk@gmail.com designates 209.85.220.172 as permitted sender) Received: from [209.85.220.172] (HELO mail-vc0-f172.google.com) (209.85.220.172) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Aug 2012 04:57:13 +0000 Received: by vcbfo14 with SMTP id fo14so8421525vcb.31 for ; Wed, 01 Aug 2012 21:56:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=8TyHcQtHr3UOH2IY2ES709ZqUDWNZZHmjGLxejVaUzU=; b=RaOUb4u8nvkxE1DXoeePiWUhR2VOljoVw42cgJ/J9UIcauO+uOFA32B0+ySAkqSHEZ VUXH+WjPQPELnYcCEWPUaXBBjkYGq737NAGLhiHZWA20IFqOzx/vgtOkA2H/0tBDwZYF 9rCO3NlTbJWi71xJIH9JThXB8YIBCeA0wYFapjjMj6ILvbuIaLebvoioktam05lHNI3P Y75WzVMO2BnL2B6jFu8R2xaLRtLXLRt8bOW/fcyCjChTvQTzCWol6FecDae66XiEYUOx eaqp4weuTpqJf3LsckNj84u65J1iuneF8mucXHIp07tjClzLnszjbhF4kl50wGB8pKkb U8wA== Received: by 10.58.33.234 with SMTP id u10mr7879196vei.49.1343883412640; Wed, 01 Aug 2012 21:56:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.210.103 with HTTP; Wed, 1 Aug 2012 21:56:32 -0700 (PDT) In-Reply-To: References: From: Jeffrey Kesselman Date: Thu, 2 Aug 2012 00:56:32 -0400 Message-ID: Subject: Re: Does Cassandra support operations in a transaction? To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=047d7b2ee6e76e157604c6413db0 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b2ee6e76e157604c6413db0 Content-Type: text/plain; charset=ISO-8859-1 Roshni, Thats not what consistancy in ACID means. Its not consistancy of reading the ame data, its referntial integrity between related pecies of data. "Consistency Data is in a consistent state when a transaction starts and when it ends. For example, in an application that transfers funds from one account to another, the consistency property ensures that the total value of funds in both the accounts is the same at the start and end of each transaction. " http://publib.boulder.ibm.com/infocenter/cicsts/v3r2/index.jsp?topic=%2Fcom.ibm.cics.ts.productoverview.doc%2Fconcepts%2Facid.html A lot of people i nthe NoSql wqorld use the term "consistancy" when what they mean is "durability." " Durability After a transaction successfully completes, changes to data persist and are not undone, even in the event of a system failure. " Many NoSql databses (includiogn Cassandra) are eventuallydurable, in the sense that a read immediately after a write may noit reflect that write, but at soem l;ater point, it will. None p[rovide true consistancy that I am aware of. : On Thu, Aug 2, 2012 at 12:24 AM, Roshni Rajagopal < Roshni.Rajagopal@wal-mart.com> wrote: > Hi Ivan, > > Cassandra supports 'tunable consistency' . If you always read and write at > a quorum (or local quorum for multi data center) from one , you can > guarantee that the results will be consistent as in all the data will be > compared and the latest will be returned, and no data will be out of date. > This is at a loss of performance- it will be fastest to just read and write > once rather than check a quorum of nodes. > > What you chose depends on what your application needs are. Is it ok if > some users receive out of date data (it isn't earth shattering if someone > doesn't know what you're eating right now), or is it a banking transaction > system where all entities must be consistently updated. > > So designing in cassandra priortizes de-normalization. You cannot have > referential integrity that 2 tables (col families in cassandra) are in sync > because the database has designed it to be so using foreign keys. The > application needs to ensure that all data in column families are accurate > and not out of sync, because data elements may be duplicated in different > col families. > > > You cannot have 2 different entities and ensure that changes to both will > be done and then only be visible to others. > > > Regards, > > > From: Jeffrey Kesselman > > Reply-To: "user@cassandra.apache.org" < > user@cassandra.apache.org> > To: "user@cassandra.apache.org" < > user@cassandra.apache.org> > Subject: Re: Does Cassandra support operations in a transaction? > > Short story is that few if any of the NoSql systems supprot transactions > natively. Thats oen of the big compromises they make. What they call > "eventual consistancy" is actually eventual Durabiltiy in ACID terms. > > Consistancy, as meant by the C in ACID, is not gauranteed at all. > > On Wed, Aug 1, 2012 at 6:21 AM, Ivan Jiang wiwi1985@gmail.com>> wrote: > Hi, > I am a new guy to Cassandra, I wonder if available to call Cassandra > in one Transaction such as in Relation-DB. > > Thanks in advance. > > Best Regards, > Ivan Jiang > > > > -- > It's always darkest just before you are eaten by a grue. > > This email and any files transmitted with it are confidential and intended > solely for the individual or entity to whom they are addressed. If you have > received this email in error destroy it immediately. *** Walmart > Confidential *** > -- It's always darkest just before you are eaten by a grue. --047d7b2ee6e76e157604c6413db0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Roshni,
=A0
Thats not what consistancy in ACID mea= ns.=A0 Its not consistancy of reading the ame data, its referntial integrit= y between related pecies of data.
=A0
"Consistency= =20
Data is in a consistent state when a transactio= n starts and when it=20 ends.=20
For example, in an application that transfers funds from o= ne=20 account to another, the consistency property ensures that the total value o= f=20 funds in both the accounts is the same at the start and end of each transac= tion. "
=A0
A lot of people i nthe NoSql w= qorld use the term "consistancy" when what they mean is "dur= ability."
=A0
"
Durability=20
After a transaction successfully completes, changes to dat= a persist=20 and are not undone, even in the event of a system failure. "
=
=A0
Many NoSql databses (inc= ludiogn Cassandra) are eventuallydurable, in the sense that a read immediat= ely after a write may noit reflect that write, but at soem l;ater point, it= will.
=A0
None p[rovide true consistancy= that I am aware of.
=A0
=A0<= /div>

:

On Thu, Aug 2, 2012 at 1= 2:24 AM, Roshni Rajagopal <Roshni.Rajagopal@wal-mart.com&g= t; wrote:
Hi Ivan,

Cassandra supports 'tunable consistency' . If you always read and w= rite at a quorum (or local quorum for multi data center) from one , you can= guarantee that the results will be consistent as in all the data will be c= ompared and the latest will be returned, and no data will be out of date. T= his is at a loss of performance- it will be fastest to just read and write = once rather than check a quorum of nodes.

What you chose depends on what your application needs are. Is it ok if some= users receive out of date data (it isn't earth shattering if someone d= oesn't know what you're eating right now), or is it a banking trans= action system where all entities must be consistently updated.

So designing in cassandra priortizes de-normalization. You cannot have refe= rential integrity that 2 tables (col families in cassandra) are in sync bec= ause the database has designed it to be so using foreign keys. The applicat= ion needs to ensure that all data in column families are accurate and not o= ut of sync, because data elements may be duplicated in different col famili= es.


You cannot have 2 different entities and ensure that changes to both will b= e done and then only be visible to others.


Regards,


From: Jeffrey Kesselman <jeffpk@gmai= l.com<mailto:jeffpk@gmail.com>>
Reply-To: "
user@cassandra= .apache.org<mailto:user= @cassandra.apache.org>" <user@cassandra.apache.org<mailto:user@cassandra.apache.org>>
To: "user@cassandra.apach= e.org<mailto:user@cassa= ndra.apache.org>" <user@cassandra.apache.org<mailto:user@cassandra.apache.org>>
Subject: Re: Does Cassandra support operations in a transaction?

Short story is that few if any of the NoSql systems supprot transactions na= tively. Thats oen of the big compromises they make. =A0What they call "= ;eventual consistancy" is actually eventual Durabiltiy in ACID terms.<= br>
Consistancy, as meant by the C in ACID, =A0is not gauranteed at all.

On Wed, Aug 1, 2012 at 6:21 AM, Ivan Jiang <wiwi1985@gmail.com<mailto:wiwi1985@gmail.com>> wrote:
Hi,
=A0 =A0 I am a new guy to Cassandra, I wonder if available to call Cassandr= a in one Transaction such as in Relation-DB.

Thanks in advance.

Best Regards,
Ivan Jiang



--
It's always darkest just before you are eaten by a grue.

This email and any files transmitted with it are confidential and int= ended solely for the individual or entity to whom they are addressed. If yo= u have received this email in error destroy it immediately. *** Walmart Con= fidential ***



--
It's always darkest= just before you are eaten by a grue.
--047d7b2ee6e76e157604c6413db0--