I have 2 databases. One is a SQL Server and other is MongoDB. Both these DBs are hosted on AWS.
I need to make a .NET background service that runs periodically (maybe once a month) and update a huge amount of data in both SQL Server as well as MongoDB. And I need to do it in a single "distributed transaction" so that there is no data inconsistency between the 2 DBs and the data is in sync.
I have read about 2 Phase transactions
but I think that won't be possible here because MongoDB does does not support transactions?(correct me if I am wrong, but we are using MongoDB 3.4 and I think that does not support transactions).
So I was planning to see if I can implement the saga pattern
to implement the distributed transaction?
Is there any other pattern/techniques that I should look into to get this done?