문제

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.

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top