180 likes | 190 Views
Distributed Systems – Remote Procedure Calls. Prof. Leonardo Mostarda University of Camerino. Last lecture. OSI model Middleware definition Types of Communication Remote Procedure Calls. Outline. Berkeley Sockets Message-Passing Interface Message-queuing systems Message brokers
E N D
Distributed Systems – Remote Procedure Calls Prof. Leonardo Mostarda University of Camerino Prof. Leonardo Mostarda-- Camerino,
Last lecture OSI model Middleware definition Types of Communication Remote Procedure Calls
Outline Berkeley Sockets Message-Passing Interface Message-queuing systems Message brokers IBM’s WebSphere Message-Queuing System
Learning outcomes Understand Berkeley Sockets Understand Message-Passing Interface Understand Message-queuing systems Understand the use of brokers
Message oriented comm • RPC and RMI provide communication transparency but sever and client need to run at the same time • RPC blocks until the request is performed which may be not adequate • Alternative communication services are needed • We study message oriented systems • Socket • Message-queuing systems Prof. Leonardo Mostarda-- Camerino,
message-oriented model • Many distributed systems and applications are built directly on top of the simple message-oriented model offered by the transport layer. • transport-level sockets. • Interfaces at the transport layer need to be standardised • Standard interfaces make it easier to port an application to a different machine • Berkeley UNIX sockets • XTI interface
Berkeley Sockets • a socket is a communication end point where an application can send/receive data • A socket abstracts the actual communication end point that is used by the local OS for a specific transport protocol. • The table below describes the TCP/IP socket first 4 primitevs executed by the server client
The Message-Passing Interface (1) • Connection-oriented communication pattern using sockets.
The Message-Passing Interface (2) Sockets are not suitable the high-speed interconnection networks used in server clusters MPI is designed for parallel applications and as such is tailored to transient communication. A (group/D, process/D) pair uniquely identifies the source or destination of a message
Message-Oriented Persistent Communication Message-queuing systems provide extensive support for persistent asynchronous communication The middleware provides storage capacity for messages, without requiring sender/receiver to be active during message transmission. An important difference with Berkeley sockets and MPI is that message-queuing systems are typically targeted to support message transfers that are allowed to take minutes instead of seconds or milliseconds.
Message-Queuing Model (1) • Four combinations for loosely-coupled communications (in time) using queues.
Message-Queuing Model (2) • Basic primitives
General Architecture of a Message-Queuing System (1) • It is important to realise that the collection of queues is distributed across multiple machines. • The queuing system provides a mapping of queues to network locations. (email example) • Figure below shows the relationship between queue-level addressing and network-level addressing.
General Architecture of a Message-Queuing System (2) • The general organization of a message-queuing system with routers. • There is no general naming service available • When A sends a msg to B the msg is sent to the first router R1. • In this way, only the routers need to be updated when queues are added or removed.
Message Brokers An important application area of message-queuing systems is integrating existing and new applications; There is the problem of different format of data; Special nodes, known as message brokers handle the conversion; A message broker converts incoming messages so that they can be understood by the destination application; A message broker is not considered to be an integral part of the queuing system (It is just an application); For instance a broker can handle the conversion between two different database applications In publish/subscribe systems brokers deliver messages to subscribers.
Message Brokers • The general organization of a message broker in a message-queuing system.
IBM’s WebSphere Message-Queuing System • General organization of IBM’s message-queuing system.
Summary Berkeley Sockets Message-Passing Interface Message-queuing systems Message brokers IBM’s WebSphere Message-Queuing System