You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Norman Maurer <no...@apache.org> on 2010/07/07 07:12:04 UTC

[IMAP Maildir] Using absolute path as Key of Mailbox

Hi Tim,

yesterday while playing with cassandra (to build a cassandra backend
for imap) I noticed some problem with your current implementation of
the mailbox key. You use the absolute path to the mailbox folder as
key. This works fine as long as you don't rename the mailbox. If you
rename the mailbox the path will change and so the key too.. But the
key should not change during the lifetime of the mailbox, because if
it would change you would need to update all key relations to it.

So you will need to generate the id a differently...

Bye,
Norman

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: [IMAP Maildir] Using absolute path as Key of Mailbox

Posted by Norman Maurer <no...@apache.org>.
Hi Tim,

not sure if you could get it to work without the id..

Bye,
Norman

2010/7/7 Tim-Christian Mundt <de...@tim-erwin.de>:
> Hi Norman,
>
> thanks for the hint. That's really valuable. Do we need an ID anyways? JPA
> needs one (until now) to build relationships. But besides that?
> getMailboxById() is hardly ever used IIRC. Will look into this as soon as
> I'm done with the MailPath thing.
>
> Cassandra backend... this will be quite a unique feature for a mail server!
>
> Cheers
> Tim
>
> Norman Maurer schrieb:
>>
>> Hi Tim,
>>
>> yesterday while playing with cassandra (to build a cassandra backend
>> for imap) I noticed some problem with your current implementation of
>> the mailbox key. You use the absolute path to the mailbox folder as
>> key. This works fine as long as you don't rename the mailbox. If you
>> rename the mailbox the path will change and so the key too.. But the
>> key should not change during the lifetime of the mailbox, because if
>> it would change you would need to update all key relations to it.
>>
>> So you will need to generate the id a differently...
>>
>> Bye,
>> Norman
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: [IMAP Maildir] Using absolute path as Key of Mailbox

Posted by Tim-Christian Mundt <de...@tim-erwin.de>.
Hi Norman,

thanks for the hint. That's really valuable. Do we need an ID anyways? 
JPA needs one (until now) to build relationships. But besides that? 
getMailboxById() is hardly ever used IIRC. Will look into this as soon 
as I'm done with the MailPath thing.

Cassandra backend... this will be quite a unique feature for a mail server!

Cheers
Tim

Norman Maurer schrieb:
> Hi Tim,
>
> yesterday while playing with cassandra (to build a cassandra backend
> for imap) I noticed some problem with your current implementation of
> the mailbox key. You use the absolute path to the mailbox folder as
> key. This works fine as long as you don't rename the mailbox. If you
> rename the mailbox the path will change and so the key too.. But the
> key should not change during the lifetime of the mailbox, because if
> it would change you would need to update all key relations to it.
>
> So you will need to generate the id a differently...
>
> Bye,
> Norman
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org