[ https://issues.apache.org/jira/browse/JAMES-3926?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benoit Tellier updated JAMES-3926: ---------------------------------- Attachment: adr-68-architecture-diagram.png > 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-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org