Question

I done some search but can't find proper terms to search.

There is two completely separated, but trusted databases. They have unreliable (but safe) connection. Both databases run on different servers with some probability of server failure.

Both databases operates with money and need to 'transfer' some amount from one account (database #1, server #1) to other (database #2, server #2).

That should be done in the way it will never cause 'lost money', or 'duplicated money', even if both servers crash and restore in worst moment.

I think someone generic algorithm should be for that.

Was it helpful?

Solution

You're right, the is such an algorithm. It's called two-phase commit. It usually requires both DBMSs be the same.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top