Deadlock prevention for service orchestration via controlled Petri nets
Introduction
Internet brings popular applications and computing paradigms, e.g., cloud computing, Web 3.0, mobile Internet, big data, Internet of Things and social networking [4]. The characteristics of Internet including openness, dynamics, and evolution, help us develop new technologies that evolve to effectively cope with fast changes in runtime contexts and user demands [9], [35]. The research about future Internet contributes to a distributed computing environment where a growing number of interactions are completed by using workflow service invocations. In Internet-scale and service-based workflow ecosystems, dynamic coordination and automatic composition for service workflow systems play an important role in realizing this concept [8], [43].
Existing service composition mechanisms typically realize the service orchestration according to Web Services Business Process Execution Language (WS-BPEL) [39], and they need a centralized approach to compose multiple services into a larger application [44]. It is shown that orchestration works well in static contexts with predefined services. However, these assumptions cannot well adapt to the Internet-based workflow ecosystem where different service workflow providers and consumers change their requirements, and therefore it is difficult to coordinate them with a centralized method.
On the contrary, service interaction specification languages, e.g., Web Services Choreography Description Language (WS-CDL) [48] and Web Service Choreography Interface (WSCI) [47], provide a decentralized method where a looser way is provided to realize service composition by determining participants and message protocols between them. Service choreographies present peer-to-peer message exchanges among participant services from a global perspective. Nevertheless, orchestration-based systems typically consider the following problems:
Firstly, a realizability check is essential to check if each implemented participant realizes orchestration provided that it conforms to the orchestration role specifying its expected behavior;
Secondly, a conformance check is essential to check if the global interaction of many services meets the orchestration [5]; and
Thirdly, web service orchestrations might fail to work well because inconsistent semantics can be buried in their interfaces and protocols among systems of different participants.
To solve these problems, many studies have proposed different methods [7], [10], [15]. However, most of these methods focus on direct composition between services. Partial compatibility is common in real-life web service interfaces and protocols. It means that functions of two or more web services are complementary, but their interfaces and protocols contain mismatches [17], [25]. Thus, they cannot be immediately composed. Besides, partial compatibility may cause problems including mutual waiting mismatch [38], unspecified reception mismatch [57] and non-local choice mismatch [33], [55]. This work aims to solve the non-local choice mismatch problem caused by partial compatibility. It can be formulated as: local choices of two services are different, and this causes deadlock [56], as shown in Fig. 1.
In Fig. 1, a service makes a local choice after it sends a message a (a!). For example, it sends a message b (b!) or c (c!). At the same time, its partner also needs to make a local choice, and waits for the message b (b?) or the message c (c?) after its partner receives message a (a?). If a service and its partner make the same choices, i.e., its partner is expecting to receive y while it is sending b, no problem arises. However, if its partner is expecting to receive c while it is sending b, a non-local choice mismatch occurs.
Enforcing partially compatible services to work with each other without any deadlock is critical and valuable to the reuse of services. In the case of non-local choice mismatches, it is assumed that the administrator of service composition establishes an optimal enforcement controller in the message channel for service orchestration that frees programmers from specifying subtle and hard-to-identify deadlocks. Therefore, programmers can focus on business process logic and depend on the optimal controller to provide a deadlock-free execution.
Main contributions of this work are summarized as follows:
- (1)
this work proposes a controlled Petri net-based method, i.e., controlled composition-of-service workflow net (C-CSWN) model, to avoid non-local choice mismatch in service orchestrations;
- (2)
this work establishes a controlled reduced reachability graph (CRRG) to efficiently determine deadlocks; and
- (3)
this work designs an optimal controller to realize an optimal control policy for incompatible service orchestration.
The rest of the work is organized as follows. A motivating scenario for compatibility analysis is presented in Section 2. A controlled composition of service workflow net is proposed to model service orchestration in Section 3. The compatibility analysis is implemented in Section 4 and a control policy is proposed to prevent the deadlock-prone orchestration. The method is proposed to build the controller in Section 5. The related work is presented in Section 6, and Section 7 concludes the work.
Section snippets
Motivating scenario
To illustrate the problem of non-local choice mismatch in service collaboration, the following example from supply chain domain is cited from [33], [55]. It is assumed that three web services expect to exchange messages and each has its own internal business process, i.e., Clients (C), Flight Booking (F) and Third-Party Checkout (T). They are developed and deployed in different Internet-based partners. Creating orchestration services is able to collaborate existing Internet-scale services. For
Interaction Petri nets
Similar to [3], [13], [14], [42], [50], [54], we model an Interaction Service Workflow Net (ISWN) for a business process as follows.
Definition 1 ISWN An interaction service workflow net is an extended Petri net , where is a finite set of state places. , where is a set of internal places; is a set of message places; and ;
is a finite set of transitions, ; and
is a set of directed arcs connecting state places and transitions.
An ISWN is pure if it has no self-loops,
Compatibility analysis and control policy
This section shows the compatibility analysis of service orchestration. Besides, a solution is proposed based on an optimal control policy to prevent behavioral incompatibility in CSWN.
Optimal controller generation
Section 4.3 adopts CRRG to check existence of a controller among multiple ISWNs. This section further presents the approach to build it if a controller exists. Based on Theorem 2, CSWN is compatible, i.e., controller exists. To solve the above behavioral incompatibility problem, this work presents an algorithm by adding more controllers to CSWN as follows:
By adopting the proposed approach, this work concludes that CSWN, the interaction of , and , is compatible via controller
Related work
To analyze the compatibility of service orchestration, several formal semantics have been adopted, such as graphs [59], message sequence charts (MSC) [16], ontology [8], finite state machines (FSM) [6], process algebra (PA) [36], martin type theory (MTT) [58], and Petri nets (PN) [23], [32], [37], [52]. In particular, Petri net models have been widely adopted to describe service orchestration, from languages like BPEL to interaction Petri nets [13]. Therefore, it is appropriate for modeling and
Conclusions and future work
In principle, multiple web services provide complementary functions, but their interaction patterns do not fit each other exactly. To tackle this challenge, we have proposed a novel way to synthesize behavioral orchestration based on the optimal controller. Firstly, we model a service orchestration as a controlled Petri net. Base on this model, this work analyzes the incompatibility of multiple services with a reduced reachability analysis technique. Then, this work constructs a controlled
Acknowledgments
We thank all the reviewers for their insightful comments. This work was supported in part by the Grants from the National Natural Science Foundation of China (No. 61703011 and 61802015).
Jing Bi received the Ph.D. degree from Northeastern University, Shenyang, China, in 2011. She is currently an Associate Professor with the School of Software Engineering, Beijing University of Technology in the Faculty of Information Technology, Beijing, China. She is currently also a visiting research scholar with the Department of Electrical and Computer Engineering, New Jersey Institute of Technology (NJIT), Newark, NJ. From 2013 to 2015 she was a Postdoc researcher at Department of
References (59)
- et al.
Big data computing and clouds: trends and future directions
J. Parallel Distrib. Comput.
(2015) - et al.
Dealing with change in process choreographies: design and implementation of propagation algorithms
Inf. Syst.
(2015) - et al.
A calculus of mobile processes
Inform. and Comput.
(1992) - Activevos,...
Structural characterizations of sound workflow nets
- et al.
Workflow Management: Models, Methods, and Systems
(2002) - et al.
Automated synthesis of service choreographies
IEEE Softw.
(2015) - et al.
Diagnosing and measuring incompatibilities between pairs of services
Proc. 20th Int. Conf. DEXA
(2009) - et al.
Deciding choreography realizability
Proc. 39th Ann. ACM SIGPLAN-SIGACT Symp. Principles of Programming Languages (POPL 12)
(2012) - et al.
Automated synthesis of mediators to support component interoperability
IEEE Trans. Softw. Eng.
(2015)
Software engineering for internet computing: internetware and beyond
IEEE Softw.
Composition as a service
IEEE Internet Comput.
Structured communication-centred programming for web services
Proc. 16th European Symposium on Programming (ESOP) as part of the European Joint Conferences on Software Theory and Practice (ETAPS), Braga, Portugal
System deadlocks
Comput. Surveys
Local enforceability in interaction petri nets
Deadlock control methods in automated manufacturing systems
IEEE Trans. Syst. Man Cybern. A
Tool support for model-based engineering of web service compositions
Architectural mismatch: why reuse is still so hard
IEEE Softw.
Design of a live and maximally permissive Petri net controller using the theory of regions
IEEE Trans. Robot. Autom.
Using partial orders for the efficient verification of deadlock freedom and safety properties
Form. Methods Syst. Des.
Efficient optimal deadlock control of flexible manufacturing systems
IET Control Theory Appl.
Synthesis of feedback control logic for a class of controlled Petri nets
IEEE Trans. Automat. Control
A survey of Petri net methods for controlled discrete event systems
Discr. Event Dyn. Syst.
Maximally permissive distributed control of large scale automated manufacturing systems modeled with Petri nets
IEEE Trans. Control Syst. Technol.
Analysis and control of discrete event systems represented by Petri nets
Mismatch patterns and adaptation aspects: a foundation for rapid development of web service adapters
IEEE Trans. Serv. Comput.
Controlled petri nets and maximally permissive feedback logic
Control of vector discrete-event systesm I—the base model
IEEE Trans. Automat. Control
Control of vector discrete-event systesm II—controller synthesis
IEEE Trans. Automat. Control
Cited by (5)
Deep Convolution Neural Network sharing for the multi-label images classification
2022, Machine Learning with ApplicationsResource Oriented Programming: Design Pattern for Describing Restful Service Composition
2023, Lecture Notes in Networks and SystemsAutomated Deadlock Verification for On-Chip Cache Coherence and Interconnects Through Extended Channel Dependency Graph
2019, Communications in Computer and Information Science
Jing Bi received the Ph.D. degree from Northeastern University, Shenyang, China, in 2011. She is currently an Associate Professor with the School of Software Engineering, Beijing University of Technology in the Faculty of Information Technology, Beijing, China. She is currently also a visiting research scholar with the Department of Electrical and Computer Engineering, New Jersey Institute of Technology (NJIT), Newark, NJ. From 2013 to 2015 she was a Postdoc researcher at Department of Automation, Tsinghua University, Beijing, China. From 2009 to 2010, she participated in research on cloud computing at the IBM China Research Laboratory. Her research interests include distributed computing, cloud computing, large-scale data analytics, machine learning and performance optimization. Dr. Bi was the recipient of the 2009 IBM Ph.D. Fellowship Award.
Haitao Yuan received the B.S. and M.S. degrees in Software Engineering from Northeastern University, Shenyang, China, in 2010 and 2012, respectively, and the Ph.D. degree in Control Science and Engineering from Beihang University, Beijing, China in 2016. He is currently an Assistant Professor with the School of Software Engineering, Beijing Jiaotong University, Beijing, China. He is currently also a visiting research scholar with the Department of Electrical and Computer Engineering, New Jersey Institute of Technology (NJIT), Newark, NJ under the financial support from the China Scholarship Council (CSC). He was also a visiting doctoral student with NJIT in 2015. His research interests include cloud computing, data center, software-defined networking, optimization algorithms, and big data. Dr. Yuan was the recipient of the 2011 Google Excellence Scholarship.
Wei Tan received the Ph.D. degree from the Department of Automation, Tsinghua University, Beijing, China. He is currently a Research Staff Member at the IBM T. J. Watson Research Center, Yorktown Heights, NY, USA. From 2008 to 2010, he was a Researcher at the Computation Institute, University of Chicago, and Argonne National Laboratory, USA. At that time, he was the technical lead of the caBIG workflow system. His research interests include GPU acceleration, distributed computing, business and scientific workflows, and Petri nets. He has published over 60 journal and conference papers, and a monograph “Business and Scientific Workflows: A Web Service-Oriented Approach” (272 pages, Wiley–IEEE Press). His research results have been incorporated into IBM big data products and patent portfolios. Dr. Tan is a member of the Association for Computing Machinery (ACM). He received the Best Paper Award from ACM/IEEE ccGrid 2015, the IBM Outstanding Technical Achievement Award (2014 ), the Best Student Paper Award from IEEE ICWS 2014, the Best Paper Award from IEEE SCC 2011, the Pacesetter Award from Argonne National Laboratory (2010), and the caBIG Teamwork Award from the National Institute of Health (2008). He is an Associate Editor of the IEEE TRANSACTIONS ON AUTOMATION SCIENCE AND ENGINEERING.