• Non ci sono risultati.

Towards Trustworthy Multiparty Sessions

N/A
N/A
Protected

Academic year: 2022

Condividi "Towards Trustworthy Multiparty Sessions"

Copied!
24
0
0

Testo completo

(1)

Towards Trustworthy Multiparty Sessions

Roberto Bruni1 Ivan Lanese2 Hern´an Melgratti3 Leonardo Gaetano Mezzina4 Emilio Tuosto5

1Universit`a di Pisa

2Universit`a di Bologna

3Universidad de Buenos Aires

4IMT Alti Studi Lucca

5University of Leicester

PLACES 2008 Oslo, Norway June 7th, 2008

(2)

Outline

1 Introduction & Motivation

2 A Glimpse of µse, graphically

3 Something About Types

4 Concluding Remarks

(3)

A Shared Vision (Hopefully!)

1st Fact

Trustworthy Service Oriented Computing is hard: services are autonomous, heterogeeneous, separately designed computational entities to be

dynamically assembled.

2nd Fact

Process Calculi can help: they allow to focus on salient features at a convenient level of abstraction.

3rd Fact

Behavioural types can help: syntactic descriptions of services are not expressive enough to guarantee their trustworthy assembly.

4th Fact (or mere conjecture?)

Existing techniques must be adapted: SOC has specific features like endpoints, sessions, dynamicity.

(4)

A Shared Vision (Hopefully!)

1st Fact

Trustworthy Service Oriented Computing is hard: services are autonomous, heterogeeneous, separately designed computational entities to be

dynamically assembled.

2nd Fact

Process Calculi can help: they allow to focus on salient features at a convenient level of abstraction.

3rd Fact

Behavioural types can help: syntactic descriptions of services are not expressive enough to guarantee their trustworthy assembly.

4th Fact (or mere conjecture?)

Existing techniques must be adapted: SOC has specific features like endpoints, sessions, dynamicity.

(5)

A Shared Vision (Hopefully!)

1st Fact

Trustworthy Service Oriented Computing is hard: services are autonomous, heterogeeneous, separately designed computational entities to be

dynamically assembled.

2nd Fact

Process Calculi can help: they allow to focus on salient features at a convenient level of abstraction.

3rd Fact

Behavioural types can help: syntactic descriptions of services are not expressive enough to guarantee their trustworthy assembly.

4th Fact (or mere conjecture?)

Existing techniques must be adapted: SOC has specific features like endpoints, sessions, dynamicity.

(6)

A Shared Vision (Hopefully!)

1st Fact

Trustworthy Service Oriented Computing is hard: services are autonomous, heterogeeneous, separately designed computational entities to be

dynamically assembled.

2nd Fact

Process Calculi can help: they allow to focus on salient features at a convenient level of abstraction.

3rd Fact

Behavioural types can help: syntactic descriptions of services are not expressive enough to guarantee their trustworthy assembly.

4th Fact (or mere conjecture?)

Existing techniques must be adapted: SOC has specific features like endpoints, sessions, dynamicity.

(7)

Our Proposal

µse (after MUltiparty SEssions)

µse is a process calculus for expressing computations where endpoints dynamically join existing multiparty sessions (as seen on Emilio’s talk @ COORDINATION 2008)

Types for

Semantic description of services (for discovery) Compatibility check (for dynamic assembly)

Early detection of possible sources of problems (trustworthiness)

Disclaim

We restrict to consider a “bare bones” fragment of µse

We present a parametric type system w.r.t. 3 notions (task separation, dual type compatibility, session completion)

We conjecture subject reduction + all non-typeable processes can deadlock We look for stronger guarantees

(8)

Outline

1 Introduction & Motivation

2 A Glimpse of µse, graphically

3 Something About Types

4 Concluding Remarks

(9)

Sites, Service Invocation and Sessions

(10)

Sites, Service Invocation and Sessions

(11)

Sites, Service Invocation and Sessions

(12)

Sites, Service Invocation and Sessions

(13)

Merging Sessions

(14)

Merging Sessions

(15)

Outline

1 Introduction & Motivation

2 A Glimpse of µse, graphically

3 Something About Types

4 Concluding Remarks

(16)

Types for Dynamic Multiparty Sessions

Type judgments

Γ; ∆ ⊢ P : {σ ր ρ}

we call σ the current type, and ρ the delegated type P provides communication activities in σ and ρ

activities σ concern the current participants of its session,

activities ρ concern other endpoints that P itself will allow to join its session (via service invocation or merge)

Γ is a finite partial mapping from variables X and polarized service / entry-point names np (with p ∈ {+, −}) to type pairs σ ր ρ, with the understanding that actions in ρ are delegated to np.

∆ is a finite partial mapping from session names r to types σ, such that

∆(r ) is the parallel composition of the current types of all endpoints of r

Self typeable systems

Γ; ∆ ⊢ S : {0 ր 0}

(17)

Parametric on Task Separation

Task separation

Task separation c ∗ σ is used to project the activities of P in separate threads for later delegation.

Our choice

Here we take the most relaxed form of separation, where c ∗ σ = c|σ.

Used in

(Taction)

Γ; ∆ ⊢ P : {σ ր ρ}

Γ; ∆ ⊢ c.P : {c ∗ σ ր ρ}

(18)

Parametric on Type Compatibility

Type compatibility

Type compatibility σ ≈ ρ says that σ and ρ are complementary.

Our choice

Let I (σ) = {c | ∃σ: σ 7→ σc } be the set of initial actions of σ.

Here we take the largest relation on types such that whenever σ ≈ ρ:

either I (σ) = I (ρ) = ∅,

or K = I (σ) ∩ I (ρ) 6= ∅ and, for each x ∈ K and for each σ and ρ such that σ7→ σx and ρ7→ ρx , then σ ≈ ρ.

Used in

Γ is well-formed if:

whenever Γ(np) = σ ր ρ, then Γ(np) = σ ր ρ for some ρ ≈ ρ, whenever Γ(a) = σ ր ρ, then σ = 0.

(19)

Parametric on Session Completion

Session completion

The completion set ⇓0 contains those types σ that express admissible interactions of multiple endpoints.

Our choice

Here we define ⇓0 as the largest set of types σ such that:

for each c ∈ I (σ) such that c 6∈ I (σ) and for each σ7→ στ there exists σ′′ such that c ∈ I (σ′′) and σ 7→τ σ′′,

if σ7→ στ then σ ∈⇓0. Used in

We say that ∆ is fully-formed if whenever ∆(r ) = σ, then σ ∈⇓0.

(20)

Example: Two Buyers

(νr

1

, r

2

)(l

s

:: Sell | l

1

:: Buy

1

| l

2

:: Buy

2

)

Sell = sell ⇒ title.install[Offer ].merge e

The service sell waits for a buyer to require a quote for a book (title), installs a new service offer for a second buyer and prepares for merging with an instance of offer .

Offer = offer ⇒ merge+ e.(title.(quote.Q3|quote.Q4)) offer provides the book’s title so that quotes are communicated to both buyers after the sessions are merged.

Buy1 = r1⊲invoke sell.title.quote.bid.Q1 Buy2 = r2⊲invoke offer .title.quote.bid.Q2

Buyers communicate over bid and the negotiation is concluded by the interactions among Q, Q1 and Q2 (not modeled here).

(21)

Example: Typing the Two Buyers

Γ = { sell+: (0 ր b|t|q|Q3), sell : (0 ր b|t.q|Q1), offer+: (0 ր b|t|q|Q4), offer: (0 ր b|t|q|Q2), e: (b ր 0), e+: (q|b|Q3ր 0) }

(Tinstall)

Γ; ∆ ⊢ P : {σ12 ր ρ} Γ(a+) = σ1ր σ2 Γ(a) = 0 ր ρ Γ; ∆ ⊢ Q : {Φ}

Γ; ∆ ⊢ install[a ⇒ P].Q : {Φ}

(Tmerge)

Γ; ∆ ⊢ P : {σ123 ր ρ} Γ(ep) = σ|σ2ր σ3 Γ(ep) = σ′′ր ρ σ≈ σ′′

Γ; ∆ ⊢ mergep e.P: {σ1′′ ր σ23|ρ}

(22)

Outline

1 Introduction & Motivation

2 A Glimpse of µse, graphically

3 Something About Types

4 Concluding Remarks

(23)

Conclusion

Preliminary study

Some self typeable systems can behave “badly” (no check on availability of services, entry points, etc).

Future work

Suitable syntactic restrictions to obtain stronger guarantees.

Change the notions of c ∗ σ, ≈ and ⇓0 if needed Your feedback would be welcome!!

(24)

Conclusion

Preliminary study

Some self typeable systems can behave “badly” (no check on availability of services, entry points, etc).

Future work

Suitable syntactic restrictions to obtain stronger guarantees.

Change the notions of c ∗ σ, ≈ and ⇓0 if needed Your feedback would be welcome!!

Riferimenti

Documenti correlati

In Computer Science concepts arise as distillations of our design of systems.. Natural Sciences

Given a user process P and the set of global types associated to the service identifiers which occur free or bound in P we can add the sender and the receivers to each communication,

This is due to the replacement of some original processes by the projections of global types into the corresponding participants; see the definition of direct composition of

(ii) try-catch blocks cannot be at any point in the program but only after a session connection: this means that for a conversation a default behaviour and an exceptional one

We start by defining the typing rules for single queues, in which the turnstile ` is decorated with {s} (where s is the session name of the current queue) and the session

(Color online) Pseudorapidity density of charged particles measured in p-Pb collisions at √ s NN = 5.02 TeV for various centrality classes and estimators.. The different

The EF-hand domain in these proteins is characterized by the first loop being noncanonical (14 aa long) and by the first and last helices preceded and followed by

Ad esempio, il patrimonio genetico potrebbe essere corretto con interventi sulla linea somatica: nel caso degli impianti e delle protesi, poi, l’aggiorna- mento