[
https://issues.apache.org/jira/browse/JAMES-2806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16876012#comment-16876012
]
Tellier Benoit commented on JAMES-2806:
---------------------------------------
We currently run into issues with this ticket:
- The ObjectStorage BlobStore expects explicit bucket creation when a blob is
created
- Whereas memory + cassandra such creation is not needed
The issue is that with programatic use of the buckets (akka one per month in
the context of the deletedMessage vault) we will have to handle missing buckets.
We decided to make bucket creation implicit upon blob saving - akka catching
the error, creating the bucket and saving the blob again. Then we can remove
the costly 'attempt default bucket creation upon start'. We will still have to
do some reasonable concurrent testing regarding this.
In the future, we might want to introduce a webadmin endpoint to pre-provision
buckets ahead of time. We discussed the need to relate that to a feature in
order not to require the admin to know about the naming schema. Also a hook
system upon bucket creation can be used to notify and admin / perform
additional configuration (region, etc...). This will not be done as part of
this task.
> Adding bucket capability into BlobStore
> ---------------------------------------
>
> Key: JAMES-2806
> URL: https://issues.apache.org/jira/browse/JAMES-2806
> Project: James Server
> Issue Type: Sub-task
> Components: Blob
> Reporter: Tellier Benoit
> Priority: Major
>
> You should update current BlobStore API to be able to customize the way we
> storeBlob:
> - We want to store a blob in a specified bucket
> {code:java}
> public interface BlobStore {
> Publisher<BlobId> save(BucketName, byte[] data);
> Publisher<BlobId> save(BucketName, InputStream data);
> Publisher<byte[]> readBytes(BucketName, BlobId blobId);
> InputStream read(BucketName, BlobId blobId);
> }
> {code}
> And to implement the feature of deleting buckets exceed retention time, we
> need to have another additional method of deleting bucket:
> {code:java}
> public interface BlobStore {
> Publisher<Void> delete(BucketName bucket);
> }
> {code}
> Scope: API change, contract test, memory + object storage implementation -
> cassandra will be done in a later task
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]