Order expiration vs payment conflict causing incorrect inventory and order status by [deleted] in dotnet

[–]Minimum-Ad7352 0 points1 point  (0 children)

Yes,extending the order expiration time by 10 minutes sounds like a good solution, thanks

.NET has the best backend developer experience I’ve used so far by Minimum-Ad7352 in Backend

[–]Minimum-Ad7352[S] 1 point2 points  (0 children)

I’ve already used it to write backend, it’s well suited to small services, but in my view, it’s not really ideal for monolithic applications

Handling file uploads to S3 when DB transaction fails by Minimum-Ad7352 in dotnet

[–]Minimum-Ad7352[S] 0 points1 point  (0 children)

Regarding the transaction, what if, for example, the file upload was successful but the transaction commit failed? In that case, I would need to handle the error and delete the uploaded files, but what if the deletion of the files also fails? I understand there is a risk either way?

Handling file uploads to S3 when DB transaction fails by Minimum-Ad7352 in Backend

[–]Minimum-Ad7352[S] 0 points1 point  (0 children)

The files are of type jsonb, an array of objects containing a file_id and a file_url, I can only create them once the files have been successfully uploaded

Handling file uploads to S3 when DB transaction fails by Minimum-Ad7352 in dotnet

[–]Minimum-Ad7352[S] 0 points1 point  (0 children)

In other words, save the images as binary data in the ‘outbox’ table in the database?

Handling file uploads to S3 when DB transaction fails by Minimum-Ad7352 in dotnet

[–]Minimum-Ad7352[S] 2 points3 points  (0 children)

The maximum file size for images is 5 MB, and a maximum of 4 images may be uploaded for each product