From user-return-35415-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Fri Jul 19 07:26:45 2013 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 9C2CB1068F for ; Fri, 19 Jul 2013 07:26:45 +0000 (UTC) Received: (qmail 27379 invoked by uid 500); 19 Jul 2013 07:26:42 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 27027 invoked by uid 500); 19 Jul 2013 07:26:33 -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 27019 invoked by uid 99); 19 Jul 2013 07:26:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Jul 2013 07:26:31 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of post@fantasista.no designates 213.236.237.140 as permitted sender) Received: from [213.236.237.140] (HELO mx1.mailserveren.com) (213.236.237.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Jul 2013 07:26:25 +0000 Received: from localhost ([127.0.0.1]) by mx1.mailserveren.com with esmtpa (Exim 4.80.1) (envelope-from ) id 1V054l-0004Oy-Gv for user@cassandra.apache.org; Fri, 19 Jul 2013 09:26:03 +0200 Message-Id: <19b88a57b6616ff3af460b304195eed00d63066d@pop3.fantasista.no> From: "Vegard Berget" Reply-To: "Vegard Berget" To: user@cassandra.apache.org X-Mailer: Atmail 6.6.2.11727 X-Originating-IP: 46.19.16.3 in-reply-to: <57C7C3CBDCB04F45A57AEC4CB21C0CCD1DBDEA22@mbx024-e1-nj-6.exch024.domain.local> Subject: Re: MailBox Impl Date: Fri, 19 Jul 2013 09:26:03 +0200 Content-Type: multipart/alternative; boundary="=_6177ea17f99ff9388e22ab6d1cbf1806" MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org --=_6177ea17f99ff9388e22ab6d1cbf1806 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi,=0A1) =C2=A0Counters will probably work for this. =C2=A0Our experienc= e with=0Acounters is that it is very accurate. =C2=A0But read up on how= =0Arepair/inconsistencies etc is handled.2) =C2=A0You can not, as far as= i=0Aknow at least, have ttl on part of a counter. =C2=A0What you can do= ,=0Adepending on how accurate it needs to be, is to have counters per ho= ur=0A(or something like that) and add them together for the last 10 days= =0A(which of course can be done async and stored):=C2=A0 MailboxId as ro= wkey,=0AYear,Month,Day,Hour as columnkey. =C2=A0I don't know if this sol= ves=0Aanything for you, but maybe you can use part of that idea for=0Aso= mething?=0A.vegard,=0A=0A----- Original Message -----=0AFrom: user@cassa= ndra.apache.org=0ATo:"user@cassandra.apache.org" =0ACc:=0ASent:Thu, 18 J= ul 2013 21:30:08 +0000=0ASubject:MailBox Impl=0A=0A=09Hi=C2=A0 - We are= planning on using Cassandra for an IMAP based=0Aimplementation. There a= re some questions that we are stuck with =E2=80=93=0A=0A=09=C2=A0=0A=0A= =091)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Each user will have a pre-defined ma= ilbox size (say 10=0AMB). We need to maintain a field to check if the ma= il-box size exceeds=0Athe predefined size. Will using the counter family= be appropriate ?=0A=0A=092)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Also, we need= to have retention for only 10 days. After=0A10 days, the previous days= data will be removed. We plan to have TTL=0Adefined per message. But if= we do that, how does the counter in=0Aquestion 1 get updated with the s= pace cleaned due to deletion ?=0A=0A=093)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= Do we NOT have TTL and manage the deletions within the=0Aapplication it= self ? =0A=0A=09=C2=A0=0A=0A=09Thanks,=0A=0A=09Kanwar=0A=0A=09=C2=A0=C2= =A0=0A=0A=09 --=_6177ea17f99ff9388e22ab6d1cbf1806 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi,

1) =C2=A0Counters will= probably work for this. =C2=A0Our experience with counters is that it i= s very accurate. =C2=A0But read up on how repair/inconsistencies etc is= handled.
2) =C2=A0You can not, as far as i know at least, hav= e ttl on part of a counter. =C2=A0What you can do, depending on how accu= rate it needs to be, is to have counters per hour (or something like tha= t) and add them together for the last 10 days (which of course can be do= ne async and stored):
=C2=A0 MailboxId as rowkey, Year,Month,D= ay,Hour as columnkey. =C2=A0I don't know if this solves anything for you= , but maybe you can use part of that idea for something?

.vegard,

----- Original Message -----=
From:
user@cassandra.apache.org

=
To:
"user@cassandra.apache.org" &l= t;user@cassandra.apache.org>
Cc= :

Sent:
Thu, 18 Jul 201= 3 21:30:08 +0000
Subject:
Mai= lBox Impl


=0A

Hi=C2=A0 - We are plann= ing on using Cassandra for an IMAP based implementation. There are some= questions that we are stuck with =E2=80=93

=0A<= p class=3D"MsoNormal">

=C2=A0

=0A

1)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=0AEach user will ha= ve a pre-defined mailbox size (say 10 MB). We need to maintain a field t= o check if the mail-box size exceeds the predefined size. Will using the= counter family be appropriate ?

=0A

2)=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=0AAlso, we need to have retention for only 10 days. Af= ter 10 days, the previous days data will be removed. We plan to have TTL= defined per message. But if we do that, how does the counter in questio= n 1 get updated=0A with the space cleaned due to deletion ?

=0A

3)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=0ADo we NOT have TTL and manag= e the deletions within the application itself ?=0A

<= /p>=0A

=C2=A0

=0A

Thanks,

=0A

Kanwar

=

=0A

=C2=A0=C2=A0

=0A
=0A=0A=0A
--=_6177ea17f99ff9388e22ab6d1cbf1806--