What is a Choreography? A choreography is a way to organize a - - PowerPoint PPT Presentation

what is a choreography
SMART_READER_LITE
LIVE PREVIEW

What is a Choreography? A choreography is a way to organize a - - PowerPoint PPT Presentation

Section I : Introduction Definition What is a Choreography? A choreography is a way to organize a multiparty web application in a manner that emphasizes the interactions among the constituent parties. A choreography specifies Desired


slide-1
SLIDE 1

Section I : Introduction Definition

What is a Choreography?

A choreography is a way to organize a multiparty web application in a manner that emphasizes the interactions among the constituent parties. A choreography specifies Desired interactions from a shared viewpoint Parties involved as roles Types of messages the roles send one another Any constraints on the occurrence and ordering of the messages

1 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU

slide-2
SLIDE 2

Section II : Model and Semantic Patterns Model

Model of Commitments

We specify a model where parties Create publicly observable commitments with one another Manipulate commitments with one another Adopt several roles during an enactment A commitment is represented as c = C (debtor, creditor, antecedent, consequent) An example c = C (buyer, seller, goods, pay)

2 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU

slide-3
SLIDE 3

Section II : Model and Semantic Patterns Model

Commitments and Operations on Them

The commitment c can be manipulated create (c) cancel (c) release (c) assign (c, z) delegate (c, z) detach (c) update (c) discharge (c)

3 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU

slide-4
SLIDE 4

Section II : Model and Semantic Patterns Model

Commitments and Operations on Them

The life cycle of a commitment

violated conditional antecedent discharged consequent detached consequent_timeout

  • null

create terminated release cancel expire

  • 4 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU

slide-5
SLIDE 5

Section II : Model and Semantic Patterns Model

Commitments and Operations on Them

Sample enactments for a commitment

buyer seller c = C(buyer, seller, goods, pay) alt

  • 2. goods

1: offer c does not exist create(c)

  • 3. pay

detach(c) discharge(c)

  • 4. reject

cancel(c)

[c exists]

5 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU

slide-6
SLIDE 6

Section II : Model and Semantic Patterns Semantic Patterns

Message Meanings and Relationships

Creating a Commitment

x: S y:R c = C(x, y, p, q) CREATE

  • 1. create(c)

c exists

6 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU

slide-7
SLIDE 7

Section II : Model and Semantic Patterns Semantic Patterns

Message Meanings and Relationships

Progressing a Commitment

x: S y:R loop

  • 1. partial detach(c)

c = C(x, y, p, q) PROGRESS z:S1 z’:R1

  • 3. partial discharge(c)

loop

  • 4. delegate (c, z)

alt

  • 2. full detach(c)
  • 5. assign (c, z’)

[ c exists ]

c exists

[ c exists ] [ c exists ] [ c exists ] [ c exists ]

7 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU

slide-8
SLIDE 8

Section II : Model and Semantic Patterns Semantic Patterns

Message Meanings and Relationships

Updating a Commitment

x: S y:R c = C(x, y, p, q) UPDATE

  • 2. update(c)

[ c exists ]

c does not exist c’ exists

8 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU

slide-9
SLIDE 9

Section II : Model and Semantic Patterns Semantic Patterns

Message Meanings and Relationships

Completing a Commitment

x: S y:R c = C(x, y, p, q) COMPLETE alt

  • 3. release(c)
  • 2. cancel(c)
  • 4. full discharge(c)

[ c exists ]

c does not exist

9 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU

slide-10
SLIDE 10

Section II : Model and Semantic Patterns Semantic Patterns

Message Meanings and Relationships

Advancing a Commitment

x: S y:R c = C(x, y, p, q) ADVANCE Alt

  • 3. do action
  • 2. do action

10 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU

slide-11
SLIDE 11

Section III: Pragmatic Patterns Canceling a Commitment

Canceling a Commitment

sd Cancel (Commitment c)

y: Creditor x: Debtor

  • 1. do: cancel(c)

alt

  • 2. sanction: 1
  • 3. escalate: 1
  • 4. sanction: cancel(c):3

c = C(x, y, p, q)

z: Debtor’s Supervisor

11 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU

slide-12
SLIDE 12

Section III: Pragmatic Patterns Releasing a Commitment

Releasing a Commitment

x: Debtor y:Creditor

  • 2. request: release(c)

alt

  • 5. refuse:2

c = C(x, y, p, q) sd Release (Commitment c)

  • 4. do: release(c)

alt

  • 1. do: release(c)

12 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU

slide-13
SLIDE 13

Section III: Pragmatic Patterns Delegating a Commitment

Delegating a Commitment

x: Debtor y: Creditor c = C(x, y, p, q) sd Delegate (Commitment c, Debtor a) a: Debtor alt 1.request: delegate(c, a)

  • 2. agree: 1
  • 4. refuse: 1
  • 3. do: delegate(c, a)

13 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU

slide-14
SLIDE 14

Section III: Pragmatic Patterns Assigning a Commitment

Assigning a Commitment

Analogous to a delegation pattern Here the creditor initiates an assignment by sending a message to the debtor Can perform the assignment unilaterally

14 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU

slide-15
SLIDE 15

Section IV: Methodology A Travel Planning Business Scenario

A Travel Planning Business Scenario

A passenger requests a travel agency to book air line tickets, a hotel room, and a rental car The travel agency interacts with airlines, hotels, and rental cars The passenger makes payment to the travel agency for its services The travel agency pays the airline, the hotel, and the rental car company

15 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU

slide-16
SLIDE 16

Section IV: Methodology M1: Identify Stakeholders as Roles

M1: Identify Stakeholders as Roles

Steps in M1 Input A business scenario and domain expertise Output A set of autonomous entities whose interaction is being modeled In travel planning business scenario roles identified are Passenger, Travel Agency, Airline, Hotel, Car Rental Agency

16 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU

slide-17
SLIDE 17

Section IV: Methodology M2: Record one or more Typical Discourse

M2: Record one or more Typical Discourse

Steps in M2 Input The output of Step M1, business scenario, and domain expertise Output Illustrative discourses of the interaction being modeled in terms of messages: one primary and zero or more secondary

17 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU

slide-18
SLIDE 18

Section IV: Methodology M2: Record one or more Typical Discourse

The travel planning example (happy path)

ID S R Content 1 P T I’ll pay $a if you send me itinerary i 2 T A1 I’ll pay $a1 if you send me ticket t for P 3 T H1 P will pay $a2 if you make a room resv r for P 4 A1 T I have no tickets 5 T A2 I’ll pay $a1 if you send me ticket t for P 6 A2 T Here’s ticket t for P 7 T R P will pay $a3 if you make a car resv rc for P 8 H1 T Reservation r done for P 9 R T Reservation rc done for P 10 T P Here’s itinerary i 20 P T Here is $a I owe you for itinerary i

18 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU

slide-19
SLIDE 19

Section IV: Methodology M2: Record one or more Typical Discourse

Guidelines for creating a primary discourse

Create a discourse that represents a positive outcome reflects the social or organizational relationships among the roles

  • mit messages that do not add to an observer’s knowledge
  • f the interaction

does not include roles that do not add to an observer’s knowledge of the interaction

19 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU

slide-20
SLIDE 20

Section IV: Methodology M3: Record One or More Discourses Demonstrating Exceptions

M3: Record One or More Discourses Demonstrating Exceptions

Steps in M3 Input The output of Step M2, business scenario, and domain expertise Output Discourses exhibiting exceptions in the interactions being modeled

20 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU

slide-21
SLIDE 21

Section IV: Methodology M3: Record One or More Discourses Demonstrating Exceptions

The trip planning example (exceptions)

ID S R Content 11 P T Please remove car reservation from i 12a T R Please cancel reservation rc 13 T P Here’s the updated itinerary i 14a T H1 Room reservation has to be canceled 15 T P Will an alternative room do? 16 P T yes 14b H1 T OK to cancel room reservation 17 T H2 P will pay you $a2 if you reserve room r ′ for P 18 H2 T Reservation r ′ done for P 19 T P Here’s the updated itinerary i

21 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU

slide-22
SLIDE 22

Section IV: Methodology M4: Annotate Messages in Discourses

M4: Annotate Messages in Discourses

Steps in M4 Input The output of Step M2 and M3 Output Annotations of each message produced by steps M2 and M3

22 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU

slide-23
SLIDE 23

Section IV: Methodology M4: Annotate Messages in Discourses

M4: Annotate Messages in Discourses

Illustrating the message annotations Message 1 creates a commitment C1 from P to T Message 10 progresses Message 1 by detaching the commitment C1 and advances Messages 1, 6, 8, and 9 Message 13 updates Message 10 and advances Message 11 Message 19 updates Message 13, completes Message 16, advances Message 18 Message 20 completes Message 10 by discharging C1

23 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU

slide-24
SLIDE 24

Section IV: Methodology M5: Validate Discourses

M5: Validate Discourses

Steps in M5 Input The annotations of step M4 along with the discourses

  • f steps M2 and M3

Output None

24 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU

slide-25
SLIDE 25

Section IV: Methodology M5: Validate Discourses

M5: Validate Discourses

Completeness check for happy path ID S R Content 21 T A2 Here is $a1 I owe you for ticket t 22 T H2 Here is $a2 I owe you for room r ′ Completeness check for exceptions ID S R Content 12b R T Reservation rc canceled 14c H1 T Room r canceled

25 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU

slide-26
SLIDE 26

Section IV: Methodology M6: Map the Discourses to CC Graph

M6: Map the Discourses to CC Graph

Steps in M6 Input The output of Step M4 and M5 Output A CC graph of the discourse; identification of commitment operation patterns in the interaction

26 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU

slide-27
SLIDE 27

Section IV: Methodology M6: Map the Discourses to CC Graph

A conversation graph of the discourse

1. create (C1)

  • 10.

detach (c1)

  • 2.

create (C2)

  • 3.

create (C3)

  • 11.
  • 13.

update (c1)

  • 22.

disch (C6)

  • Link to the complete conversation graph

27 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU

slide-28
SLIDE 28

Section IV: Methodology M6: Map the Discourses to CC Graph

Discharging a commitment

p create(c)

  • q

detach(c)

  • q:detach(c)

p:create(c) S R r:disch(c) r discharge(c)

  • Conversation graph

CC component

  • p

create(c)

  • p:create(c)

S R r:disch(c) r discharge(c)

  • 28 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU

slide-29
SLIDE 29

Section IV: Methodology M6: Map the Discourses to CC Graph

Canceling a Commitment

S R p create(c)

  • q

detach(c)

  • r:cancel(c)

p

Conversation graph CC component

S R p create(c)

  • q

cancel(c)

  • q:cancel(c)

p r cancel(c)

  • q:detach(c)

29 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU

slide-30
SLIDE 30

Section IV: Methodology M6: Map the Discourses to CC Graph

Releasing a Commitment

p create(c)

  • r

release(c)

  • p

q:release(c) S R p create(c)

  • q

detach(c)

  • p

q:detach(c) S R

Conversation graph CC component

  • r

release(c)

  • r:release(c)

30 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU

slide-31
SLIDE 31

Section IV: Methodology M6: Map the Discourses to CC Graph

Delegating a Commitment

S p: create(c4) q: detach(c4) R r: delegate(c4,AG)

p create(c)

  • q

detach(c)

  • r

delegate(c)

  • s

discharge(c)

  • S’

s: discharge(c5) q: detach(c5) p: create(c5) S p: create(c4) R q: delegate(c4,AG)

p create(c)

  • q

delegate(c)

  • r

discharge(c)

  • S’

s: discharge(c5) p: create(c5) Conversation graph CC component

31 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU

slide-32
SLIDE 32

Section IV: Methodology M6: Map the Discourses to CC Graph

Assigning a Commitment

p create(c)

  • q

detach(c)

  • r

assign(c)

  • s

discharge(c)

  • S

p: create(c4) R r: discharge(c5)

p create(c)

  • q

assign(c)

  • r

discharge(c)

  • R’

q: assign(c4,R’) p: create(c5) Conversation graph CC component S p: create(c4) R s: discharge(c5) R’ r: assign(c4,R’) p: create(c5) q: detach(c4) q: detach(c5)

32 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU

slide-33
SLIDE 33

Section IV: Methodology M6: Map the Discourses to CC Graph

Updating a Commitment

p create(c)

  • q

update(c)

  • p

S R q:update(c)

Conversation graph CC component

33 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU

slide-34
SLIDE 34

Section IV: Methodology M6: Map the Discourses to CC Graph

Generate CC graph from the Conversation Graph

The generated CC graph

P 10: detach(c1) 1: create (c1) 20: disch(c1) T

1. create(c1)

  • 10.

detach(c1)

  • 13.

update(c1)

  • 19.

update(c1)

  • 20.

disch(c1)

  • 13: update(c1)

19: update(c1) 34 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU

slide-35
SLIDE 35

Section IV: Methodology M7: Generate a Choreography

M7: Generate a Choreography

Steps in M7 Input The output of Step M6 Output A choreography based on the CC graph generated for the recorded discourses

35 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU

slide-36
SLIDE 36

Section IV: Methodology M7: Generate a Choreography

Generate Choreography from CC graph

P 10: detach(c1) 1: create(c1) 20: disch(c1) T 13: update(c1) 19: update(c1) P T

  • 1. create(c1)

P T alt

  • 10. full detach(c1)
  • P

T

  • 13. update(C1)

P T alt

  • 20. disch(c1)

P T alt

  • 19. update(C1)

36 / 36

Anup Kalia, Ashok Mallya, Munindar Singh c

2012 by SOC Lab, NCSU