Presentation on theme: "A Formal Model of Business Application Integration from Web Services (Position Paper) Authors: Kaiyu Wan: East China Normal University, Shanghai, China."— Presentation transcript:
A Formal Model of Business Application Integration from Web Services (Position Paper) Authors: Kaiyu Wan: East China Normal University, Shanghai, China. Mubarak Mohammad Concordia University, Montreal, Canada. Vasu Alagar: X’ian Jiaotong-Liverpool University, Suzhou, China. SOFSEM 2009 Špindlerův Mlýn, Czech Republic
Agenda Service-Oriented Architecture Proposal Abstract Model Service Creation Fascility Process Example Wan, Mohammad, and Alagar - SOFSEM 092
Service Oriented Architecture 3Wan, Mohammad, and Alagar - SOFSEM 09 Service Providers SP 1 SP 2 SP 3 Business Process Model Service Consumers (Requesters) SR 1 SR 2 Business Goal Building software by composing services allows companies to collaborate together to execute business processes.
Challenges 4Wan, Mohammad, and Alagar - SOFSEM 09 State user requirements. Find services. Compose services. Deliver services. How to state user requirements? How to translate user requirements Into service specifications? How to automatically match User requirements with service profiles? How to ensure that services are trustworthy? How to ensure that non-functional requirements are preserved in composition? How to ensure that policies are respected? How to compose services automatically to provide business transactions?
Proposal An intelligent automation factory: – translate user requirements into service specifications, – match making skills, – compose web services to accomplish the business process requirement, and – maintain non-functional requirements and policies. Providing formal foundation to support the method. 5Wan, Mohammad, and Alagar - SOFSEM 09
Abstract Model 6Wan, Mohammad, and Alagar - SOFSEM 09 Service Presentation Layer (SPL) Service Presentation Layer (SPL) Service Request Layer (SRL) Service Requirements Specification Non-Functional Requirements Constraints And Obligations Service Delivery (Deployment) Formal Validation of Configuration Optimal Configuration Service Configuration Generator Service Composition Generator Service Creation Facility (SCF)
Characteristics of SCF Autonomy Task assessment Service discovery Service qualification Candidate selection Candidate composition Composition qualification Optimality Self monitoring 7Wan, Mohammad, and Alagar - SOFSEM 09
Service Presentation Layer (SPL) 8Wan, Mohammad, and Alagar - SOFSEM 09 SPL S1S1 S2S2 SnSn Syntax for interface type S i is Semantic: Extended-Timed Automata, A i F i : I(S i ) O(S i ) where I(S i ) is the typed argument list, and O(S i ) is the typed output of the service F i.
Wan, Mohammad, and Alagar - SOFSEM 099 SPL_instance S 11 S 12 S 13 S 21 S 23 SPL_template S1S1 S2S2 The interface behavior of this SPL instance can be written as: F 1 + F 2 A 1 * A 2
Trustworthy Component Type* Wan, Mohammad, and Alagar - SOFSEM 0910 Data Services Interfaces Properties Constraints Availability Timeliness Safety Security Reliability Pre/Post Conditions Architecture Connector Configuration FunctionalContractStructure * Mohammad and Alagar. TADL - An Architecture Description Language for Trustworthy Component-Based Systems. ECSA 2008.
Service Request Layer (SRL) A service is a functionality to be constrained by certain quality attributes. Service requests are formalized as requirements. The request for service should include: – Functionality – Non-functional (quality of service attributes) – Obligations – Policies 11Wan, Mohammad, and Alagar - SOFSEM 09
Formalizing Service Requests 12Wan, Mohammad, and Alagar - SOFSEM 09 SRL SCF_I 1 SCF_I 2 SCF_I n UML Sequence Diagram First-Order Logic Expressions E1E2E3 Non-Functional Requirements Obligations Policies and resource constraints Services Document Types How services interact and document types flow
Service Creation Facility (SCF) A SCF will subscribe to an SPL only if it is trustworthy. In general, SCF can subscribe to many trustworthy SPLs and automatically receives news bulletins from them. Trust varies from one context to another. Using user requests and context toolkit, SCF dynamically construct contexts and monitor the fulfillment of contracts in every context of its interactions with SPL. SCF builds a profile of the SPL quality of service in different contexts. 13Wan, Mohammad, and Alagar - SOFSEM 09
SCF Process Model 14Wan, Mohammad, and Alagar - SOFSEM 09 Request Transform UML into Chore Expressions Chore Expressions Match Chore Expressions with the services Candidate services Check non- functional requirements Trusted services Compose Services and check optimality Optimal configuration Apply policies and obligations SRL SPL SCF
1. From Sequence Diagram to Chore Expressions The sequence diagram consists of entities, message sequences, and data parameters for messages. We transform: – Messages into tasks (services). – Data parameters are associated with tasks. – Relations among messages into composite operators with tasks as operands. 15Wan, Mohammad, and Alagar - SOFSEM 09
Chore Expressions The semantics of a sequence diagram are precisely expressed by the semantics assigned to chore expressions. Sequential composition: a>>b – After a is completed, its output may be used by b. Parallel composition: a||b – Simultaneous execution of a and b with no data sharing. Composition with no order (and) : a o b – Conjoined evaluation with no order, order is not important. – It is possible to share data – The result is the set of results produced by the evaluation of a and b Nondeterministic choice (or): a ∫ b – One of the actions is evaluated nondeterministically. Priority Construct: a ◊ b – a is evaluated first, and if it can be successfully completed, then b is discarded; otherwise, b should be evaluated (order). Commit Construct: com(e) – The state changes that happened during the evaluation of expression e are made permanent. 16Wan, Mohammad, and Alagar - SOFSEM 09
2. Matching Services with Requests A chore expression may require investigating more than one sequence of actions against services (e.g., choice or priority operators) Example: a ∫ (b ◊ c) – Consider both : a ∫ b and a ∫ c – Determine the matching service sequence. – Reject an expression only if its corresponding service sequence does not satisfy the non functional properties. – If both sequences satisfy the stated non-functional properties, then both should be examined for optimality criteria. 17Wan, Mohammad, and Alagar - SOFSEM 09
Service Basket A service basket is created to hold services corresponding to a request Atomic services that are selected by the SCF are placed in a service basket. Whenever a service is added to the basket, the combined behavior of the services in the basket will be constructed as UPPAAL. 18Wan, Mohammad, and Alagar - SOFSEM 09
3. Algorithm for constructing Chore service Expressions Wan, Mohammad, and Alagar - SOFSEM 0919 do Choose an expression f from H e do Choose the next action a in f (left to right) do Choose a service provider P in SPL Determine the service interface x in P whose signature matches the arguments and their types in a Substitute the arguments for interface signature parameters and check the satisfaction of precondition of the interface function s a Execute the behavior at the interface If the outcome satisfies the post-condition of the interface function then accept The service s a ; replace a by s a in f If any of the previous steps fail then Exit Forever P Forever a Put f in S e Forever f
We assume that SCF uses an ontology to match user specific task names with the service names at the interfaces. The SCF passes either the service names or the display name, from the profile of each service, to the SRL. 20Wan, Mohammad, and Alagar - SOFSEM 09
Service Configuration Templates Construct a configuration template from a chore expression. 21Wan, Mohammad, and Alagar - SOFSEM 09
a >> b || c 22Wan, Mohammad, and Alagar - SOFSEM 09
Selecting Best Service Configuration It is sufficient to create a configuration template for service expressions in S e and test each configuration for the satisfaction of non- functional properties. A service expression in S e is a composition of functions, because each service is a function. The pre/post conditions for each service are known from the interfaces in SPL. An analysis of a service expression boils down to an application of Hoare Logic. 23Wan, Mohammad, and Alagar - SOFSEM 09
4. Checking Optimality The service configurations that satisfy the contract specification are selected for further processing. Based upon an optimality criteria, an optimal service configuration can be obtained. Examples of optimality criteria include: – minimizing the total cost of service delivery – minimizing the execution time – maximizing the reliability of a service configuration. 24Wan, Mohammad, and Alagar - SOFSEM 09
Example: Travel planning Book a round trip flight ticket and stay at a four star hotel, rent a car, and make an appointment with a friend at specific place and time. There are four SPLs, one for each service: – Airline reservation – Hotel booking – Care rental – Appointment arranging. 25Wan, Mohammad, and Alagar - SOFSEM 09
Sequence Diagram 26Wan, Mohammad, and Alagar - SOFSEM 09
Airline SPL 27Wan, Mohammad, and Alagar - SOFSEM 09 Flight SchedulesCurrent Booking Ticketing Payment Center Pricing Policies Booking Center PFPPFTPFE SCF PT CF PP
Behavior Specification 28Wan, Mohammad, and Alagar - SOFSEM 09
Service Configuration 29Wan, Mohammad, and Alagar - SOFSEM 09 ( (t 1 >> t 2 ) || (t 3 >> t 4 ) || (t 5 >> t 6 ) || (t 7 >> t 8 ) ) >> t 9 || t 10 || t 11 || t 12
Conclusion In order that the SCF be trusted, it should accept only the services from a platform that itself is certified to be trustworthy. We are developing tools and methods to build a framework for the development of trustworthy services for the SPL. The role of context awareness. 30Wan, Mohammad, and Alagar - SOFSEM 09