AZ-204 · Question #27
Drag and Drop Question You are creating a collaborative image hosting platform as an ASP.NET MVC web application. Users add, update, and modify images on the platform. Images are stored in Azure…
The correct answer is Retrieve an image blob from the storage service. The response includes an HTTP ETag header value that identifies the current version of the image(blob).; Store the ETag of the blob for further use, and let the user make the necessary modifications to the image.; When you upload the image, include the ETag in the If-Match conditional header of the PUT BLOB request.; Check response headers. If the status code equals 200, notify that it is a success. If the code is 412m notify the user about a conflicting change. Optimistic concurrency in Azure Blob Storage uses ETags to detect conflicting changes without locking resources. The correct sequence is: (1) Retrieve the blob to get its ETag from the response headers, (2) Store the ETag and let the user modify the image, (3) When uploading…
Question
Exhibit
Answer Area
Drag items
Correct arrangement
- Retrieve an image blob from the storage service. The response includes an HTTP ETag header value that identifies the current version of the image(blob).
- Store the ETag of the blob for further use, and let the user make the necessary modifications to the image.
- When you upload the image, include the ETag in the If-Match conditional header of the PUT BLOB request.
- Check response headers. If the status code equals 200, notify that it is a success. If the code is 412m notify the user about a conflicting change.
Explanation
Optimistic concurrency in Azure Blob Storage uses ETags to detect conflicting changes without locking resources. The correct sequence is: (1) Retrieve the blob to get its ETag from the response headers, (2) Store the ETag and let the user modify the image, (3) When uploading, include the ETag in the If-Match conditional header of the PUT BLOB request so Azure only accepts the update if the blob hasn't changed since retrieval, (4) Check the response - HTTP 200 means success, HTTP 412 (Precondition Failed) means another user modified the blob concurrently. This pattern allows multiple users to attempt edits simultaneously while preventing silent overwrites of each other's changes.
Topics
Community Discussion
No community discussion yet for this question.
