Real-World Choreographies

Since the early days of the Internet, distributed software applications have become one of the leading forces behind the development and economic growth of our society. Nonetheless, the practice of programming distributed systems is one of the most error-prone. Developers strive to correctly implement separate components that, put together, enact an agreed protocol. If one component fails to follow such protocol, it could lead to system blocks or misbehaviours. Ensuring that all components correctly follow the intended protocol is very difficult due to the inherent non-determinism of distributed programs. This led practitioners and theoretical researchers to explore new tools to assist the development of distributed systems. Choreographies are one of these tools. They have been introduced to describe from a global viewpoint the exchange of messages among the components of a distributed system. Moreover, since they describe atomic communications (not split into I/Os), they are free from deadlocks and race conditions by design. Recent theoretical results proved that it is possible to define proper Endpoint Projection (EPP) functions to compile choreographic specifications into their single components. Since EPPs are behaviour preserving, projected systems also enjoy freedom from deadlocks and races by construction. Some of these results have been implemented, however much work has to be done to make choreographies a suitable tool for real-world programming. Aim of this PhD is to formalise non-trivial features of distributed systems with choreographies and to translate our theoretical results into the practice of implemented systems. To this purpose, we provide two main contributions. The first contribution tackles one of the most challenging features of distributed development: programming correct and consistent runtime updates of distributed systems. There is no affirmed technology for structuring runtime updates of distributed applications. Moreover, the non-determinism of distributed systems easily leads to partial applications of updates and to inconsistent systems. Our solution is a theoretical model of dynamic choreographies, called DIOC. DIOC provides a clear definition of which components and behaviours can be updated. We prove that systems compiled from a DIOC definition are correct and consistent after any update. Finally, we refine our theoretical model with constructs for a finer control over updates. On this refinement, we develop a framework for programming adaptable distributed systems, called AIOCJ. The second contribution covers one of the main issues of implementing theoretical results on choreographies: formalising the compilation from choreographies to executable programs. There is a sensible departure between choreographic frameworks like Chor (the first on this paradigm) and AIOCJ and their theoretical models: their theories abstract communications with synchronisation on names (a la CCS/π-calculus) yet they compile to Jolie programs, an executable language that uses correlation — a renowned technology of Service-Oriented Computing — for message routing. This discontinuity breaks the chain of proven correctness from choreographies to implemented systems. Our solution is a theory of Applied Choreographies (AC) that models correlation-based message passing. With AC, we formalise the key theoretical problems and the guiding principles that developers should follow to obtain correct implementations. Finally, we prove our approach by defining a correct compiler from AC to the calculus behind the Jolie language.

[1]  Antonio Bucchiarone,et al.  A Framework for Rule-Based Dynamic Adaptation , 2010, TGC.

[2]  Benjamin C. Pierce,et al.  Types and programming languages: the next generation , 2003, 18th Annual IEEE Symposium of Logic in Computer Science, 2003. Proceedings..

[3]  Jorge A. Pérez,et al.  Disciplined structured communications with consistent runtime adaptation , 2013, SAC '13.

[4]  Julian Rathke,et al.  Dynamic Software Update for Message Passing Programs , 2012, APLAS.

[5]  Brian Randell,et al.  Implementing Software-Fault Tolerance in C++ and Open C++: An Object-Oriented and Reflective Approach , 1996 .

[6]  Roger M. Needham,et al.  Using encryption for authentication in large networks of computers , 1978, CACM.

[7]  Francisco Curbera,et al.  Web Services Business Process Execution Language Version 2.0 , 2007 .

[8]  Bjarne Stroustrup,et al.  C++ Programming Language , 1986, IEEE Softw..

[9]  Other Contributors Are Indicated Where They Contribute The Eclipse Foundation , 2017 .

[10]  Mark Weiser,et al.  The computer for the 21st Century , 1991, IEEE Pervasive Computing.

[11]  Wil M. P. van der Aalst,et al.  Process Aware Information Systems: Bridging People and Software Through Process Technology , 2005 .

[12]  Mathias Weske,et al.  Business Process Management: Concepts, Languages, Architectures , 2007 .

[13]  Gregor Kiczales,et al.  Aspect-oriented programming , 1996, CSUR.

[14]  Paolo Milazzo,et al.  BoPi - a distributed machine for experimenting Web services technologies , 2005, Fifth International Conference on Application of Concurrency to System Design (ACSD'05).

[15]  Roy T. Fielding,et al.  Hypertext Transfer Protocol - HTTP/1.1 , 1997, RFC.

[16]  John McCarthy,et al.  LISP 1.5 Programmer's Manual , 1962 .

[17]  Andreas Wombacher,et al.  Evolution of Process Choreographies in DYCHOR , 2006, OTM Conferences.

[18]  Sebastian Götz,et al.  Exploring Role Based Adaptation , 2008, RAM-SE.

[19]  Jeffrey O. Kephart,et al.  An architectural approach to autonomic computing , 2004 .

[20]  Manfred Reichert,et al.  Enabling Flexibility in Process-Aware Information Systems: Challenges, Methods, Technologies , 2012 .

[21]  Marco Aurélio Gerosa,et al.  A systematic literature review of service choreography adaptation , 2012, Service Oriented Computing and Applications.

[22]  Gary Brown,et al.  Scribbling Interactions with a Formal Foundation , 2011, ICDCIT.

[23]  Samuel T. Chanson,et al.  Distributed, object-based programming systems , 1991, CSUR.

[24]  Barton P. Miller,et al.  What are race conditions?: Some issues and formalizations , 1992, LOPL.

[25]  Heather Goldsby,et al.  Modular verification of dynamically adaptive systems , 2009, AOSD '09.

[26]  Ivan Lanese,et al.  Bridging the Gap between Interaction- and Process-Oriented Choreographies , 2008, 2008 Sixth IEEE International Conference on Software Engineering and Formal Methods.

[27]  Ivan Lanese,et al.  Towards Global and Local Types for Adaptation , 2013, SEFM Workshops.

[28]  Mathias Weske,et al.  BPEL4Chor: Extending BPEL for Modeling Choreographies , 2007, IEEE International Conference on Web Services (ICWS 2007).

[29]  Yuanyuan Zhou,et al.  Learning from mistakes: a comprehensive study on real world concurrency bug characteristics , 2008, ASPLOS.

[30]  Oscar Nierstrasz,et al.  Context-oriented Programming , 2008, J. Object Technol..

[31]  Vasco Thudichum Vasconcelos,et al.  Language Primitives and Type Discipline for Structured Communication-Based Programming Revisited: Two Systems for Higher-Order Session Communication , 1998, SecReT@ICALP.

[32]  Mariangiola Dezani-Ciancaglini,et al.  Self-adaptive multiparty sessions , 2014, Service Oriented Computing and Applications.

[33]  Luca Padovani,et al.  On Global Types and Multi-Party Session , 2012, Log. Methods Comput. Sci..

[34]  Nobuko Yoshida,et al.  Global escape in multiparty sessions † , 2014, Mathematical Structures in Computer Science.

[35]  Mike P. Papazoglou,et al.  Service-oriented computing: concepts, characteristics and directions , 2003, Proceedings of the Fourth International Conference on Web Information Systems Engineering, 2003. WISE 2003..

[36]  Mario Bravetti,et al.  Towards a Unifying Theory for Choreography Conformance and Contract Compliance , 2007, SC@ETAPS.

[37]  Seyed Masoud Sadjadi,et al.  An aspect-oriented approach to dynamic adaptation , 2002, WOSS '02.

[38]  Fabrizio Montesi,et al.  Programming Services with Correlation Sets , 2011, ICSOC.

[39]  Ivar Jacobson,et al.  The Unified Modeling Language User Guide , 1998, J. Database Manag..

[40]  Frank E. Redmond Dcom: Microsoft Distributed Component Object Model , 1997 .

[41]  Tim Berners-Lee,et al.  Uniform Resource Locators (URL) , 1994, RFC.

[42]  Ladan Tahvildari,et al.  Self-adaptive software: Landscape and research challenges , 2009, TAAS.

[43]  Chao Cai,et al.  Towards the theoretical foundation of choreography , 2007, WWW '07.

[44]  Matteo Pradella,et al.  Programming language support to context-aware adaptation: a case-study with Erlang , 2010, SEAMS '10.

[45]  Vinton G. Cerf,et al.  A brief history of the internet , 1999, CCRV.

[46]  Luca Padovani,et al.  Global progress for dynamically interleaved multiparty sessions , 2014, Mathematical Structures in Computer Science.

[47]  Nobuko Yoshida,et al.  Compositional Choreographies , 2013, CONCUR.

[48]  John W. Backus,et al.  The syntax and semantics of the proposed international algebraic language of the Zurich ACM-GAMM Conference , 1959, IFIP Congress.

[49]  Roberto Gorrieri,et al.  Choreography and Orchestration Conformance for System Design , 2006, COORDINATION.

[50]  William R. Crowther,et al.  The interface message processor for the ARPA computer network , 1899, AFIPS '70 (Spring).

[51]  Nobuko Yoshida,et al.  Multiparty Compatibility in Communicating Automata: Characterisation and Synthesis of Global Session Types , 2013, ICALP.

[52]  Nobuko Yoshida,et al.  Structured Communication-Centred Programming for Web Services , 2007, ESOP.

[53]  Robin Milner,et al.  A Calculus of Communicating Systems , 1980, Lecture Notes in Computer Science.

[54]  Jan A. Bergstra,et al.  The Discrete Time TOOLBUS - A Software Coordination Architecture , 1998, Science of Computer Programming.

[55]  Laurence Duchien,et al.  JAC: A Flexible Solution for Aspect-Oriented Programming in Java , 2001, Reflection.

[56]  C. Peltz,et al.  Web Services Orchestration and Choreography , 2003, Computer.

[57]  Michael Haupt,et al.  A comparison of context-oriented programming languages , 2009, COP@ECOOP.

[58]  Nobuko Yoshida,et al.  Session-Based Distributed Programming in Java , 2008, ECOOP.

[59]  Matteo Pradella,et al.  An Analysis of Language-Level Support for Self-Adaptive Software , 2013, TAAS.

[60]  Kim Mens,et al.  Context traits: dynamic behaviour adaptation through run-time trait recomposition , 2013, AOSD.

[61]  Loris D'Antoni,et al.  Global Progress in Dynamically Interleaved Multiparty Sessions , 2008, CONCUR.

[62]  Samik Basu,et al.  Deciding choreography realizability , 2012, POPL '12.

[63]  Davide Sangiorgi,et al.  The Pi-Calculus - a theory of mobile processes , 2001 .

[64]  Mira Mezini,et al.  Aspect-Oriented Web Service Composition with AO4BPEL , 2004, ECOWS.

[65]  Fabrizio Montesi,et al.  Deadlock-freedom-by-design: multiparty asynchronous global programming , 2013, POPL.

[66]  Gianluigi Zavattaro,et al.  Service-Oriented Programming with Jolie , 2014, Web Services Foundations.

[67]  Drummond Reed,et al.  OpenID 2.0: a platform for user-centric identity management , 2006, DIM '06.

[68]  Cosimo Laneve,et al.  A Basic Contract Language for Web Services , 2006, ESOP.

[69]  Arie Shoshani,et al.  System Deadlocks , 1971, CSUR.

[70]  Jeff Magee,et al.  Self-Managed Systems: an Architectural Challenge , 2007, Future of Software Engineering (FOSE '07).

[71]  Matti A. Hiltunen,et al.  Constructing adaptive software in distributed systems , 2001, Proceedings 21st International Conference on Distributed Computing Systems.

[72]  C. M. Sperberg-McQueen,et al.  Extensible Markup Language (XML) , 1997, World Wide Web J..

[73]  Antonio Bucchiarone,et al.  Dynamic Adaptation of Fragment-Based and Context-Aware Business Processes , 2012, 2012 IEEE 19th International Conference on Web Services.

[74]  Tim Berners-Lee,et al.  The World-Wide Web , 1994, CACM.

[75]  Nobuko Yoshida,et al.  Practical Interruptible Conversations - Distributed Dynamic Verification with Session Types and Python , 2013, RV.

[76]  Robert Metcalfe,et al.  Ethernet: distributed packet switching for local computer networks , 1976, CACM.

[77]  Jeffrey O. Kephart,et al.  The Vision of Autonomic Computing , 2003, Computer.

[78]  Jim Dowling,et al.  Using Reflection to Support Dynamic Adaptation of System Software: A Case Study Driven Evaluation , 1999, Reflection and Software Engineering.

[79]  Nobuko Yoshida,et al.  Multiparty Session Actors , 2014 .

[80]  George Coulouris,et al.  Distributed systems - concepts and design , 1988 .

[81]  Simon J. Gay,et al.  Subtyping for session types in the pi calculus , 2005, Acta Informatica.

[82]  Andreas Wombacher Alignment of Choreography Changes in BPEL Processes , 2009, 2009 IEEE International Conference on Services Computing.

[83]  Pattie Maes Concepts and experiments in computational reflection , 1987, OOPSLA 1987.

[84]  Stéphane Faulkner,et al.  Dynamic Requirements Specification for Adaptable and Open Service-Oriented Systems , 2007, ICSOC.

[85]  Matteo Pradella,et al.  An evaluation of the adaptation capabilities in programming languages , 2011, SEAMS '11.

[86]  Peyman Oreizy,et al.  Architecture-based runtime software evolution , 1998, Proceedings of the 20th International Conference on Software Engineering.

[87]  Laurence Duchien,et al.  JAC: an aspect‐based distributed dynamic framework , 2004, Softw. Pract. Exp..

[88]  Tim Bray,et al.  Internet Engineering Task Force (ietf) the Javascript Object Notation (json) Data Interchange Format , 2022 .

[89]  Nobuko Yoshida,et al.  Structured Interactional Exceptions in Session Types , 2008, CONCUR.

[90]  Fabrizio Montesi,et al.  Kickstarting Choreographic Programming , 2014, WS-FM.

[91]  Randy H. Katz,et al.  A view of cloud computing , 2010, CACM.