A transaction is a collection or group of operations executed as a whole unit. It provides way to logically group single piece of work and execute them as a single unit. WCF allows client applications to create transactions and to propagate transactions across servers.
- Consider a system maintained in consistent state, when application fails to perform particular operation, you should recover and place the system in the consistent state.
- While doing singe operation, there will be multiple atomic sub operation. These operations might success or fail. We are not considering about sub operation which are failed. We mainly consider about the success operation. Because we have to recover all these state to its previous consistence state.
- Performance will be decreased because you need to execute huge amount of code
So transactions are used to maintain system consistency and handling error-recovery challenges.
- Atomic – When transaction completes, all the individual changes made to the resource were all one atomic, indivisible operation.
- Consistent – Transactions must leave the system in consistent state.
- Isolated – Resources participating in the transaction should be locked and it should not be access by other third party.
- Durable – Durable transactions must survive failures.
© 2015, www.techkatak.com. All rights reserved.