Dipartimento di Informatica Università di Pisa Alberto Baragatti, Roberto Bruni, Hernán Melgratti, Ugo Montanari and Giorgio Spagnolo Prototype Platforms.

Slides:



Advertisements
Similar presentations
Connectors and Concurrency joint work with Ugo Montanari Roberto Bruni Dipartimento di Informatica Università di Pisa Dagstuhl Seminar #04241, September.
Advertisements

Mobile Agents Mouse House Creative Technologies Mike OBrien.
Two phase commit. Failures in a distributed system Consistency requires agreement among multiple servers –Is transaction X committed? –Have all servers.
FIPA Interaction Protocol. Request Interaction Protocol Summary –Request Interaction Protocol allows one agent to request another to perform some action.
1 Transactions and Web Services. 2 Web Environment Web Service activities form a unit of work, but ACID properties are not always appropriate since Web.
Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.
28.2 Functionality Application Software Provides Applications supply the high-level services that user access, and determine how users perceive the capabilities.
CS 582 / CMPE 481 Distributed Systems
Computer Science Lecture 17, page 1 CS677: Distributed OS Last Class: Fault Tolerance Basic concepts and failure models Failure masking using redundancy.
1 Formal Models for Distributed Negotiations Description Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias Informaticas.
Non-blocking Atomic Commitment Aaron Kaminsky Presenting Chapter 6 of Distributed Systems, 2nd edition, 1993, ed. Mullender.
Business Process Orchestration
The Atomic Commit Problem. 2 The Problem Reaching a decision in a distributed environment Every participant: has an opinion can veto.
1 Formal Models for Distributed Negotiations Workflows, BizTalk and ZSN Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias.
1 Ugo Montanari Dipartimento di Informatica Università di Pisa Roberto Bruni, GianLuigi Ferrari, Hernan Melgratti, Emilio Tuosto (Pisa) Cosimo Laneve (Bologna)
Hernán Melgratti joint work with Roberto Bruni and Ugo Montanari Dipartimento di Informatica - Università di Pisa Flat Committed Join in Join.
1 Formal Models for Distributed Negotiations Committed Join Calculus Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias.
1 Formal Models for Distributed Negotiations Exercises Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias Informaticas.
1 Formal Models for Distributed Negotiations From Petri Nets to Join Calculus Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela.
©Silberschatz, Korth and Sudarshan19.1Database System Concepts Distributed Transactions Transaction may access data at several sites. Each site has a local.
Systems Architecture, Fourth Edition1 Internet and Distributed Application Services Chapter 13.
16: Distributed Systems1 DISTRIBUTED SYSTEM STRUCTURES NETWORK OPERATING SYSTEMS The users are aware of the physical structure of the network. Each site.
1 Formal Models for Transactions: BizTalk as ZSN Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and.
1 ICS 214B: Transaction Processing and Distributed Data Management Distributed Database Systems.
Efficient Algorithms to Implement Failure Detectors and Solve Consensus in Distributed Systems Mikel Larrea Departamento de Arquitectura y Tecnología de.
VSP Video Station Protocol Presented by : Mittelman Dana Ben-Hamo Revital Ariel Tal Instructor : Sela Guy Presented by : Mittelman Dana Ben-Hamo Revital.
Dipartimento di Informatica Università di Pisa Nested Commits for Mobile Calculi: Extending Join Roberto Bruni, Hernán Melgratti and Ugo Montanari.
1 Formal Models for Distributed Negotiations Introduction Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias Informaticas.
Chapter 13: Process Specifications Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2005.
Transactional Web Services, WS-Transaction and WS-Coordination Based on “WS Transaction Specs,” by Laleci, Introducing WS-Transaction Part 1 & 2, by Little.
Chapter 26 Client Server Interaction Communication across a computer network requires a pair of application programs to cooperate. One application on one.
Module 15: Implementing Messaging Patterns. Overview Lesson 1: Creating Adaptable Orchestration Ports Lesson 2: Receiving Multiple Related Messages.
Modern Concurrency Abstractions for C# by Nick Benton, Luca Cardelli & C´EDRIC FOURNET Microsoft Research.
Chapter 17 Networking Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William Stallings.
CS162 Section Lecture 10 Slides based from Lecture and
1 Chapter Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.
Jozef Goetz, Application Layer PART VI Jozef Goetz, Position of application layer The application layer enables the user, whether human.
User Datagram Protocol (UDP) Chapter 11. Know TCP/IP transfers datagrams around Forwarded based on destination’s IP address Forwarded based on destination’s.
(Business) Process Centric Exchanges
Consensus and Its Impossibility in Asynchronous Systems.
Network Security. 2 SECURITY REQUIREMENTS Privacy (Confidentiality) Data only be accessible by authorized parties Authenticity A host or service be able.
Operating Systems Distributed Coordination. Topics –Event Ordering –Mutual Exclusion –Atomicity –Concurrency Control Topics –Event Ordering –Mutual Exclusion.
SOA-based Collaborative Authoring Andrew Roczniak Multimedia Research Lab University of Ottawa.
Byzantine fault-tolerance COMP 413 Fall Overview Models –Synchronous vs. asynchronous systems –Byzantine failure model Secure storage with self-certifying.
95-843: Service Oriented Architecture 1 Master of Information System Management Service Oriented Architecture Lecture 7: BPEL Some notes selected from.
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg This material is made available for private study and for direct.
1 Client-Server Interaction. 2 Functionality Transport layer and layers below –Basic communication –Reliability Application layer –Abstractions Files.
Jini Architecture Introduction System Overview An Example.
The Client-Server Model And the Socket API. Client-Server (1) The datagram service does not require cooperation between the peer applications but such.
Two-Phase Commit Brad Karp UCL Computer Science CS GZ03 / M th October, 2008.
Replication and Group Communication. Management of Replicated Data FE Requests and replies C Replica C Service Clients Front ends managers RM FE RM Instructor’s.
E81 CSE 532S: Advanced Multi-Paradigm Software Development Venkita Subramonian, Christopher Gill, Ying Huang, Marc Sentany Department of Computer Science.
Towards Decentralized Resource Allocation for Collaborative Peer- to-Peer Learning Environments Xavier Vilajosana, Daniel Lázaro and Joan Manuel Marquès.
DHCP Vrushali sonar. Outline DHCP DHCPv6 Comparison Security issues Summary.
Fault Tolerance Chapter 7. Goal An important goal in distributed systems design is to construct the system in such a way that it can automatically recover.
1 Kyung Hee University Chapter 11 User Datagram Protocol.
ECE 544 Group Project : Routing KC Huang. Objective Application: message multicast. A message is sent from one sender to 1~3 recipients. Reach a protocol.
1 Seminar on SOA Seminar on Service Oriented Architecture BPEL Some notes selected from “Business Process Execution Language for Web Services” by Matjaz.
CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems Paxos Steve Ko Computer Sciences and Engineering University at Buffalo.
Coordination and Agreement
An example of peer-to-peer application
Client-Server Interaction
Choosing the Discovery Model Martin Forsberg
Commit Protocols CS60002: Distributed Systems
Outline Announcements Fault Tolerance.
ECE 544 Group Project : Routing
Reliable Distributed Systems
Exercises for Chapter 14: Distributed Transactions
Distributed Databases Recovery
UNIVERSITAS GUNADARMA
Presentation transcript:

Dipartimento di Informatica Università di Pisa Alberto Baragatti, Roberto Bruni, Hernán Melgratti, Ugo Montanari and Giorgio Spagnolo Prototype Platforms for Distributed Agreements

Motivation ● Orchestration of multi-party negotiations ● Participants cannot be fixed statically ● Participants have a partial view of the whole set of parties ● To develop a coordination pattern that exploits the D2PC protocol for orchestrating agreements ● To build a prototype application

Scenario: Rescue teams Central Base Leader_1 Leader_2 Op_1 Op_2 Op_3

Scenario: Rescue teams Wants to assign the activity A_1 to Leader_1 Central Base Leader_1 Leader_2 Op_1 Op_2 Op_3

Scenario: Rescue teams Perform A_1 Central Base Leader_1 Leader_2 Op_1 Op_2 Op_3

Scenario: Rescue teams Central Base Leader_1 Leader_2 Op_1 Op_2 Op_3 Decides to assign A_1 to Op_1 and Op_2 Perform A_1

Scenario: Rescue teams Central Base Leader_1 Leader_2 Op_1 Op_2 Op_3 Perform A_1

Scenario: Rescue teams Central Base Leader_1 Leader_2 Op_1 Op_2 Op_3 Accepts the task Refuses the task

Scenario: Rescue teams Central Base Leader_1 Leader_2 Op_1 Op_2 Op_3 Attempts to assign A_1 to Op_3

Scenario: Rescue teams Central Base Leader_1 Leader_2 Op_1 Op_2 Op_3

Scenario: Rescue teams Central Base Leader_1 Leader_2 Op_1 Op_2 Op_3 Accepts the request

Scenario: Rescue teams Central Base Leader_1 Leader_2 Op_1 Op_2 Op_3 Accepts the request

Scenario: Rescue teams Central Base Leader_1 Leader_2 Op_1 Op_2 Op_3 Exceptions: ●The Central realizes that A_1 is not longer needed ●The Leader_1 prefers to execute another activity ●Op_2 is unable to do A_1

Scenario: Rescue teams Central Base Leader_1 Leader_2 Op_1 Op_2 Op_3 We need an agreement mechanism! Exceptions: ●The Central realizes that A_1 is not longer needed ●The Leader_1 prefers to execute another activity ●Op_2 is unable to do A_1

Agreements ● The structure of agreements depends on the interactions among the different parties. ● Participants can dynamically join a negotiation. ●Operators and leaders are getting involved in a negotiation during the execution of the agreement. ●Neither the number nor the identity of parties are know statically. ● Asynchronous communication.

Coordination Pattern ● We rely on the Distributed Two Phase Commit (D2PC) of [BLM2002]: ●A variant of the decentralized 2PC. ●Finite but unknown number of participants. ●A participant P ready to commit has a partial view of the set of participants ● Only those who directly cooperated with P ●P contacts all known partners and learns the identity of other participants from them.

D2PC: Initial state BCAD

BCAD A A A D,B,C

D2PC: Initial state BCAD A A A D,B,C

D2PC: Running BCAD A D,B,C A A A A A

D2PC: Running BCAD A,B,C D,B,C A,C,D A,B,D A D,B,C A A A A A

D2PC: Running BCAD A,B,C D,B,C A,C,D A,B,D A D,B,C A A

D2PC: Running BCAD A,B,C A,C,D A,B,D A A A A,B,C A,B,D A,B,C A,C,D

D2PC: Running BCAD A,B,C A,C,D A,B,D A,B,C A,C,D A,B,D A,B,C A,B,D A,B,C A,C,D

D2PC: Running BCAD A,B,C A,C,D A,B,D A,B,C A,C,D A,B,D

About the D2PC ● It has been specified in the Join Calculus. ● It was proposed to encode zero-safe nets in Join. ● It has been proved to be correct when there are no failures.

Coordination Pattern Central Base Leader_1 Op_1 Op_2 Op_3

Coordination Pattern Central Base Leader_1 Op_1 Op_2 Op_3 B C A D E 1. Initialization : Any participant creates a coordinator to handle the agreement

Coordination Pattern Central Base Leader_1 Op_1 Op_2 Op_3 B C A D E 2. Application Logic : Participants interact and exchange the identities of their coordinators

Coordination Pattern D Central Base Leader_1 Op_1 Op_2 Op_3 B C A D E A 2. Application Logic : Participants interact and exchange the identities of their coordinators

Coordination Pattern A A D,B,C Central Base Leader_1 Op_1 Op_2 Op_3 B C A D E A 2. Application Logic : Participants interact and exchange the identities of their coordinators

Coordination Pattern A A D,B,C Central Base Leader_1 Op_1 Op_2 Op_3 B C A D E A 3. Start of the D2PC : Participants start the commit protocol either voting commit or abort put - D,B,C put - A

Coordination Pattern Central Base Leader_1 Op_1 Op_2 Op_3 B C A E 4. Execution of D2PC : Coordinators eventually arrive to an agreement D

Coordination Pattern Central Base Leader_1 Op_1 Op_2 Op_3 B C A E 5. Communication of the result : Coordinators notifies the application with the result of the agreement D

Implementation (1) ● A prototype implementation for a minimal set of functionalities: ●Users exchange textual messages. ●Users can decide either to commit or to abort. ●Users see the outcome decision. ● Parties have been developed in: ●Jocaml + Perl running on Linux. ●Polyphonic C# (or Comega) running on.Net. ●They can interact, i.e., participate in a negotiation.

Implementation (2) ● Any party is identified with a unique ID (provided when the application is launched). ● A configuration file associates IDs to IP addresses. ● The ports in which parties communicate depend exclusively on the ID.

Implementation (3) ● Parties communicate through TCP sockets

Implementation (3) ApplicationCoordinatorApplicationCoordinator [free text] from User ● Parties communicate through TCP sockets

Implementation (3) ApplicationCoordinatorApplicationCoordinator LOCK-L1;…;Ln-L1-a1- ABORT- ● Parties communicate through TCP sockets

Perl+Jocaml Components GUICoordinatorD2PC Perl Jocaml ● Three-Layer Architecture

Perl+Jocaml Components GUICoordinatorD2PC PUT-L1;…;Ln-L1-a1- ABORT- ● Three-Layer Architecture

Perl+Jocaml Components GUICoordinatorD2PC PUT-L1;…;Ln- ABORT- LOCK-L1;…;Ln-L1-a1- ● Three-Layer Architecture

Perl+Jocaml Components GUICoordinatorD2PC FWLOCK-Li-L1;…;Ln- FWCOMMIT-COMMIT- FWABT-ABORT- FWABT-a1 ● Three-Layer Architecture

Perl+Jocaml Components GUICoordinatorD2PC COMMIT- ABORT- ● Three-Layer Architecture

Jocaml Coordinators ● Jocaml is an extension of Ocaml with: ●Processes: Expressions + Async Messages. ●Channels, i.e., join ports ●Join patterns let def a! h | b! () = if h < 5 then c() else d();;

Jocaml Coordinators let def d2pc () = let def state! h | abt! () = failed() | fwdabt [h] or failed!() | abt! () = failed () or failed!() | lock! (ll,l,a) = failed () | fwdabt [a] or failed!() | put!(l,a,c) = failed () | fwdabt a or commit ! (l,l1,l2,c,a) | abt!() = failed() | fwdabt a or commit0!(l,l1,l2,c,a) = match l with [] -> if (equiv l1 l2) then fwdcmt [c] else commit(l,l1,l2,c,a) t::ts -> fwdlock(t,l1) | commit0(ts,l1,l2,c,a) or commit!(l,l1,l2,c,a) | lock!(l3,ll,f) = commit0 (difference l3 l1, union l1 l3, union l2 [ll],c,union a [f]) or state! h | put! (l,a,c) = commit0 (del lock l, l, [lock], c,union a h) in reply lock,put,commit,state;;

Polyphonic C# Components ● Polyphonic C# extends C# with: ●Asynchronous methods: any call is guaranteed to complete almost immediately. ●Chords defined by: ● A header: a set of method declarations separated by &. ● A body, which is executed only once all the methods in the header have been called.

Polyphonic C# Components (2) ● Polyphonic C# class for the D2PC public class D2PC{ public async put (listhost l, port a, port c); public async abt(); public async mlock(listhost ll, port l, port a); private async state(port h); private async failed();.... when state(port h) & abt(){failed ();...} when failed() & abt(){failed();} when failed() & mlock(listhost ll, port a, portl){ failed();}... }

Polyphonic C# Components (3) ● Class Diagram (partial view). Participant GUI Receiver static async listen(…) Sender static async sendMsg(…) D2PC async put(…) async abt(…) async mlock( …)

Demo …

Future work ● Extending the D2PC for handling failures. ● Combining the D2PC with the standard 2PC protocol. ● Adding a mechanism for the dynamic discovery of participants (instead of using a configuration file). ● Implementing all the functionalities of the rescue team scenario.