Upload
others
View
3
Download
0
Embed Size (px)
Citation preview
Genesis of Scribble
Gary Brown, Kohei Honda, Aybek Mukhamedov, Nobuko Yoshida
8th March 2011
Goals
To advance the theory and practice of composing distributed systems comprising collaborating autonomous processes, with a formal guarantee of their correct behaviour. More concretely:
Establish key formal foundations which enable flexible and versatile engineering in the development and execution of OOI CI conversation/governance architecture. Establish key systems principles for conversation-based software engineering and execution, realised as prototypes and experimented in real-world application environments.
Theories produce algorithms for achiving the second goal. Prototypes will be fully functional capturing essential features.
Formal Basis: Session TypesOne of the type theories for Pi-calculus (1994/1998~).
Application-level distributed interactions are often organised as multiparty sessions (``conversations'').
Session types describe these conversations as types.
A way to "divide and conquer" distributed computing.
Language primitives, statically checkable.
Ensures communication safety and other properties either by type checking or distributed runtime monitoring.
History of CollaborationSession types (ESOP1998)WS-CDL WG through Milner's initiative (2002)pi4soa open source project (2003)Endpoint projection (W3C-2005, ESOP2007)Multiparty Session Types (POPL2008)Scribble, early prototype (Feb. 2008)First Pi-Industry Workshop (April 2008)Session-based Java (ECOOP2008)Scribble, first version (Summer 2009)Second Pi-Industry Workshop (November 2009)OOI collaborations (Jan 2009~ )Implementations (Java, Scala, Ocaml), monitor theory and early prototype (Sep 2009~ )First OOI-Scribble Workshop(Now)
Scribble Framework PlanScribble Protocol
Specification
Protocol Template Code (labels, roles, types)
Formal Conformance Analysis
Conversation API Implementation Code
Static Validation (protocol type checker)
Runtime Monitoring
Application
Scribble (1)
Scribble is a language for specifying communication protocolsDescribes interaction from a global point of viewFormal basis on multi-party session types theory Supports projection of end-point specification
Scribble (2)
Protocol specifies interaction behaviour among participating agents A session is an instantiation of a protocolAgents participate in a protocol by taking up rolesMessage transport properties:
Asynchronous communicationMessage order preservationReliable delivery
Scribble Example (1)
import Request, Quote, Goods, Payment;protocol Purchase { role Buyer, Seller; Request from Buyer to Seller; Quote from Seller to Buyer; choice from Buyer to Seller { accept(Payment): Goods from Seller to Buyer; decline(): } }
FIPA: Request Interaction Protocol
1. Initiator requests Participant to perform an action; includes notify and reply-by parameters
2. Participant either:refuses the requestsends agree if Initiator requested notification and the action does not complete before reply-by time
3. Participant either:sends failure informs successful completioninforms success and includes results data
At any point Initiator may start cancellation protocol with Participant
FIPA: Request Interaction Protocol
protocol FIPA_RequestInteraction{role Initiator, Participant;
try { request(notify: bool, reply_by: Time) from Initiator to Participant; choice from Participant to Initiator { refuse(): { } agree() require (notify == true): choice from Participant to Initiator { inform_result(Data): {} inform_done(): {} failure(reason): {} } inform_result(Data) require (notify == false or local_time() < reply_by): {} inform_done() require (notify == false or local_time() < reply_by): {} failure(Reason) require (notify == false or local_time() < reply_by): {} } }catch (cancel(Data) from Initiator to Participant) { choice from Participant to Initiator { inform_done(): {} failure(Reason): {} } }
www.scribble.org
Open source project hosted at jboss.org
Source code will soon be moved to github, to provide a more "social" collaboration model
User and development forums
Subscribe for notifications to stay in touch
Issues reported in JIRA
Continuous integration build environment using Hudson