Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DMP-2402: Upload audio to azure directly from DARTS gateway #611

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Ben-Edwards-cgi
Copy link
Contributor

Links

Jira

Change description

Transferring audio files between the Proxy and the API for upload to Azure was observed to be slow during performance testing. To address, the proxy should upload the audio file to Azure blob store directly, instead of sending over to the API. In case of failure, the metadata will be stored in Azure blob store, associated to the audio file. Then, the new /audio/metadata endpoint (DMP-4115) in DARTS API should be invoked from the Proxy to save the metadata of the audio file to the database. 

This change should also be applied to the Gateway. If this is not trivial to just copy the code across please raise a new ticket to track. 
h3. Acceptance criteria

AC1: Send audio and metadata into DARTS Proxy

GIVEN an audio file is sent

WHEN it is received into the Proxy

THEN the audio file and metadata is uploaded to Azure Blob store

AND the metadata is sent to the DARTS API and associated with the correct case

 

AC2: Send audio and metadata into DARTS Gateway

GIVEN an audio file is sent

WHEN it is received into the Gateway

THEN the audio file and metadata is uploaded to Azure Blob store

AND the metadata is sent to the DARTS API and associated with the correct case

Does this PR introduce a breaking change? (check one with "x")

[ ] Yes
[X] No

@Ben-Edwards-cgi Ben-Edwards-cgi requested a review from a team as a code owner November 12, 2024 15:40
@Ben-Edwards-cgi Ben-Edwards-cgi requested review from davet1985, jackmaloney and hemantasharma1129 and removed request for a team November 12, 2024 15:40
@Ben-Edwards-cgi Ben-Edwards-cgi changed the title DMP-2402: Upload audio to azure directly from DARTS Proxy DMP-2402: Upload audio to azure directly from DARTS gateway Nov 12, 2024
## See https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blobs-tune-upload-download-java
block-size-bytes: 10_000_000
max-single-upload-size-bytes: 10_000_000
max-concurrency: 5
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this restricting the number of uploads to blob storage at once?
if we have 155 courthouses, would this need to be bigger?
@hemantasharma1129

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants