Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 University of Pennsylvania Grigoris Karvounarakis February 2004 Conversation Specification: A New Approach to Design and Analysis of E- Service Composition.

Similar presentations


Presentation on theme: "1 University of Pennsylvania Grigoris Karvounarakis February 2004 Conversation Specification: A New Approach to Design and Analysis of E- Service Composition."— Presentation transcript:

1 1 University of Pennsylvania Grigoris Karvounarakis February 2004 Conversation Specification: A New Approach to Design and Analysis of E- Service Composition T. Bultan, X. Fu, R. Hull, J. Su (UCSB and Bell Labs) presented by: Grigoris Karvounarakis Univ. of Pennsylvania DB seminar February 26, 2004

2 2 University of Pennsylvania Grigoris Karvounarakis February 2004 A model of an e-service (peer) (Read input from input queue) + (Send output to other service) + halt input queue …

3 3 University of Pennsylvania Grigoris Karvounarakis February 2004 Discrete vs. interactive services Discrete: RPC-like, output only depends on input Interactive: long-running services, responding to asynchronous events/messages

4 4 University of Pennsylvania Grigoris Karvounarakis February 2004 What about composition? A lot of research on modeling and implementing e-services (local properties of atomic e-services)… … but no work on formalizing their composition and the relationship between global properties of composite e-service and local properties of atomic e-services This paper: a framework for modeling and specifying the global behavior of e-service compositions

5 5 University of Pennsylvania Grigoris Karvounarakis February 2004 A simple example application store warehouse1 bank warehouse2 a k o1o1 o2o2 p1p1 r1r1 r2r2 b1b1 p2p2 b2b2 a: authorize k: ok o: order r: receipt b: bill p: payment

6 6 University of Pennsylvania Grigoris Karvounarakis February 2004 Definitions e-composition schema (ec-schema) is a triple (M,P,C) M = message classes P = e-services (peers) C = communication channels Σ in p Σ out p : set of message classes accepted by p as input : set of message classes produced by p as output

7 7 University of Pennsylvania Grigoris Karvounarakis February 2004 A simple example application store warehouse1 bank warehouse2 a k o1o1 o2o2 p1p1 r1r1 r2r2 b1b1 p2p2 b2b2 M = {A,K,O,R,P,B} P = {store, bank, warehouse1, warehouse2} C = {(store, bank, a), (store, warehouse1, o), …} Σ in store Σ out store = {r, k} = {o, a}

8 8 University of Pennsylvania Grigoris Karvounarakis February 2004 Mealy ec-implementations (T, s,,, F, δ) Σ in p Σ out p δ: one of the “peers”: l consumes a non-empty input l produces a non-empty output l makes a move on empty string ec-configuration: ( Q 1, t 1, Q 2, t 2,…, Q n, t n, w) w is a halting conversation for I if: ( ε, s 1, ε, s 2,…, ε, s n, ε) → * ( ε, t 1, ε, t 2,…, ε, t n, w)

9 9 University of Pennsylvania Grigoris Karvounarakis February 2004 W = ako 1 b 1 p 1 r 1 !a?k ?r 1 !o 1 !o 2 ?r 2 !o 2 ?r 2 !o 1 ?r 1 Store Mealy ec-implementations ?a!k !p 1 ?b 1 ?b 2 !p 2 ?b 2 !p 2 ?b 1 !p 1 Bank ?o 1 !b 1 ?p 1 !r 1 !b 1 ?p 1 Warehouse1 ε W = ako 1 b 1 p 1 r 1

10 10 University of Pennsylvania Grigoris Karvounarakis February 2004 Mealy ec-implementations !a?k ?r 1 !o 1 !o 2 ?r 2 !o 2 ?r 2 !o 1 ?r 1 Store ?a!k !p 1 ?b 1 ?b 2 !p 2 ?b 2 !p 2 ?b 1 !p 1 Bank ?o 1 !b 1 ?p 1 !r 1 !b 1 ?p 1 Warehouse1 ε W = ako 1 b 1 r 1 p 1

11 11 University of Pennsylvania Grigoris Karvounarakis February 2004 Ec-languages Ec-language (C(I)): set of all halting conversations w for mealy implementation I. This example: L = ak SH ( (o 1 SH (r 1, b 1 p 1 ) )*, (o 2 SH (r 2, b 2 p 2 ) )* ) (is it the same?: L = ak ( (o 1 (r 1 || b 1 p 1 ) )* || (o 2 (r 2 || b 2 p 2 ) )* ) ) Is it the case that such ec-languages are always regular?

12 12 University of Pennsylvania Grigoris Karvounarakis February 2004 Ec-languages are not regular p1p1 p2p2 c 1 = (p 1, p 2, {a}) c 2 = (p 2, p 1, {b}) !a?b p1p1 ?a !b p2p2 L = {a b | n≥0}, not regular! nn In general: not even guaranteed to be context-free …

13 13 University of Pennsylvania Grigoris Karvounarakis February 2004 Properties of ec-languages l Context Sensitive l There exists a quasi-realtime automaton M with 3 queues that accepts C(I) Book & Greibach: “Quasi-realtime languages are the languages accepted by nondeterministic multitape Turing machines in real time. The family of quasi-realtime languages forms an abstract family of languages closed under intersection, linear erasing, and reversal. It is identical with the family of languages accepted by nondeterministic multitape Turing machines in linear time. Every quasi-realtime language can be accepted in real time by a non- deterministic one stack, one pushdown store machine, and can be expressed as the length- preserving homomorphic image of the intersection of three context-free languages” l C(I) is regular when queue length is bounded by a fixed constant (of course it is also regular if communication is synchronous …)

14 14 University of Pennsylvania Grigoris Karvounarakis February 2004 The synthesis problem Given an ec-schema S and some peer implementations, we can build an ec-implementation I (expecting that the composition will generate some language L).  Can we characterize the relationship between C(I) and the languages accepted by the peers (which are regular, since peers are FSAs)? The inverse problem is also interesting: given an ec- implementation I, can we find a regular language at its “core?”?

15 15 University of Pennsylvania Grigoris Karvounarakis February 2004 PREPONE l Swap messages in a conversation when they are “independent”: l Disjoint senders/receivers l Receiver of 2 nd is also sender of 1 st l Ec-languages are: l Closed under PREPONE l The family of C(I)s is strictly contained in the family of context-sensitive languages (since not all cf languages are closed under PREPONE)

16 16 University of Pennsylvania Grigoris Karvounarakis February 2004 Joining local views p1p1 L 1 = {a} p2p2 c 1 =(p 1, p 2, {a}) p3p3 p4p4 c 2 = (p 3, p 4, {b}) c 2 = (p 4, p 3, {c}) … but their composition is not {a, bc}! C(I) = {ε, a, bc, abc, bac, bca} L 2 = {bc}

17 17 University of Pennsylvania Grigoris Karvounarakis February 2004 Joining local views L i = {w | for all I, π p (w) in L i } closure(L): minimal superset of L closed under prepone and join closure(L) ≤ C(I) Unfortunately, there are cases when closure(L) != C(I)

18 18 University of Pennsylvania Grigoris Karvounarakis February 2004 PREPONE is not enough p1p1 p2p2 c 1 = (p 1, p 2, {a}) c 2 = (p 2, p 1, {b}) L = {ab, bac} closure(L) = L p3p3 c 3 =(p 2, p 3, {c}) I(p 1 ) !a ?b I(p 2 ) !b ?a !c … but C(I) != closure(L) (e.g., it also includes abc)

19 19 University of Pennsylvania Grigoris Karvounarakis February 2004 Local prepone l Applies locally (on each peer), i.e.: LP i l Extends prepone by allowing to swap messages m 1, m 2 when receiver(m 1 ) = sender(m 2 ) (doesn’t this mean we get all permutations? What about possible dependencies?) ecc(L) = i LP i ( π p i (L)) ecc(L) = i LP i (L(I(p i ))) * *

20 20 University of Pennsylvania Grigoris Karvounarakis February 2004 A different approach Start from a conversation specification S for ec-schema S, build an ec-implementation I that conforms to S or realizes S. For every regular language L we can construct a Mealy ec-implementation I such that: C(I) = ecc(L) (construct automaton for L and “project” it on individual peers)

21 21 University of Pennsylvania Grigoris Karvounarakis February 2004 The inverse problem It is not the case of course that for every I there exists a regular language s.t. C(I) = ecc(L) … but this is true for tree-based schemas (i.e., schemas whose undirected corresponding graph is a tree)

22 22 University of Pennsylvania Grigoris Karvounarakis February 2004 Bottom-Up vs. Top-Down Two approaches for designing composite e-services:  Bottom-Up: Synthesize from atomic e-services Design each service individually and compose them (through join and prepone) yields C(I) >= closure(L) Conversely, given a I, we cannot find a regular language that it implements  Top-Down: may be conceptually cleaner First, define a conversation specification S of the composition For every regular language we can construct a Mealy ec- implementation I that realizes it (i.e., C(I) = ecc(L))


Download ppt "1 University of Pennsylvania Grigoris Karvounarakis February 2004 Conversation Specification: A New Approach to Design and Analysis of E- Service Composition."

Similar presentations


Ads by Google