Process Composition. Web Services: CSP/Pi-Calculus/Mealy 2 Process Composition Hierarchies Control: Centralized control: e.g., RPC/WSDL Mediated or orchestrated.

Slides:



Advertisements
Similar presentations
Web Services Choreography and Process Algebra 29th April 2004 Steve Ross-Talbot Chief Scientist, Enigmatec Corporation LtdEnigmatec Corporation Ltd Chair.
Advertisements

Global States.
COMMUNICATING SEQUENTIAL PROCESSES C. A. R. Hoare The Queen’s University Belfast, North Ireland.
1 University of Pennsylvania Grigoris Karvounarakis February 2004 Conversation Specification: A New Approach to Design and Analysis of E- Service Composition.
Theory Of Automata By Dr. MM Alam
C O N T E X T - F R E E LANGUAGES ( use a grammar to describe a language) 1.
PROTOCOL VERIFICATION & PROTOCOL VALIDATION. Protocol Verification Communication Protocols should be checked for correctness, robustness and performance,
Concurrency Important and difficult (Ada slides copied from Ed Schonberg)
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 3 School of Innovation, Design and Engineering Mälardalen University 2012.
Programming Paradigms for Concurrency Lecture 11 Part III – Message Passing Concurrency TexPoint fonts used in EMF. Read the TexPoint manual before you.
1 Lecture 3 The CSP approach to the specification and analysis of Security protocols Communicating Sequential Processes [Hoare 78] Mathematical framework.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Variants.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture11: Variants of Turing Machines Prof. Amos Israeli.
Introduction to Computability Theory
1 Introduction to Computability Theory Lecture7: PushDown Automata (Part 1) Prof. Amos Israeli.
Ordering and Consistent Cuts Presented By Biswanath Panda.
CPSC 668Set 16: Distributed Shared Memory1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
IBM WebSphere survey Kristian Bisgaard Lassen. University of AarhusIBM WebSphere survey2 Tools  WebSphere Application Server Portal Studio Business Integration.
Bridging the gap between Interaction- and Process-Oriented Choreographies Talk by Ivan Lanese Joint work with Claudio Guidi, Fabrizio Montesi and Gianluigi.
Bridging the gap between Interaction- and Process-Oriented Choreographies Talk by Ivan Lanese Joint work with Claudio Guidi, Fabrizio Montesi and Gianluigi.
A Top-Down Approach to Modeling Global Behaviors of Web Services Xiang Fu, Tevfik Bultan and Jianwen Su Department of Computer Science University of California,
1 Ivan Lanese Computer Science Department University of Bologna Italy Concurrent and located synchronizations in π-calculus.
Theory of Computing Lecture 20 MAS 714 Hartmut Klauck.
Conversation Specification: A New Approach to Design and Specification of E-Service Composition T. Bultan X. Fu R. Hull J. Su University of California.
1 Relational Algebra and Calculus Yanlei Diao UMass Amherst Feb 1, 2007 Slides Courtesy of R. Ramakrishnan and J. Gehrke.
Finite-State Machines with No Output
Firewall and Internet Access Mechanism that control (1)Internet access, (2)Handle the problem of screening a particular network or an organization from.
Architectural Design portions ©Ian Sommerville 1995 Establishing the overall structure of a software system.
CS5204 – Operating Systems 1 Communicating Sequential Processes (CSP)
Web Services Glossary Summary of Holger Lausen
Benjamin Gamble. What is Time?  Can mean many different things to a computer Dynamic Equation Variable System State 2.
Advanced Topics in SE Spring Process Algebra Hossein Hojjat Formal Methods Lab University of Tehran.
- 1 - Embedded Systems - SDL Some general properties of languages 1. Synchronous vs. asynchronous languages Description of several processes in many languages.
CS5204 – Operating Systems 1  -Calculus Reasoning about concurrency and communication (Part 1).
Architectural Design Yonsei University 2 nd Semester, 2014 Sanghyun Park.
An Ontological Framework for Web Service Processes By Claus Pahl and Ronan Barrett.
Web Services Flow Language Guoqiang Wang Oct 7, 2002.
The GOOD the BAD the UGLY WS-CDL: the GOOD the BAD the UGLY.
95-843: Service Oriented Architecture 1 Master of Information System Management Service Oriented Architecture Lecture 7: BPEL Some notes selected from.
Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/ Input-output conformance testing for channel-based connectors 1.
1 Relational Algebra and Calculas Chapter 4, Part A.
Internal Talk, Oct Executable Specifications using Message Sequence Charts Abhik Roychoudhury School of Computing National University of Singapore.
The Complexity of Distributed Algorithms. Common measures Space complexity How much space is needed per process to run an algorithm? (measured in terms.
Internet Security CSCE 813 Communicating Sequential Processes.
Synchronization Methods in Message Passing Model.
Replication (1). Topics r Why Replication? r System Model r Consistency Models – How do we reason about the consistency of the “global state”? m Data-centric.
CS 5204 Spring 99 1 A Simple Agent A CCS agent is described both by a structural diagram and one or more algebraic equations. The diagram is for readability.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 3 The Church-Turing Thesis Contents Turing Machines definitions, examples,
Course: COMS-E6125 Professor: Gail E. Kaiser Student: Shanghao Li (sl2967)
Qusay H. Mahmoud CIS* CIS* Service-Oriented Computing Qusay H. Mahmoud, Ph.D.
Hwajung Lee. Well, you need to capture the notions of atomicity, non-determinism, fairness etc. These concepts are not built into languages like JAVA,
Hwajung Lee. Why do we need these? Don’t we already know a lot about programming? Well, you need to capture the notions of atomicity, non-determinism,
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
Concurrency 5 The theory of CCS Specifications and Verification Expressive Power Catuscia Palamidessi
UNIT - I Formal Language and Regular Expressions: Languages Definition regular expressions Regular sets identity rules. Finite Automata: DFA NFA NFA with.
Automated Composition and Analysis. Web Services: Design and Analysis2 Automated Composition Given a specification of the composite service, find individual.
Fault tolerance and related issues in distributed computing Shmuel Zaks GSSI - Feb
Software Systems Verification and Validation Laboratory Assignment 4 Model checking Assignment date: Lab 4 Delivery date: Lab 4, 5.
1 Section 13.1 Turing Machines A Turing machine (TM) is a simple computer that has an infinite amount of storage in the form of cells on an infinite tape.
1 Turing Machines and Equivalent Models Section 13.1 Turing Machines.
using Deterministic Finite Automata & Nondeterministic Finite Automata
Agenda  Quick Review  Finish Introduction  Java Threads.
1 Theoretical Foundations of Concurrency A formal study of concurrency enables: understanding the essential nature of concurrency reasoning about the behavior.
Introduction to distributed systems description relation to practice variables and communication primitives instructions states, actions and programs synchrony.
SE 548 Process Modelling WEB SERVICE ORCHESTRATION AND COMPOSITION ÖZLEM BİLGİÇ.
1 Seminar on SOA Seminar on Service Oriented Architecture BPEL Some notes selected from “Business Process Execution Language for Web Services” by Matjaz.
Business Process Execution Language (BPEL) Pınar Tekin.
2003/2/23conversation pattern figures1 Figures in connection with Conversation Patterns November 19, 2002.
Turing Machines Acceptors; Enumerators
Presentation transcript:

Process Composition

Web Services: CSP/Pi-Calculus/Mealy 2 Process Composition Hierarchies Control: Centralized control: e.g., RPC/WSDL Mediated or orchestrated control: e.g., BPEL Fully distributed control: autonomous processes, e.g., WS-CDL (WSCI) Messaging: Shared variables: tight coupling, service internal Synchronous messaging: looser coupling; some service-service interactions Asynchronous messaging: loose coupling; service- service interactions Synchronous and asynchronous both applicable to BPEL: WSDL/SOAP, WSDL/JMS

Web Services: CSP/Pi-Calculus/Mealy 3 Communicating Sequential Processes Mathematical framework for the description and analysis of systems consisting of processes interacting via exchange of messages The evolution of processes is based on a sequence of events or actions Visible actions  Interaction with other processes, communication Invisible action  Internal computation steps

Web Services: CSP/Pi-Calculus/Mealy 4 The CSP Language: Syntax Termination: Stop Input: in ? x  P(x) Execute an input action on channel in, get message x, then continue as P ( x ) Output: out ! x  P ( x ) Execute an output action on channel out, send message x, then continue as P ( x ) Recursion: P ( y 1,…, y n ) = Body ( y 1,…, y n ) Process definition. P is a process name, y 1,…, y n are the parameters, Body ( y 1,…, y n ) is a process expression Example: Copy = in ? x  out ! m  Copy

Web Services: CSP/Pi-Calculus/Mealy 5 CSP ’s Syntax (Cont’ed) External (aka guarded) choice: P  Q Execute a choice between P and Q. Do not choose a process which cannot proceed Example:  a ? x  P  x   (b ? x  Q (x)) Execute one and only one input action. If only one is available then choose that one. If both are available than choose arbitrarily. If none are available then block. The unchoosen branch is discarded Internal choice: P  Q Execute an arbitrary choice between P and Q. It is possible to choose a process which cannot proceed

Web Services: CSP/Pi-Calculus/Mealy 6 CSP ’s Syntax (Cont’ed) Parallel operator w/synchronization: P  Q P and Q proceed in parallel and are obliged to synchronize on all the common actions Example:  c  x  P  x   c  m  Q  Synchronization: the two processes can proceed only if their actions correspond Handshaking: sending and receiving is simultaneous (Buffered communication can anyway be modeled by implementing a buffer process) Communication: m is transmitted to the first process, which continues as P  m 

Web Services: CSP/Pi-Calculus/Mealy 7 Laws of CSP Equivalence of expressions: useful in reasoning about CSP processes Many laws concerning different aspects Examples: If Q does not involve e 1 :  e 1  P   e 2  Q   e 1   P   e 2  Q  Synchronization:  c ? b  P  b   c ! a  Q   c ! a   P  a  Q 

Web Services: CSP/Pi-Calculus/Mealy 8 Example ADD2   in   x  in   y  out  x  y  ADD2  ADD2   in   x  in   y  out  x  y  ADD2   in   y  in   x  out  x  y  ADD2  SQ   out  z  sqr  square  z   SQ  ADDSQ = ADD2  SQ = ?   in   x  in   y  out  x  y  ADD2   in   y  in   x  out  x  y  ADD2   out  z  sqr  square  z   SQ    in   x  in   y  out  x  y  ADD2   out  z  sqr  square  z   SQ   in   y  in   x  out  x  y  ADD2   out  z  sqr  square  z   SQ 

Web Services: CSP/Pi-Calculus/Mealy 9 Example ADDSQ   in   x  in   y  out  x  y  ADD2   out  z  sqr  square  z   SQ   in   y  in   x  out  x  y  ADD2   out  z  sqr  square  z   SQ   in   x  in   y  out  x  y  ADD2   out  z  sqr  square  z   SQ   in   y  in   x   out  x  y  ADD2   out  z  sqr  square  z   SQ   in   x  in   y  out  x  y  sqr  square  x  y   ADD2  SQ  …  in   x  in   y  out  x  y  sqr  square  x  y   ADDSQ  …

Web Services: CSP/Pi-Calculus/Mealy 10 BPEL : CSP Semantics BPEL interactions can be modeled in CSP Three main activities: invoke, receive, reply <invoke partner=“...” portType=“...” operation=“...” inputContainer= x outputContainer = y /> <receive partner=“...” portType=“...” operation=“...” container= x [createInstance=“...”] /> <reply partner=“...” portType=“...” operation=“...” container = y /> partner-port-in ! x  partner-port-out ? y  … my-port-in ? x  … … my-port-out ? y  …

Web Services: CSP/Pi-Calculus/Mealy 11 Synchronous communication Advantages: Easier to analyze Well studied Disadvantages: Not completely autonomous BPEL : CSP Semantics

Web Services: CSP/Pi-Calculus/Mealy 12 The  -Calculus The  -calculus is a process algebra Constructs for concurrency Communication on channels channels are first-class  channel names can be sent on channels access restrictions for channels In  -calculus everything is a process

Web Services: CSP/Pi-Calculus/Mealy 13 Communications in  -Calculus Processes communicate on channels: c  M  send message M on channel c c  x  receives x on channel c Sequencing: c  M  p sends message M on c, then does p c  x  p receives x on c, then does p with x Concurrency: p  q is the parallel composition of p and q Replication:  p creates an infinite number of replicas of p

Web Services: CSP/Pi-Calculus/Mealy 14 Examples For example we might define Speaker  air  M  Phone  air  x  wire  x  ATT  wire  x  fiber  x  System  Speaker  Phone  ATT Communication between processes is modeled by reduction: Speaker  Phone  wire  M  wire  M   ATT  fiber  M  Composing these reductions we get: Speaker  Phone  ATT  fiber  M 

Web Services: CSP/Pi-Calculus/Mealy 15 Channel Visibility Anybody can monitor an unrestricted channel: Consider that we define WireTap  wire  x  wire  x  NSA  x  Copies the messages from the wire to NSA Possible since the name “wire” is globally visible Now WireTap  wire  M  ATT  wire  M  NSA  M  ATT  NSA  M  fiber  M 

Web Services: CSP/Pi-Calculus/Mealy 16 Restriction The restriction operator “   c  p ” makes a fresh channel c within process p is the Greek letter “nu” The name “ c ” is local (bound) in p Restricted channels cannot be monitored wire  x  …   wire  wire  M   ATT   wire  x  …  fiber  M  The scope of the name “ wire ” is restricted There is no conflict with the global “ wire ”

Web Services: CSP/Pi-Calculus/Mealy 17 Restriction and Scope Restriction is a binding construct is lexically scoped allocates a new object (a channel)   c  p is like “let c  new Channel() in p ” In particular, c can be sent outside its scope But only if “ p ” decides so

Web Services: CSP/Pi-Calculus/Mealy 18 First-Class Channels A channel c can leave its scope of declaration via a message d  c  from within p Allowing channels to be sent as messages means communication topology is dynamic If channels are not sent as messages (or stored in the heap) then the communication topology is static This differentiates  -calculus from CSP

Web Services: CSP/Pi-Calculus/Mealy 19 Example of First-Class Channels Consider: MobilePhone  air  x  cell  x  ATT   wire  cell  ATT   wire  y  y  x  fiber  x  in  cell  MobilePhone  ATT   ATT  ATT  is trying to pass cell out of the static scope of the restriction  cell

Web Services: CSP/Pi-Calculus/Mealy 20 Scope Extrusion A channel is a name First-class names must be usable even outside their original scope The  -calculus allows restrictions to move:  c  p  q   c  p  q  if c not free in q Renaming is needed in general:  c  p  q   d  d  c  p   q   d  d  c  p  q  where “ d ” is fresh (does not appear in p or q )

Web Services: CSP/Pi-Calculus/Mealy 21 Example, Continued  cell  MobilePhone  ATT   ATT    cell  MobilePhone  ATT   ATT  )    cell  MobilePhone  cell  x  fiber  x  Scope extrusion distinguishes the  -calculus from other process calculi

Web Services: CSP/Pi-Calculus/Mealy 22 Syntax of the  -Calculus There are many versions of the  -calculus A basic version: p, q ::= nil nil process (sometimes written 0) x  y  p sending x  y  p receiving p  q parallel composition  p replication   x  p restriction Note that only variables can be channels and messages

Web Services: CSP/Pi-Calculus/Mealy 23 Global model Ensured conformance Description language Not executable Tools Generators for end points Advanced typing Status Moving for last call end of 2004 Choreography Definition Language ( WS-CDL )

Web Services: CSP/Pi-Calculus/Mealy 24 Global Models

Web Services: CSP/Pi-Calculus/Mealy 25 A sequential process Client ( open, close, request, reply ) = open. request 1. reply 1. request 2. reply 2. close.0 Client open close request reply WS-CDL Global Models

Web Services: CSP/Pi-Calculus/Mealy 26 A repetitive process Client ( open, close, request, reply ) = open. request 1. reply 1. request 2. reply 2. close. Client ( open, close, request, reply ) WS-CDL Global Models Client open close request reply

Web Services: CSP/Pi-Calculus/Mealy 27 A process with choices to make IdleServer ( o, req, rep, c ) = o. BusyServer ( o, req, rep, close ) BusyServer ( o, req, rep, c ) = req. rep. BusyServer ( o, req, rep, c ) + c. IdleServer ( o, req, rep, c ) IdleServer open BusyServer close request reply WS-CDL Global Models

Web Services: CSP/Pi-Calculus/Mealy 28 Communication, Concurrency and Replication When Client i has started an exchange with IdleServer No other Client j can then communicate with the server Until Client i has finished and the server is once again IdleServer WS-CDL Global Model SYSTEM = (! Client | IdleServer ) Client i | IdleServer Client i | BusyServer Client j | IdleServer Client j | BusyServer …..

Web Services: CSP/Pi-Calculus/Mealy 29 OperationNotationMeaning Prefix .p.p Sequence Action a ( y ), a  y  Communication Summation a ( y ). p  b ( x ). q  i. p i Choice Recursion p ={…..}. p Repetition Replication pp Repetition Compositio n p  q Concurrency Restriction  x  p Encapsulation Collapse send and receive into an interact on channels WS-CDL and the  -Calculus

Web Services: CSP/Pi-Calculus/Mealy 30 Composition: Formal Semantics WSDL is fundamentally message based So is everything based on it Process algebra approach to formal semantics: BPEL : CSP WS-CDL :  -calculus Alternatives to process algebra: Automata theoretic PSL

Web Services: CSP/Pi-Calculus/Mealy 31 BPEL and Asynchronous Communication Channels are assumed to be reliable Asynchronous, for example, the following channel: ware- house1 store order 1 send Order 1 … o1o1 send Order 1 receive Receipt 1 … Queues are FIFO, unbounded length Can simulate synchronous and also bounded queues

Web Services: CSP/Pi-Calculus/Mealy 32 Messages Messages are classified into classes Each class is associated with one channel Each message class may have additional attributes which can carry the contents of messages For now, analysis involves no contents Results immediately apply to “finite domain” contents ware- house1 store o rder 1

Web Services: CSP/Pi-Calculus/Mealy 33 Individual Web Services input messages to other e-services Do until halt nondeterministic choice: read an input; send an output to some other peer; halt; end choice local store message log

Web Services: CSP/Pi-Calculus/Mealy 34 Individual Web Services Again, ports and storages are ignored Internal logic of peers : finite state control input messages to other e-services Do until halt nondeterministic choice: read an input; send an output to some other peer; halt; end choice

Web Services: CSP/Pi-Calculus/Mealy 35 Mealy Web Services Mealy machines: Finite state machines with input (incoming messages) & output (outgoing messages) warehouse2 ?o2?o2 !r2!r2 !r2!r2  !r2!r2 !b2!b2 !b2!b2 ?p2?p2 ?p2?p2

Web Services: CSP/Pi-Calculus/Mealy 36 Technical Definition A Mealy web service is an FSA M  T, s, F  in,  out,  T : a set of states s : the initial state F : a set of final states  in : input message classes  out : output message classes  : transition relation that either consume an input,  s   m  s  , or produce output,  s   m  s  , or make an empty (internal ) move,  s   s  

Web Services: CSP/Pi-Calculus/Mealy 37 Executing a Mealy Composition warehouse2 ?o2?o2 !r2!r2 !r2!r2  !r2!r2 !b2!b2 !b2!b2 ?p2?p2 ?p2?p2 bank ?a?a !k!k … store !a!a ?k?k … !o2!o2 w1 ?o1?o1 … !o1!o1 … Execution halts if All mealy peers are in final states All queues are empty

Web Services: CSP/Pi-Calculus/Mealy 38 req reg ack ?register !reject !accept !request ?ack ?cancel !bill !terminate !bill !register ?reject ?accept ?report !ack !cancel ?bill Investor Stock Broker Firm Research Dept. accrep Composite Web Service Execution bil ter ?request ?terminate !report

Web Services: CSP/Pi-Calculus/Mealy 39 Web Service Composition: What Now? a uthorize ware- house1 okok b ill 2 p ayment 2 o rder 1 r eceipt 1 o rder 2 r eceipt 2 p ayment 1 b ill 1 bank ware- house2 store Execution: Is there a deadlock? Always terminates in finite steps? … Functionality: Is it correct? Is there an unauthorized payment? …

Web Services: CSP/Pi-Calculus/Mealy 40 Conversation Policies A conversation: a sequence of messages between two parties order receipt StoreSupplier Start Request Pending A’s Reply Pending B’s Reply Pending Terminate/ Success Terminate/ Failure A  B: “Request bid” A  B: “CounterBid=x” B  A: “CounterBid=x” A  B: “Accept” B  A: “Reject” A  B: “Reject” B  A: “Accept” B  A: “Bid=x” B  A: “Bye”

Web Services: CSP/Pi-Calculus/Mealy 41 o rder 2 p ayment 1 b ill 1 Multi-Party Conversations Watcher: “records” the messages as they are sent okok a uthorize r eceipt 2 o rder 1 r eceipt 1 b ill 2 p ayment 2 Watcher ware- house2 ware- house1 storebank ako1o1 b1b1 o2o2 A conversation is a sequence of messages the watcher sees in a successful run (or session) composition language: the set of all possible conversations What properties do composition languages have? p1p1 r1r1 r2r2 b2b2 p2p2

Web Services: CSP/Pi-Calculus/Mealy 42 Warehouse Example The composition language recognized a k shuff  o 1  shuff  r 1  b 1 p 1    o 2  shuff  r 2  b 2 p 2    a uthorize ware- house1 okok b ill 2 p ayment 2 o rder 1 r eceipt 1 o rder 2 r eceipt 2 p ayment 1 b ill 1 bank ware- house2 store

Web Services: CSP/Pi-Calculus/Mealy 43 A composition schema is a triple ( M, P, C ) where M : finite set of message classes P : finite set of peers (web services) C : finite set of peer to peer channels Specifies the infrastructure of composition Web Service Composition Schema a uthorize ware- house1 okok b ill 2 p ayment 2 o rder 1 r eceipt 1 o rder 2 r eceipt 2 p ayment 1 b ill 1 bank ware- house2 store

Web Services: CSP/Pi-Calculus/Mealy 44 Global Configurations Given n Mealy implementations for composition schema  M  P  C  Global configuration:  Q   t   …  Q n  t n  w  where Q i  : queue contents for peer i t i  : state for peer i w : watcher contents

Web Services: CSP/Pi-Calculus/Mealy 45 Derivation  Q   t   Q n  t n  w  Q   t   Q n  t n  w  if peer p i takes an  move, or peer p i reads an input, or peer p i sends a message m to p j   t i  m  t i  i  Q j  Q j m ( m appended to p j ’s queue)   k  i  t k  t k   k  j  Q k  Q k  w  wm (watcher records the message m )

Web Services: CSP/Pi-Calculus/Mealy 46 Conversations A halting run:   s   s n  f   f n  w  Starting from the initial configuration with empty queues and Ending in final states with empty queues A word w is a conversation if  s   s n  f   f n  w  is a halting run Composition language (CL) : the set of all conversations *

Web Services: CSP/Pi-Calculus/Mealy 47 Composition Languages Are Regular? ?b?b !a!a p1p1 p2p2 ?a?a !b!b a b CL  a * b *  a n b n Composition languages are not always regular Some may not even be context free Causes: asynchronous communication & unbounded queue Bounded queues or synchronous: CL always regular

Web Services: CSP/Pi-Calculus/Mealy 48 Bounded Queues Synchronous messaging case: composition language can be recognized by the product machine If queues are bounded, composition languages are also regular Production machines can be constructed

Web Services: CSP/Pi-Calculus/Mealy 49 Conversations as Orchestration ac “Programming” interactions Two questions: Given Mealy peers, what conversations can they have? Given a conversation language, can we “implement” it? p1p1 b d p3p3 p4p4 e p2p2

Web Services: CSP/Pi-Calculus/Mealy 50 Two Factors ac Local views: Conversations with the same local views are not distinguishable: abcde and acbde Queuing effect: a peer can postpone sending a message p1p1 b d p3p3 p4p4 e p2p2

Web Services: CSP/Pi-Calculus/Mealy 51 Local view of a conversation for a peer: part of the execution that is related to the peer Defined as projection:  p  w  for a conversation w Two conversations cannot be distinguished if they have exactly the same set of local views Local Views

Web Services: CSP/Pi-Calculus/Mealy 52 If abc is a part of a conversation, so are bac and bca  p i  abc  p i  bac  p i  bca  a for i   p i  abc  p i  bac  p i  bca  bc for i  Example a p2p2 p1p1 b c p4p4 p3p3

Web Services: CSP/Pi-Calculus/Mealy 53 Given languages L i over  i,   i  n Composition languages L are closed under “projection-join”: Join

Web Services: CSP/Pi-Calculus/Mealy 54 If the global watcher sees: What happens inside p ? Local Prepone a peer !a!a !b!b ba …… p

Web Services: CSP/Pi-Calculus/Mealy 55 Local Prepone  p  w  should also allow a peer p !a!a !b!b … ab … local view at p … ab …… ba …… the global watcher:

Web Services: CSP/Pi-Calculus/Mealy 56 A Synthesis Result Given a regular language L, we can find a Mealy composition such that its CL is the closure: Intuitively: given a regular L (e.g., ako 1 …), we can find Mealy peers whose conversations are not arbitrary Opportunity for automatic composition But some Mealy compositions do not relate to any regular languages in this way

Web Services: CSP/Pi-Calculus/Mealy 57 p1p1 The Converse (General Case) There is an Mealy compositions whose CL is not for every regular languages L a b ?a?a !c!c p2p2 !b!b !a!a p3p3 ?c?c ?b?b c CL = { a i bc i | i  0 }

Web Services: CSP/Pi-Calculus/Mealy 58 When the schema graph is a tree, then the Mealy composition has a composition language equal to for some regular languages L Intuitively: the global behavior of bottom-up composition is still predictable if the composition infrastructure is a tree In particular, adding an mediator (hub-spoke) isn’t a bad idea! The Tree Case

Web Services: CSP/Pi-Calculus/Mealy 59 Hub-and-spoke For every star-shaped composition schema, and every regular language L, we can construct an Mealy composition whose CL  L Good news for hub-and-spoke!

Web Services: CSP/Pi-Calculus/Mealy 60 Results of Mealy Web Services 1.CLs of some Mealy compositions are not regular, some not context free 2.The “prepone” and “join” closure of every regular language = CL of some composite Mealy web services 3.The converse of 2. is not true in general, true in special cases However: if bounded queue or synchronous: CL of every Mealy composition is regular Design time decision! Need to be explicit in specifications (BPEL4WS, BPLM, …)

Web Services: CSP/Pi-Calculus/Mealy 61 Communicating FSAs Two communicating FSAs can simulate Turing machines a 0 a 1 a q … p1p1 p2p2 b 0 b 1 b q …