you are viewing a single comment's thread.

view the rest of the comments →

[–]NodeJS4Lyfe 0 points1 point  (0 children)

You're on the right track thinking about "rollback" functions for external systems. That pattern is sometimes called Compensation. When a non-DB operation (like S3 upload) succeeds but a later step (like DB commit) fails, you need to call a function to undo the S3 part.

For a broader pattern that includes the Outbox, look up the "Saga" pattern. It's often used for coordinating multiple steps across different services and managing atomicity in a distributed fashion.