Even if a single idempotent interaction between one client and one RESTful Web service is reliable, it is not clear how to guarantee the property of atomicity when a client is interacting with multiple RESTful Web services. Even if HTTP has been designed to achieve reliable transfer of state between client and server, it is not clear how to use HTTP in order to let a client atomically transfer the state among two resources owned by different servers. There is considerable debate in the REST community whether or not transactions are needed, desirable and possible, but it is agreed that many are reluctant to adopt REST to build SOAs in enterprise settings due to the apparent lack of transactional support.
This presentation's contribution to this debate is threefold:
- we define a business case for atomic distributed transactions in REST based on the Try-Cancel/Confirm (TCC) pattern,
- we outline a very light-weight protocol that guarantees atomicity and recovery over distributed REST resources, and
- we discuss the inherent theoretical limitations of our approach.
As opposed to existing work in the area, our TCC for REST protocol minimizes the assumptions made on the individual services that can be part of a transaction (ensuring that they remain loosely coupled) and does not require any extension to the HTTP protocol.
Watch the recording of Transactions for the REST of us presentation on InfoQ
but also have a look at the book "SOA with REST: Principles, Patterns & Constraints for Building Enterprise Solutions with REST
" in which this and other REST-based transaction methods are documented.
- M. Babazadeh, Distributed Atomic Transactions over RESTful Services, Master Thesis, University of Lugano, Switzerland, June 2012
- T. Erl, B. Carlyle, C. Pautasso, R. Balasubramanian, SOA with REST: Principles, Patterns & Constraints for Building Enterprise Solutions with REST, Prentice Hall, August 2012, ISBN 9780137012510
- G. Pardon, C. Pautasso, Towards Distributed Atomic Transactions over RESTful Services, in: REST: from Research to Practice, Springer, 2011
C. Pautasso, RESTful Web Service Composition with JOpera, Proc. of the International Conference on Software Composition (SC 2009), Zurich, Switzerland, July 2009