[prev in list] [next in list] [prev in thread] [next in thread] 

List:       james-dev
Subject:    [jira] [Comment Edited] (JAMES-3926) Refactor quota for Cassandra
From:       "Benoit Tellier (Jira)" <server-dev () james ! apache ! org>
Date:       2023-08-18 8:38:00
Message-ID: JIRA.13543364.1689213772000.13989.1692347880026 () Atlassian ! JIRA
[Download RAW message or body]


    [ https://issues.apache.org/jira/browse/JAMES-3926?page=com.atlassian.jira.plugin. \
system.issuetabpanels:comment-tabpanel&focusedCommentId=17755858#comment-17755858 ] 

Benoit Tellier edited comment on JAMES-3926 at 8/18/23 8:37 AM:
----------------------------------------------------------------

Following some off-the-band confusions I did write an ADR on this topic:

[https://github.com/apache/james-project/pull/1692]

Also I re-upload here the diagram of the application layer structure regarding quota.


was (Author: btellier):
Following some off-the-band confusions I did write an ADR on this topic:

[https://github.com/apache/james-project/pull/1692]

Also I re-upload here the diagram of the application layer sture regarding quota.

> Refactor quota for Cassandra
> ----------------------------
> 
> Key: JAMES-3926
> URL: https://issues.apache.org/jira/browse/JAMES-3926
> Project: James Server
> Issue Type: New Feature
> Components: cassandra
> Reporter: Benoit Tellier
> Priority: Major
> Attachments: adr-68-architecture-diagram.png
> 
> 
> h3. Why?
> Quota is a generic concept, with generic storage, that is found all over the place.
> For instance, maximum definitions are generic: 
> - Maximum definition for mailbox quota count/size per user
> - Maximum definition for mailbox quota count/size per domain
> - Maximum definition for mailbox quota count/size - global
> - Sieve definition for mailbox quota count/size per user
> - Sieve definition for mailbox quota count/size - global
> Idem, current value tracking is also generic:
> - Current value for mailbox quota
> - Current value for Sieve quota
> - Current value for JMAP uploads quota
> We could easily introduce an abstraction reducing the storage boiler plate here:
> - One for maximum definitions
> - One for current values
> h3. Expected benefits
> -> reduced boiler plate
> -> Less Cassandra tables: shrink from 8 tables to just 2
> -> Adding quota related features then becomes way easier. Sample usage: auota for \
> future release? For the count of mailboxes? For identities? ETC... h3. How?
> We define the Cassandra quota helpers into backends/cassandra.
> Define a POJO wrapping a string called `Component`. Exemple value for `Component`: \
> mailbox, sieve, jmapUploads. Define a POJO wrapping a string called `Scope`. \
> Example value: user, domain, global. Define a POJO wrapping a string called \
> `Identifier`. Example value: username, domain, placeHolder for global quotas, \
> etc... Define a QuotaLimitsDAO: store and returns numeric nullable values for a \
> triptic Component+Scope+Identifier. Define a QuotaCurrentValuesDAO: store and \
> returns numeric counter values for a triptic Component+Scope+Identifier. This API \
> will be generic enough in order to re-implement mailbox / sieve DAOs from it, and \
> implement JAMES-3925. By default the old quota definitions should not be loaded \
> when starting James. Migration from old POJOs to the new one can be done via a \
> module chooser.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic