C#C
C#2y ago
6 replies
LazyGuard

Architecture Review

I am trying to wrap my head around this https://learn.microsoft.com/en-us/azure/architecture/patterns/async-request-reply by working on a real example.

The idea is that there is some long running request (it could take to minutes). And this pattern is used to make it asynchronous. We have three endpoints

/generate-transcript: This endpoint initiates the transcript generation process for a specific id (given in body). It handles the initial request from the client to start the transcription task. The app then returns a 202 Accepted and a Location header that contains a pointer to the resource status endpoint.

/transcript-status/{requestId} : This endpoint is responsible for checking the status of the transcription process initiated by /generate-transcript. It helps the client monitor the progress and readiness of the transcript. The server responds with an empty 200 OK (or 404 it depends) if the status is unavailable, indicating that the transcript hasn't been generated yet. The client keeps pooling, when the transcript is available the response will be 302 with a Location header that contains a pointer to the transcript resource.


/transcripts/{id}: This endpoint serves the completed transcript upon successful generation.


At the architecture level, I am thinking about the implementation in the given picture.

Any reviews ?
image.png
Allow decoupling of backend processing from a frontend host, where backend processing needs to be asynchronous, but the frontend still needs a clear response.
Asynchronous Request-Reply pattern - Azure Architecture Center
Was this page helpful?