Safe value transfer between databases

70 Views Asked by At

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.

1

There are 1 best solutions below

1
On BEST ANSWER

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