Opened 10 years ago
Last modified 3 years ago
#11675 new enhancement
IAttachmentStorage interface for pluggable attachment storage — at Version 14
Reported by: | Ryan J Ollos | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | next-dev-1.7.x |
Component: | general | Version: | |
Severity: | normal | Keywords: | |
Cc: | Jun Omae | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description (last modified by )
Change History (14)
comment:1 by , 9 years ago
Cc: | added |
---|
comment:2 by , 9 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:3 by , 9 years ago
Milestone: | 1.1.3 → 1.1.4 |
---|
comment:4 by , 9 years ago
Milestone: | 1.1.4 → 1.1.5 |
---|
comment:5 by , 9 years ago
Milestone: | 1.1.5 → 1.2 |
---|
comment:7 by , 9 years ago
Milestone: | 1.1.6 → next-dev-1.1.x |
---|---|
Owner: | removed |
Status: | assigned → new |
comment:8 by , 9 years ago
Related idea that may be possible with additional interfaces is to allow VersionControlSystems for attachment storage.
comment:9 by , 9 years ago
Milestone: | next-dev-1.1.x → next-dev-1.3.x |
---|
Narrowing focus for milestone:1.2. Please move ticket to milestone:1.2 if you intend to fix it.
comment:10 by , 7 years ago
I did some work on factoring out an IAttachmentStorage
interface: log:rjollos.git:t11675_iattachmentstorage_interface. Next, I'll look at interfacing with a remote storage service. Apache libcloud looks interesting, so I may write a plugin that uses it. I'm posting the changes early in case anyone wants to give feedback.
I'm unsure if/how XSendFile can be used with a file served by an external resource, but will investigate that while implementing plugins that implement IAttachmentStorage
for various services.
follow-up: 12 comment:11 by , 7 years ago
This sounds great. The IAttachmentStorage
interface looks nice.
I assume for remote storage services this would mean all attachment uploads and downloads will still be routed through the Trac server? (Not directly between the browser and the remote storage.)
(This would presumably solve one of the main problems with running Trac on Heroku. There's still #11339, but apparently that can be worked around somehow.)
comment:12 by , 7 years ago
Replying to Peter Suter:
I assume for remote storage services this would mean all attachment uploads and downloads will still be routed through the Trac server? (Not directly between the browser and the remote storage.)
I'm unsure if it's possible to route directly between browser and remote storage, but I plan to research that. It seems like a widely useful optimization given the prevalence of services like Amazon S3.
(This would presumably solve one of the main problems with running Trac on Heroku. There's still #11339, but apparently that can be worked around somehow.)
Trac on Heroku is the main target I have in mind and I plan to look at #11339 after this ticket is complete. It would be nice to have a Deploy in Heroku button on WikiStart, so that users can have a Trac instance running in just a few clicks.
I'll also look at implementing an IAttachmentStorage interface for a document database, such as MongoDB.
comment:13 by , 7 years ago
I have also wondered for a while if a deploy button would be a good idea. (At least one alternative exists in Deploy on OpenShift, and I guess BitNami might also be possible.)
For Amazon S3 I've used a redirect to a boto3.generate_presigned_url for downloading files directly in a similar use-case. This seemed surprisingly simple. Direct uploading was a bit more complicated (client-side logic and a new server-side endpoint for boto3.generate_presigned_post).
(But for Trac it would probably be largely acceptable to route through the server for many installations where attachments are relatively small / infrequent.)
comment:14 by , 7 years ago
Description: | modified (diff) |
---|---|
Summary: | FileSystem component and abstract interface → IAttachmentStorage interface for pluggable attachment storage |
Narrowing focus for 1.1.4.