You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Kanwar Sangha <ka...@mavenir.com> on 2013/07/18 23:30:08 UTC

MailBox Impl

Hi  - We are planning on using Cassandra for an IMAP based implementation. There are some questions that we are stuck with -


1)      Each user will have a pre-defined mailbox size (say 10 MB). We need to maintain a field to check if the mail-box size exceeds the predefined size. Will using the counter family be appropriate ?

2)      Also, we need to have retention for only 10 days. After 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 question 1 get updated with the space cleaned due to deletion ?

3)      Do we NOT have TTL and manage the deletions within the application itself ?

Thanks,
Kanwar


Re: MailBox Impl

Posted by sankalp kohli <ko...@gmail.com>.
Conter wont be updated when the old data is TTLed. I am not sure whether
you can use triggers https://issues.apache.org/jira/browse/CASSANDRA-1311


On Thu, Jul 18, 2013 at 2:30 PM, Kanwar Sangha <ka...@mavenir.com> wrote:

>  Hi  - We are planning on using Cassandra for an IMAP based
> implementation. There are some questions that we are stuck with –****
>
> ** **
>
> **1)      **Each user will have a pre-defined mailbox size (say 10 MB).
> We need to maintain a field to check if the mail-box size exceeds the
> predefined size. Will using the counter family be appropriate ?****
>
> **2)      **Also, we need to have retention for only 10 days. After 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 question 1 get
> updated with the space cleaned due to deletion ?****
>
> **3)      **Do we NOT have TTL and manage the deletions within the
> application itself ? ****
>
> ** **
>
> Thanks,****
>
> Kanwar****
>
>   ****
>

Re: MailBox Impl

Posted by Vladimir Prudnikov <v....@gmail.com>.
Great link, thanks.


On Fri, Jul 19, 2013 at 9:40 AM, CharSyam <ch...@gmail.com> wrote:

> How about this:
> http://www.elasticinbox.com/
>
> 2013년 7월 19일 금요일에 Vegard  Berget<po...@fantasista.no>님이 작성:
>
> > Hi,
> > 1)  Counters will probably work for this.  Our experience with counters
> is that it is very accurate.  But read up on how repair/inconsistencies etc
> is handled.
> > 2)  You can not, as far as i know at least, have ttl on part of a
> counter.  What you can do, depending on how accurate it needs to be, is to
> have counters per hour (or something like that) and add them together for
> the last 10 days (which of course can be done async and stored):
> >   MailboxId as rowkey, Year,Month,Day,Hour as columnkey.  I 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" <us...@cassandra.apache.org>
> > Cc:
> > Sent:
> > Thu, 18 Jul 2013 21:30:08 +0000
> > Subject:
> > MailBox Impl
> >
> >
> > Hi  - We are planning on using Cassandra for an IMAP based
> implementation. There are some questions that we are stuck with –
> >
> >
> >
> > 1)      Each user will have a pre-defined mailbox size (say 10 MB). We
> need to maintain a field to check if the mail-box size exceeds the
> predefined size. Will using the counter family be appropriate ?
> >
> > 2)      Also, we need to have retention for only 10 days. After 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 question 1 get updated
> with the space cleaned due to deletion ?
> >
> > 3)      Do we NOT have TTL and manage the deletions within the
> application itself ?
> >
> >
> >
> > Thanks,
> >
> > Kanwar
> >
> >
>



-- 
Vladimir Prudnikov

Re: MailBox Impl

Posted by CharSyam <ch...@gmail.com>.
How about this:
http://www.elasticinbox.com/

2013년 7월 19일 금요일에 Vegard  Berget<po...@fantasista.no>님이 작성:
> Hi,
> 1)  Counters will probably work for this.  Our experience with counters
is that it is very accurate.  But read up on how repair/inconsistencies etc
is handled.
> 2)  You can not, as far as i know at least, have ttl on part of a
counter.  What you can do, depending on how accurate it needs to be, is to
have counters per hour (or something like that) and add them together for
the last 10 days (which of course can be done async and stored):
>   MailboxId as rowkey, Year,Month,Day,Hour as columnkey.  I 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" <us...@cassandra.apache.org>
> Cc:
> Sent:
> Thu, 18 Jul 2013 21:30:08 +0000
> Subject:
> MailBox Impl
>
>
> Hi  - We are planning on using Cassandra for an IMAP based
implementation. There are some questions that we are stuck with -
>
>
>
> 1)      Each user will have a pre-defined mailbox size (say 10 MB). We
need to maintain a field to check if the mail-box size exceeds the
predefined size. Will using the counter family be appropriate ?
>
> 2)      Also, we need to have retention for only 10 days. After 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 question 1 get updated
with the space cleaned due to deletion ?
>
> 3)      Do we NOT have TTL and manage the deletions within the
application itself ?
>
>
>
> Thanks,
>
> Kanwar
>
>

Re: MailBox Impl

Posted by Vegard Berget <po...@fantasista.no>.
Hi,
1)  Counters will probably work for this.  Our experience with
counters is that it is very accurate.  But read up on how
repair/inconsistencies etc is handled.2)  You can not, as far as i
know at least, have ttl on part of a counter.  What you can do,
depending on how accurate it needs to be, is to have counters per hour
(or something like that) and add them together for the last 10 days
(which of course can be done async and stored):  MailboxId as rowkey,
Year,Month,Day,Hour as columnkey.  I 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" 
Cc:
Sent:Thu, 18 Jul 2013 21:30:08 +0000
Subject:MailBox Impl

	Hi  - We are planning on using Cassandra for an IMAP based
implementation. There are some questions that we are stuck with –

	 

	1)      Each user will have a pre-defined mailbox size (say 10
MB). We need to maintain a field to check if the mail-box size exceeds
the predefined size. Will using the counter family be appropriate ?

	2)      Also, we need to have retention for only 10 days. After
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
question 1 get updated with the space cleaned due to deletion ?

	3)      Do we NOT have TTL and manage the deletions within the
application itself ? 

	 

	Thanks,

	Kanwar