Indirect Communication Paradigms (or Messaging Methods)

Slides:



Advertisements
Similar presentations
DISTRIBUTED COMPUTING PARADIGMS
Advertisements

From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Slides for Chapter 6: Indirect.
Lab 2 Group Communication Andreas Larsson
Distributed Systems Fall 2010 Replication Fall 20105DV0203 Outline Group communication Fault-tolerant services –Passive and active replication Highly.
© nCode 2000 Title of Presentation goes here - go to Master Slide to edit - Slide 1 Reliable Communication for Highly Mobile Agents ECE 7995: Term Paper.
Group Communication Phuong Hoai Ha & Yi Zhang Introduction to Lab. assignments March 24 th, 2004.
Distributed Systems Fall 2009 Replication Fall 20095DV0203 Outline Group communication Fault-tolerant services –Passive and active replication Highly.
Hermes: A Distributed Event- Based Middleware Architecture Peter Pietzuch and Jean Bacon 1st DEBS Workshop, Vienna,
Distributed Publish/Subscribe Network Presented by: Yu-Ling Chang.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
1 Computer Communication & Networks Lecture 22 Network Layer: Delivery, Forwarding, Routing (contd.)
CH2 System models.
Exercises for Chapter 2: System models
Content-Based Routing in Mobile Ad Hoc Networks Milenko Petrovic, Vinod Muthusamy, Hans-Arno Jacobsen University of Toronto July 18, 2005 MobiQuitous 2005.
DISTRIBUTED COMPUTING PARADIGMS. Paradigm? A MODEL 2for notes
Lab 2 Group Communication Farnaz Moradi Based on slides by Andreas Larsson 2012.
Advanced Computer Networks Topic 2: Characterization of Distributed Systems.
Message Oriented Communication Prepared by Himaja Achutha Instructor: Dr. Yanqing Zhang Georgia State University.
Farnaz Moradi Based on slides by Andreas Larsson 2013.
Distributed Systems Principles and Paradigms Chapter 12 Distributed Coordination-Based Systems 01 Introduction 02 Communication 03 Processes 04 Naming.
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg This material is made available for private study and for direct.
Fault Tolerant Services
Information-Centric Networks10b-1 Week 10 / Paper 2 Hermes: a distributed event-based middleware architecture –P.R. Pietzuch, J.M. Bacon –ICDCS 2002 Workshops.
AMQP, Message Broker Babu Ram Dawadi. overview Why MOM architecture? Messaging broker like RabbitMQ in brief RabbitMQ AMQP – What is it ?
Information-Centric Networks Section # 10.2: Publish/Subscribe Instructor: George Xylomenos Department: Informatics.
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.
Peter R Pietzuch and Jean Bacon Peer-to-Peer Overlay Networks in an Event-Based Middleware DEBS’03, San Diego, CA, USA,
From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Indirect Communication.
Indirect Communication Indirect Communication is defined as communication between entities in DS through intermediary with no direct coupling b/w sender.
September 28, 2010COMS W41561 COMS W4156: Advanced Software Engineering Prof. Gail Kaiser
Group Communication A group is a collection of users sharing some common interest.Group-based activities are steadily increasing. There are many types.
Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Chapter 1 Characterization of Distributed Systems.
1 CMPT 471 Networking II Multicasting © Janice Regan,
rain technology (redundant array of independent nodes)
Exercises for Chapter 14: Replication
Exercises for Chapter 11: COORDINATION AND AGREEMENT
Last Class: Introduction
WEB SERVICES From Chapter 19 of Distributed Systems Concepts and Design,4th Edition, By G. Coulouris, J. Dollimore and T. Kindberg Published by Addison.
Peer-to-Peer Data Management
A Framework for Object-Based Event Composition in Distributed Systems
CHAPTER 3 Architectures for Distributed Systems
Internet Networking recitation #12
Exploring Azure Event Grid
Plethora: Infrastructure and System Design
Slides for Chapter 2: Architectural Models
Replication Middleware for Cloud Based Storage Service
Programming Models for Distributed Application
Azure Event Grid with Custom Events
Introduction to locality sensitive approach to distributed systems
Slides for Chapter 2: Architectural Models
PRESENTATION COMPUTER NETWORKS
Distributed Publish/Subscribe Network
Distributed Systems through Web Services
Exercises for Chapter 16: Distributed Shared Memory
Distributed File Systems
Indirect Communication
Message Queuing.
Indirect Communication Paradigms (or Messaging Methods)
Slides for Chapter 15: Replication
B. Ramamurthy Based on Paper by Werner Vogels and Chris Re
Enterprise Integration
Indirect Communication Paradigms (or Messaging Methods)
WEB SERVICES From Chapter 19, Distributed Systems
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Combinatorial Optimization of Multicast Key Management
Ch 17 - Binding Protocol Addresses
Slides for Chapter 18: Replication
Network management system
Presentation transcript:

Indirect Communication Paradigms (or Messaging Methods) Ch. 6 and extra notes B.Ramamurthy 2/17/2019 B.Ramamurthy

Introduction How important is this topic? Messaging? Essence of indirect communication is to communicate through an intermediary and hence have no direct coupling between the sender and one or more receivers. 2/17/2019 B.Ramamurthy

Different types Group communication: communication via a group, sender is unaware of the identity of the recipient. Example: tweet Publish-subscribe: Disseminating events to multiple recipients through an intermediary; Events+ listeners; Example: stock price limit notification (buy/sell) Message queue: messages are sent to a queue, receivers extract it from the queue; Example: task schedulers Shared-memory: an abstraction of global shared memory; example: Google (whiteboard) docs 2/17/2019 B.Ramamurthy

Space and Time Coupling Time Coupled Time uncoupled Space coupled Communicate directly towards a given receiver(s) that must exist at that time. Ex: RPC/RMI Communication directed toward a receiver(s) that can have independent lifetime Eg. Email Space uncoupled Sender need not know the identity of the receiver(s); receivers must exist Ex: IP Multicast; audio, video streaming Sender need not know identity of receiver(s); receivers can have independent lifetime Ex: pub/sub? Ch.6 2/17/2019 B.Ramamurthy

Topics for discussion Group Communication Publish – Subscribe systems Message queues Shared Memory approaches 2/17/2019 B.Ramamurthy

I. Group Communication Group communication is an important building block for distributed systems: Key areas of application include: Reliable dissemination of information to a number of clients Support for collaborative applications Support for a range of fault-tolerant strategies, including consistent update of replicated data Load balancing strategies 2/17/2019 B.Ramamurthy

Programming model: key concepts Group and group membership Processes to join and leave group Process to send a message to subset (multicast) and all (broadcast) Closed and open groups: people outside can send if it is open Overlapping and non-overlapping Synchronous and asynchronous Reliability and ordering of messages: FIFO, Causal,Total 2/17/2019 B.Ramamurthy

Open and closed groups Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005

The role of group membership management Join Group address expansion Multicast communication send Fail Group membership management Leave Process group Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5 © Pearson Education 2012

Group Membership Management Provide interface for group membership changes Failure detection (unreachable etc.) Notifying members about changes Performing group address expansion Example application of group communication: Whatsapp (read about its history for inspiration) 2/17/2019 B.Ramamurthy

II. Publish Subscribe Model Distributed event based system Most widely used indirect communication system (?) A publish-subscribe system is a system where publishers publish structured events to an event service and subscribers express interest by subscriptions. The task of the pub/sub system is to match the published events and ensure correct delivery of event notifications. Fundamentally one-to-many communication paradigm. Heterogeneity of components Asynchronicity in operation Delivery guarantees (3 secs realtime delivery assurance by Bloomberg!) Do you see the difference between group comm and oub/sub? 2/17/2019 B.Ramamurthy

Applications of Pub/Sub Financial information systems Cooperative working Ubiquitous computing Monitoring applications 2/17/2019 B.Ramamurthy

Stock Dealing Room (Ex: Bloomberg, FactSet) Dealer’s computer Information provider Dealer External source Notification 2/17/2019 B.Ramamurthy

The Programming Model Small set of operations: publish(e), subscribe(f) where f is the filter or pattern of possible events, unsubscribe(f); Filter model: Channel based, topic based, content-based, type-based. 2/17/2019 B.Ramamurthy

Figure 6.8 The publish-subscribe paradigm Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005

Implementation Issues Main task: ensure that events are delivered efficiently to all subscribers that have filters defined that match the event. Additional requirements: security, scalability, failure handling, concurrency, and QoS 2/17/2019 B.Ramamurthy

Centralized vs. Distributed Implementations Simplest architecture is to centralize the implementation in a single node with a server on that node acting as a event broker. Publishers publish events to this broker, and subscribers send subscriptions to the broker and receive notifications in return. Communication is point to point messages. In a distributed implementation single broker is replaced by a network of brokers. Consider a fully P2P system! 2/17/2019 B.Ramamurthy

A network of brokers 2/17/2019 B.Ramamurthy

Overall System architecture 2/17/2019 B.Ramamurthy

Content-based Event Routing Flooding: Simply send an event notification to all publisher nodes in the network. Matching carried out at the end (at the publisher node closest to the subscriber). Alternatively the brokers can be arranged in a acyclic graph each forwarding incoming notifications to all its neighbors. 2/17/2019 B.Ramamurthy

Content-based Event Routing (contd.) Filtering: Apply filtering in the network of brokers: filtering-based routing. Propagating subscription information through the network towards potential publishers. Each broker maintains a table of its neighbors, list of all directly connected subscribers and a routing table with subscriptions. 2/17/2019 B.Ramamurthy

Filtering-based routing upon receive publish(event e) from node x 1 matchlist := match(e, subscriptions) 2 send notify(e) to matchlist; 3 fwdlist := match(e, routing); 4 send publish(e) to fwdlist - x; 5 upon receive subscribe(subscription s) from node x 6 if x is client then 7 add x to subscriptions; 8 else add(x, s) to routing; 9 send subscribe(s) to neighbours - x; 10 Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005

Issues with Filerting-based Routing Pure filtering based approach generates a lot of messages. Two solutions: advertisements() based approach Rendezvous based approach 2/17/2019 B.Ramamurthy

Rendezvous based routing (RBR) Certain authoritative brokers are defined that act like the “routers” in a regular network. To achieve RBR, we define functions SN(s) that given a subscription returns a set of “rendezvous” nodes that are responsible for the subscription. Maintains a list and forwards a matching event to subscribers. EN(e) that when an event e is published, EN(e) returns a set of nodes that are responsible for matching e against subscriptions in the system. If reliability is an issue, we can have EN(e) and SN(s) return more than one node. 2/17/2019 B.Ramamurthy

Rendezvous-based routing upon receive publish(event e) from node x at node i rvlist := EN(e); if i in rvlist then begin matchlist :=match(e, subscriptions); send notify(e) to matchlist; end send publish(e) to rvlist - i; upon receive subscribe(subscription s) from node x at node i rvlist := SN(s); if i in rvlist then add s to subscriptions; else send subscribe(s) to rvlist - i; Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005

DHT Approach An interesting implementation of rendezvous routing is to map the event space on to a distributed hash table (DHT). The key idea here is that hash functions can be used to map (i) subscriptions (ii) events onto the corresponding rendezvous node for the management of such subscriptions. 2/17/2019 B.Ramamurthy

Examples? Kafka of Linkedin fame, now a open source project at Apache Reading: Apache Kafka: https://kafka.apache.org/ 2/17/2019 B.Ramamurthy

Gossip and Informed Gossip One way of achieving scale is by using gossip. Gossip is a means by which nodes in a network periodically and probabilistically exchange events with neighboring nodes. In an informed gossip, you can content to the gossip, and this is especially suitable for highly dynamic environment. We WILL discuss these in the context of blockchain and hashgraph later in the semester. 2/17/2019 B.Ramamurthy

Message Queue Groups and pub/sub: style of communication is one to many model How about point-to-point? Message queues provide point-to-point service using the concept of message queue as an indirection, thus achieving space and time decoupling. RabbitMQ, Microsoft MSMQ, Oracle’s AQ 2/17/2019 B.Ramamurthy

Programming Model Very simple: It offers an approach to communication is distributed systems through queues. A producer process send messages to the queue and a consumer process can receive messages from the queue. Three styles of receive: A blocking receive, which will block until a message is available A non-blocking receive (a polling operation) which will check the status of the queue and return a message if available or not A notify operation which will issue a notification when a message is available in the associated queue. 2/17/2019 B.Ramamurthy

The message queue paradigm Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005

Queuing Policy FIFO Consumers can select based on properties A message consists of destination and meta data about the message Oracle AQ has a interesting structure: the messages are stored in a relational table rows, so consumers can query the “MQ” to find their message! 2/17/2019 B.Ramamurthy

Persistence Property One crucial property of a message queue is that messages are persistent. Messages will held indefinitely until consumed. Also for reliability sake a they are also committed to data store. 2/17/2019 B.Ramamurthy

Additional Functionality Messages can be contained within a transaction. All or nothing delivery. All the requirements of Tx is applied Message transformation can be supported: arbitrary transformation can be performed on an arriving message: say, to address data format, internationalization, heterogeneity etc. Improved security: Confidential transmission through end-to-end encryption. 2/17/2019 B.Ramamurthy

Implementation Issues Key implementation issue for message queue is the choice between centralized and distributed implementation. This is the case for many of your systems. IBM introduced a very important concept of message channels Customized topologies using agents and channels: trees, meshes, bus-based, hub-and-spoke Nice reading: https://www.incognito.com/tutorials/understanding-messaging-part-one-the-basics-2/ 2/17/2019 B.Ramamurthy

Shared Memory Approaches Shared memory techniques were developed for parallel computing (Message Passing Interface: MPI) Distributed Shared Memory (DSM) is an abstraction for sharing data between computers that do not share physical memory Based on simple “read” and “write” of data or messages with specific addresses Reading: https://computing.llnl.gov/tutorials/mpi/ 2/17/2019 B.Ramamurthy

The distributed shared memory abstraction Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 © Addison-Wesley Publishers 2000

Tuple Space Abstraction of Message Passing An alternative approach to shared memory is tuple space: that is associative memory with capability of content addressability A consolidated memory is visible to the computing processing They access them by the content: write operation will insert, take operation will match, read operation will fetch the data needed for computation. Check this UK geography tuple space: 2/17/2019 B.Ramamurthy

The tuple space abstraction Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005

Summary We studied “indirect communication” It is a big deal in the current context. We covered: Group communications Pub/sub systems Message queues Distributed shared memory Tuple space 2/17/2019 B.Ramamurthy

Summary of indirect communication styles Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005