These days, I have been engaged on a mission which mainly is a big rewrite in .NET Core F# + Occasion Sourcing + PostgreSQL of an outdated sub-ledger legacy app written in .NET 4.6 C# + SQL Server.
Because the complete rework factor can not occur in a single day and the legacy course of must run until each single piece is examined changed, we opted for distributed transactions through the
TransactionScope class, it normally works, however the tradeoff is that you just want clear up orphaned transactions in case that there’s a crash (and mainly that may occur everytime you’re updating a service), probabilities will not be excessive, however that may nonetheless occurred and already occurred.
Lengthy story brief, we have to hold a sure consistency between what’s written within the legacy system (ie. SQL Server) and what’s written is the brand new system (ie. PostgreSQL) till all the pieces is ok, it is a crucial system so cannot actually mess up with it.
So I am questioning is there actually another on the subject of write some knowledge into each databases (albeit with a distinct format)?
In order that we are able to have the assure that the transaction has labored out (or not) for each DBs (I put the emphasis on each, trigger it needs to be both true or false). What we completely wish to keep away from is that there’s a piece of information written into one and never different (system).
I’ve heard concerning the saga sample however not too positive how this may be utilized in that context realizing that we will not change a lot the legacy system.