A Formal Model of Business Application Integration from Web Services (Position Paper) Authors: Kaiyu...
Transcript of A Formal Model of Business Application Integration from Web Services (Position Paper) Authors: Kaiyu...
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 09 2
Service Oriented Architecture
3Wan, Mohammad, and Alagar - SOFSEM 09
Service ProvidersSP1
SP2
SP3
Business ProcessModel
Service Consumers (Requesters)SR1
SR2Business 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.State user requirements.
Find services.Find services.
Compose services.Compose services.
Deliver services.Deliver services.
How to state user requirements?
How to translate user requirementsInto service specifications?
How to automatically matchUser requirements with service profiles?
How to ensure that services are trustworthy?
How to ensure that non-functionalrequirements are preserved in composition?
How to ensure that policies are respected?
How to compose services automatically toprovide 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
ConstraintsAnd Obligations
Service Delivery(Deployment)
Formal Validation ofConfigurationOptimal Configuration
Service ConfigurationGenerator
Service CompositionGenerator
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
SPLS1 S2 Sn
Syntax for interface type Si isSemantic:Extended-Timed Automata, Ai
Fi : I(Si) O(Si)
where I(Si) is the typed argument list ,
and O(Si) is the typed output of the
service Fi.
Wan, Mohammad, and Alagar - SOFSEM 09 9
SPL_instanceS11 S12 S13 S21
S23
SPL_templateS1
S2
The interface behavior of this SPL instance can be written as:
F1 + F2
A1 * A2
Trustworthy Component Type*
Wan, Mohammad, and Alagar - SOFSEM 09 10
DataData
ServicesServices
InterfacesInterfaces
PropertiesProperties
ConstraintsConstraints
AvailabilityAvailability
TimelinessTimeliness
SafetySafety
SecuritySecurity
ReliabilityReliability
Pre/Post ConditionsPre/Post Conditions ArchitectureArchitecture
ConnectorConnector
ConfigurationConfiguration
Functional Contract Structure
* 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_I1 SCF_I2 SCF_In
UML Sequence Diagram
First-Order Logic Expressions
E1 E2 E3 Non-Functional RequirementsObligationsPolicies and resource constraints
ServicesDocument TypesHow services interact and document types flow
SCF Process Model
14Wan, Mohammad, and Alagar - SOFSEM 09
RequestTransform UML into
Chore Expressions
Chore Expressions
Match Chore
Expressions with the services
Candidate services
Check non-functional
requirementsTrusted services
Compose Services
and check optimality
Optimal configuration
Apply policies and obligations
SRL
SPLSCF
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
3. Algorithm for constructing Chore service Expressions
Wan, Mohammad, and Alagar - SOFSEM 09 19
do
Choose an expression f from He
doChoose 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 argumentsand their types in a
Substitute the arguments for interface signature parameters and check the satisfaction of precondition of the interface function sa
Execute the behavior at the interface
If the outcome satisfies the post-condition of the interface function then accept The service sa; replace a by sa in f
If any of the previous steps fail then Exit
Forever PForever a
Put f in Se
Forever f
1.
2.
3.
4.
5.
6.
7.
8.
9.
• 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
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 Schedules Current Booking
Ticketing
Payment Center
Pricing
PoliciesBookingCenter
PFP PFTPFE
SCF
PT
CF
PP
Behavior Specification
28Wan, Mohammad, and Alagar - SOFSEM 09
Service Configuration
29Wan, Mohammad, and Alagar - SOFSEM 09
( (t1 >> t2) || (t3 >> t4) || (t5 >> t6) || (t7 >> t8) ) >> t9 || t10 || t11 || t12
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