31 research outputs found
Global Escape in Multiparty Sessions
International audienceThis article proposes a global escape mechanism which can handle unexpected or unwanted conditions changing the default execution of distributed communicational flows, preserving compatibility of the multiparty conversations. Our escape is realised by a collection of asynchronous local exceptions which can be thrown at any stage of the communication and to any subsets of participants in a multiparty session. This flexibility enables to model complex exceptions such as criss-crossing global interactions and error handling for distributed cooperating threads. Guided by multiparty session types, our semantics is proven to provide a termination algorithm for global escapes. Our type system guarantees further safety and liveness properties, such as progress within the session and atomicity of escapes with respect to the subset of involved participants
Session Types for Broadcasting
Up to now session types have been used under the assumptions of point to
point communication, to ensure the linearity of session endpoints, and reliable
communication, to ensure send/receive duality. In this paper we define a
session type theory for broadcast communication semantics that by definition do
not assume point to point and reliable communication. Our session framework
lies on top of the parametric framework of broadcasting psi-calculi, giving
insights on developing session types within a parametric framework. Our session
type theory enjoys the properties of soundness and safety. We further believe
that the solutions proposed will eventually provide a deeper understanding of
how session types principles should be applied in the general case of
communication semantics.Comment: In Proceedings PLACES 2014, arXiv:1406.331
Affine Sessions
Session types describe the structure of communications implemented by
channels. In particular, they prescribe the sequence of communications, whether
they are input or output actions, and the type of value exchanged. Crucial to
any language with session types is the notion of linearity, which is essential
to ensure that channels exhibit the behaviour prescribed by their type without
interference in the presence of concurrency. In this work we relax the
condition of linearity to that of affinity, by which channels exhibit at most
the behaviour prescribed by their types. This more liberal setting allows us to
incorporate an elegant error handling mechanism which simplifies and improves
related works on exceptions. Moreover, our treatment does not affect the
progress properties of the language: sessions never get stuck
Dynamic Choreographies - Safe Runtime Updates of Distributed Applications
Programming distributed applications free from communication deadlocks and
races is complex. Preserving these properties when applications are updated at
runtime is even harder. We present DIOC, a language for programming distributed
applications that are free from deadlocks and races by construction. A DIOC
program describes a whole distributed application as a unique entity
(choreography). DIOC allows the programmer to specify which parts of the
application can be updated. At runtime, these parts may be replaced by new DIOC
fragments from outside the application. DIOC programs are compiled, generating
code for each site, in a lower-level language called DPOC. We formalise both
DIOC and DPOC semantics as labelled transition systems and prove the
correctness of the compilation as a trace equivalence result. As corollaries,
DPOC applications are free from communication deadlocks and races, even in
presence of runtime updates.Comment: Technical Repor
Parameterised Multiparty Session Types
For many application-level distributed protocols and parallel algorithms, the
set of participants, the number of messages or the interaction structure are
only known at run-time. This paper proposes a dependent type theory for
multiparty sessions which can statically guarantee type-safe, deadlock-free
multiparty interactions among processes whose specifications are parameterised
by indices. We use the primitive recursion operator from G\"odel's System T to
express a wide range of communication patterns while keeping type checking
decidable. To type individual distributed processes, a parameterised global
type is projected onto a generic generator which represents a class of all
possible end-point types. We prove the termination of the type-checking
algorithm in the full system with both multiparty session types and recursive
types. We illustrate our type theory through non-trivial programming and
verification examples taken from parallel algorithms and Web services usecases.Comment: LMCS 201
CaSPiS: A Calculus of Sessions, Pipelines and Services
Service-oriented computing is calling for novel computational models and languages with well
disciplined primitives for client-server interaction, structured orchestration and unexpected events handling. We present CaSPiS, a process calculus where the conceptual abstractions of sessioning and pipelining play a central role for modelling service-oriented systems. CaSPiS sessions are two-sided, uniquely named and can be nested. CaSPiS pipelines permit orchestrating the flow of data produced by different sessions. The calculus is also equipped with operators for handling (unexpected) termination of the partner’s side of a session. Several examples are presented to provide evidence of the flexibility of the chosen set of primitives. One key contribution is a fully abstract encoding of Misra et al.’s orchestration language Orc. Another main result shows that in CaSPiS it is possible to program a “graceful termination” of nested sessions, which guarantees that no session is forced to hang forever after the loss of its partner
Dynamic Choreographies: Theory And Implementation
Programming distributed applications free from communication deadlocks and
race conditions is complex. Preserving these properties when applications are
updated at runtime is even harder. We present a choreographic approach for
programming updatable, distributed applications. We define a choreography
language, called Dynamic Interaction-Oriented Choreography (AIOC), that allows
the programmer to specify, from a global viewpoint, which parts of the
application can be updated. At runtime, these parts may be replaced by new AIOC
fragments from outside the application. AIOC programs are compiled, generating
code for each participant in a process-level language called Dynamic
Process-Oriented Choreographies (APOC). We prove that APOC distributed
applications generated from AIOC specifications are deadlock free and race free
and that these properties hold also after any runtime update. We instantiate
the theoretical model above into a programming framework called Adaptable
Interaction-Oriented Choreographies in Jolie (AIOCJ) that comprises an
integrated development environment, a compiler from an extension of AIOCs to
distributed Jolie programs, and a runtime environment to support their
execution.Comment: arXiv admin note: text overlap with arXiv:1407.097
A gentle introduction to multiparty asynchronous session types
This article provides a gentle introduction to multiparty session types, a class of behavioural types specifically targeted at describing protocols in distributed systems based on asynchronous communication. The type system ensures well-typed processes to enjoy non-trivial properties, including communication safety, protocol fidelity, as well as progress. The adoption of multiparty session types can positively affect the whole software lifecycle, from design to deployment, improving software reliability and reducing its development costs