Skip to main content
Log in

Compensation by design

  • Original Article
  • Published:
Formal Aspects of Computing

Abstract

The current dominance of the service-based paradigm reflects the success of specific design and architectural principles embodied in terms like SOA and REST. This paper suggests further principles for the design of services exhibiting long-running transactions (that is, transactions whose characteristic feature is that in the case of failure not all system states can be automatically restored: system compensation is required). The principles are expressed at the level of scope-based compensation and fault handling, and ensure the consistency of data critical to the business logic. They do so by demanding (a) either the commitment of all of the transaction or none of it, and (b) that compensation is assured in case of failure in ‘parent’ transactions. The notion of scope is captured algebraically (rather than semantically) in order to express design guidelines which ensure that a given transaction satisfies those principles. Transactional processes are constructed by parallel composition of services, and transactions with scopes in a single service are dealt with as a special case. The system semantics is formalised as a transition system (in Z) and the principles are expressed as formulae in linear temporal logic over runs of the transition system. That facilitates the model checking (using SAL) of their bounded versions. Two simple examples are used throughout to illustrate definitions and finally to demonstrate the approach.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Bruni R, Butler MJ, Ferreira C, Hoare CAR, Melgratti HC, Montanari U (2005) Comparing two approaches to compensable flow composition. In: Proceedings of the international conference concurrency theory (CONCUR’05), San Francisco, CA, USA, 23–26 Aug 2005, pp 383–397

  2. Butler M, Ferreira C (2004) An operational semantics for StAC, a language for modelling long-running business transactions. In Coordination Models and Languages (COORDINATION’04), vol 2949 of lecture notes in computer science. Springer, Berlin

  3. Butler M, Ferreira C, Ng MY (2005) Precise modelling of compensating business transactions and its application to BPEL. J Univers Comput Sci 11(5): 712–743

    Google Scholar 

  4. Butler M, Hoare CAR, Ferreira C (2004) A trace semantics for long-running transactions. In 25 years of communicating sequential processes, Springer, Berlin, pp 133–150

  5. Bhattacharya K, Hull R, Su J (2009) A data-centric design methodology for business processes. In: Handbook of research on business process modeling, IGI Global, Hershey, 2009, pp 503–531

  6. Bruni R, Melgratti HC, Montanari U (2004) Flat committed join in join. Electr Notes Theor Comput Sci 104: 39–59

    Article  Google Scholar 

  7. Bruni R, Melgratti HC, Montanari U (2005) Theoretical foundations for compensations in flow composition languages. In: Proceedings of the ACM symposium on principles of programming languages (POPL’05), Long Beach, CA, USA, 12–14 Jan 2005, pp 209–220

  8. Butler MJ, Ripon S (2005) Executable semantics for compensating CSP. In: Proceedings of formal techniques for computer systems and business processes, Versailles, France, 1–3 Sept 2005, pp 243–256

  9. Coleman JW (2005) Examining BPEL’s compensation construct. In: Proceedings of workshop on rigorous engineering of fault-tolerant systems (REFT), 2005, pp 122–128

  10. Donnelly K, Fluet M (2008) Transactional events. J Funct Program 18(5–6): 649–706

    Article  MATH  Google Scholar 

  11. De Vries E, Koutavas V, Hennessy M (2010) Communicating transactions. In: CONCUR 2010—concurrency theory, vol 6269 of lecture notes in computer science, Springer, Berlin, pp 569–583

  12. De Vries E, Koutavas V, Hennessy M (2010) Liveness of communicating transactions (extended abstract). In: Programming languages and systems, vol 6461 of lecture notes in computer science, Springer, Berlin, 2010, pp 392–407

  13. de Moura L, Owre S, Rueß H, Rushby J, Shankar N, Sorea M, Tiwari A (2004) SAL 2. In: Computer aided verification (CAV’04), vol 3114 of lecture notes in computer science, Springer, Berlin/Heidelberg, pp 251–254

  14. de Moura L, Shankar N (2003) The SAL language manual. Technical report SRI-CSL-01-02 (rev. 02), SRI International, 2003

  15. Fielding RT (2000) Architectural styles and the design of network-based software architectures. Ph.D. dissertation, University of California, Irvine

  16. Fielding RT, Taylor RN (2002) Principled design of the modern web architecture. ACM Trans Internet Technol 2(2): 115–150

    Article  Google Scholar 

  17. Greenfield P, Fekete A, Jang J, Kuo D (2003) Compensation is not enough. In: Proceedings of the international conference on enterprise distributed object computing (EDOC’03), Brisbane, Australia, Sept 2003, pp 232–239

  18. Garcia-Molina H, Salem K (1987) Sagas. In: Proceedings of the 1987 ACM SIGMOD international conference on management of data (SIGMOD’87), San Francisco, CA, pp 249–259

  19. Gray J, Reuter A (1993) Transaction processing: concepts and techniques. Morgan Kaufmann Publishers, San Mateo

  20. He J (2007) UTP semantics for web services. In: Proceedings of the international conference on integrated formal methods (IFM’07), Oxford, UK, 2–5 July 2007, Springer, Berlin, pp 353–372

  21. He J (2008) Transaction calculus. In: Proceedings of the IEEE high assurance systems engineering symposium (HASE’08), Nanjing, China, p 4

  22. Korth HF, Levy E, Silberschatz A (1990) A formal approach to recovery by compensating transactions. In: Proceedings of the international conference on very large data bases (VLDB’90), Brisbane, Australia, pp 95–106

  23. Kopp O, Mietzner R, Leymann F (2009) The influence of an external transaction on a BPEL scope. In: On the move to meaningful internet systems (OTM’09), vol 5870 of lecture notes in computer science, Springer, Berlin/Heidelberg, 2009, pp 381–388

  24. Liao J, Tan H, Liu J-D (2005) Describing and verifying web service using pi-calculus. Chin J Comput 28(4): 635–642

    Google Scholar 

  25. Li J, Zhu H, He J (2007) Algebraic semantics for compensable transactions. In: Proceedings of the international conference on theoretical aspects of computing (ICTAC’07), 2007, pp 306–321

  26. Mendling J, Nüttgens M (2006) EPC markup language (EPML): an XML-based interchange format for event-driven process chains (EPC). Inf Syst e-Bus Manag 4: 245–263

    Article  Google Scholar 

  27. Mendling J, Simon C (2006) Business process design by view integration. In: Business process management workshops, vol 4103 of lecture notes in computer science, Springer, Berlin/Heidelberg, 2006, pp 55–64

  28. OASIS Web Services Business Process Execution Language (WSBPEL) TC (2007) Web services business process execution language version 2.0. OASIS standard, 2007

  29. OASIS Web Services Transaction (WS-TX) TC (2009) Web services atomic transaction (WS-AtomicTransaction) version 1.2., 2009

  30. OASIS Web Services Transaction (WS-TX) TC (2009) Web services business activity (WS-BusinessActivity) version 1.2. OASIS Standard, 2009

  31. OASIS Web Services Transaction (WS-TX) TC (2009) Web services coordination (WS-Coordination) version 1.2., OASIS Standard, 2009

  32. Pottinger S, Mietzner R, Leymann F (2007) Coordinate BPEL scopes and processes by extending the WS-business activity framework. In: Proceedings of OTM Confederated international conference on On the move to meaningful internet systems, Springer, Berlin/Heidelberg, 2007, pp 336–352

  33. Pnueli A (1977) The temporal logic of programs. In: Proceedings of annual symposium on foundations of computer science, IEEE Computer Soceity Press, Los Alamitos, pp 46–57

  34. Peled D, Pelliccione P, Spoletini P (2009) Model checking. Wiley Encyclopedia of computer science and engineering, Wiley, Chichester

  35. Qiu Z, Wang S, Pu G, Zhao X (2005) Semantics of BPEL4WS-like fault and compensation handling. In: FM 2005: formal methods, vol 3582 of lecture notes in computer science, Springer, Berlin/Heidelberg, 2005, pp 350–365

  36. Ripon S, Butler MJ (2010) Deriving relationships between semantic models—an approach for cCSP. CoRR, abs/1002.3330, 2010

  37. Ripon S, Butler MJ (2010) Formalizing cCSP synchronous semantics in PVS. CoRR, abs/1001.3464, 2010

  38. Sun C-A, el Khoury E, Aiello M (2010) Transaction management in service-oriented systems: requirements and a proposal. IEEE Trans Serv Comput, 99 (preprints), 2010.

  39. Sauter P, Melzer I (2005) A comparison of WS-business activity and BPEL4WS long-running transaction. In: Kommunikation in verteilten systemen (KiVS), Informatik aktuell, Springer, Berlin, 2005, pp 115–125

  40. Spivey JM (1992) The Z notation: a reference manual. 2nd edn, Prentice Hall, Englewood Cliffs

  41. Smith G, Wildman L (2005) Model checking Z specifications using SAL. In: Formal specification and development in Z and B (ZB’03), vol 3455 of lecture notes in computer science, Springer, Berlin/Heidelberg, 2005, pp 85–103

  42. Wang R, Salzberg B, Lomet D (2010) Log-based middleware server recovery with transaction support. VLDB J: 1–24

  43. Zhang Y, Liu J, Tang Q, Wu Y (2011) Modeling web services composition with timed pi calculus. Inf Technol J 10(6): 1194–1200

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Xi Liu.

Additional information

Communicated by M.J. Butler

This work was begun while all authors were at UNU-IIST. They acknowledge support from the Macau Science and Technology Development Fund, FDCT, under the PEARL Project 041/2007/A3, and the National Natural Science Foundation of China (No. 91118007, No. 61021062) and the National863 High-Tech Program of China (No. 2011AA010103, No. 2012AA011205).

Rights and permissions

Reprints and permissions

About this article

Cite this article

Liu, X., Yang, S. & Sanders, J.W. Compensation by design. Form Asp Comp 26, 623–676 (2014). https://doi.org/10.1007/s00165-013-0275-6

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00165-013-0275-6

Keywords

Navigation