C#C
C#16mo ago
Denis

✅ Distributed transactions

I'm developing a server + clients suite of applications.

What bothers me is the chance that the client's communication with the server will be interrupted during writes.

Primarily during several interdependent writes, e.g.:
  • Create an empty record,
  • insert data into the record,
  • mark the record as checked-in.
Of course, the simplest thing would be to unify all such processes into one API call, but what if it can be done in smarter way...

I found something about 2PC and SAGA, however, these solutions are tailor-made for microservices, which from my point of view is not quite my case.

I only have client applications that call the server as part of some business process - I can more easily monitor the scope of transactions within the given process.

The goal is that in the event of a technical or business failure, it is possible to:
  • Capture, report to the user, and log
  • Perform a rollback.
Any suggestions?
Was this page helpful?