|
|
|
|
|
by mustardo
1537 days ago
|
|
For your "maybe slightly better is" what happens when the db commit fails? FK constraint or some such, now you have sent an email (called the API) and have no record in your DB Without two phase commits I would 1) Write to the DB in the original POST request a record indicating that an email should be sent
2) Process that record outside of the original request and mark it as sent |
|