james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josip Almasi <...@vrspace.org>
Subject Re: Cassandra mailbox improvement
Date Sun, 23 Nov 2014 07:52:58 GMT

can you do that and make a patch?


On 11/18/2014 09:26 AM, Benoit Tellier wrote:
> Hi ,
> I am an intern at Linagora, and I was asked to continue Phillipe Benoit
> works on James. He did a contribution for a James mailbox using
> Cassandra as a backend. I already implemented quotas and  a group
> membership resolver using Cassandra.
> I also need to implement ACLs. I noticed the use of locks when re -
> calculating acls for a given mailbox ( in the message manager ). But, as
> the datastax driver we are using does not support path locking and ACID
> transactions, I had to find an other way to do it.
> I finally heard about lightweight transaction. What I decided to do was
> to add to fields to the mailbox table : one field of binary data ( our
> serialized ACLs for this mailbox ) and a version number. So when we call
> setRights ( message manager ) what it should do is to retrieve the ACLs
> and the associated version number. It then re calculates the ACLs,
> serialize it, and update it with an increment of the version number only
> if the version number wasn't changed.
> As I really don't like copy and paste, I want to re use as much code as
> I can :
>    - It would be nice to reuse the StoreMessageManager, with just
> overloading the setRights method to retry a lightweight transaction if
> it fails (eg : someone changed it ) . But to implement the setRights
> method I need an access to the mailbox. I need the mailbox parameter of
> the StoreMessageManager to have protected access rights.
>    - reusing the SimpleMailboxACL seems to be a good idea, but I need to
> serialize it. I just need that it ( and the classes it contains )
> implements the Serializable interface.
> That's some really simple changes that will prevent me from copying and
> pasting thousand of lines of code.
> Thank you very much,
> Benoit Tellier

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

View raw message