Today CSCI Communication. Communication in Distributed Systems. Communication in Distributed Systems. Remote Procedure Calls (RPC)

Similar documents
CHAPTER - 4 REMOTE COMMUNICATION

Remote Invocation. Today. Next time. l Overlay networks and P2P. l Request-reply, RPC, RMI

Networked Systems and Services, Fall 2018 Chapter 4. Jussi Kangasharju Markku Kojo Lea Kutvonen

Today CSCI Remote Method Invocation (RMI) Distributed Objects

Overview. Communication types and role of Middleware Remote Procedure Call (RPC) Message Oriented Communication Multicasting 2/36

Last Class: RPCs. Today:

Remote Procedure Calls CS 707

DISTRIBUTED COMPUTER SYSTEMS

CSci Introduction to Distributed Systems. Communication: RPC

Communication. Distributed Systems IT332

C 1. Recap: Finger Table. CSE 486/586 Distributed Systems Remote Procedure Call. Chord: Node Joins and Leaves. Recall? Socket API

Distributed Systems. How do regular procedure calls work in programming languages? Problems with sockets RPC. Regular procedure calls

Distributed Systems Lecture 2 1. External Data Representation and Marshalling (Sec. 4.3) Request reply protocol (failure modes) (Sec. 4.

RMI: Design & Implementation

Distributed Systems 8. Remote Procedure Calls

Module 3 - Distributed Objects & Remote Invocation

Advanced Topics in Distributed Systems. Dr. Ayman A. Abdel-Hamid. Computer Science Department Virginia Tech

Outline. EEC-681/781 Distributed Computing Systems. The OSI Network Architecture. Inter-Process Communications (IPC) Lecture 4

Chapter 4 Communication

May Gerd Liefländer System Architecture Group Universität Karlsruhe (TH), Systemarchitektur

Communication. Distributed Systems Santa Clara University 2016

Lecture 8: February 17

SAI/ST course Distributed Systems

416 Distributed Systems. RPC Day 2 Jan 11, 2017

Lecture 5: Object Interaction: RMI and RPC

Remote Procedure Calls

Communication. Outline

REMOTE PROCEDURE CALLS EE324

Operating Systems. 18. Remote Procedure Calls. Paul Krzyzanowski. Rutgers University. Spring /20/ Paul Krzyzanowski

Distributed Objects and Remote Invocation. Programming Models for Distributed Applications

416 Distributed Systems. RPC Day 2 Jan 12, 2018

Distributed Systems Theory 4. Remote Procedure Call. October 17, 2008

Distributed Information Processing

Lecture 06: Distributed Object

Remote Invocation. Today. Next time. l Indirect communication. l Request-reply, RPC, RMI

Chapter 8 Fault Tolerance

IPC. Communication. Layered Protocols. Layered Protocols (1) Data Link Layer. Layered Protocols (2)

COMMUNICATION IN DISTRIBUTED SYSTEMS

Interprocess Communication Tanenbaum, van Steen: Ch2 (Ch3) CoDoKi: Ch2, Ch3, Ch5

03 Remote invoaction. Request-reply RPC. Coulouris 5 Birrel_Nelson_84.pdf RMI

CS454/654 Midterm Exam Fall 2004

Communication. Overview

Architecture of Software Intensive Systems

Two Phase Commit Protocol. Distributed Systems. Remote Procedure Calls (RPC) Network & Distributed Operating Systems. Network OS.

Remote Procedure Calls (RPC)

MODELS OF DISTRIBUTED SYSTEMS

Middleware. Adapted from Alonso, Casati, Kuno, Machiraju Web Services Springer 2004

Communication. Layered Protocols. Topics to be covered. Layered Protocols. Introduction

Distributed Systems. Lecture 06 Remote Procedure Calls Thursday, September 13 th, 2018

a. Under overload, whole network collapsed iii. How do you make an efficient high-level communication mechanism? 1. Similar to using compiler instead

Distributed Systems COMP 212. Lecture 15 Othon Michail

CprE Fault Tolerance. Dr. Yong Guan. Department of Electrical and Computer Engineering & Information Assurance Center Iowa State University

Verteilte Systeme (Distributed Systems)

Last Class: RPCs. Today:

Remote Procedure Call (RPC) and Transparency

Chapter 3: Client-Server Paradigm and Middleware

struct foomsg { u_int32_t len; }

Structured communication (Remote invocation)

MODELS OF DISTRIBUTED SYSTEMS

Today: Distributed Objects. Distributed Objects

Distributed Systems. Chapter 02

Interprocess Communication

Architecture of Distributed Systems

Chapter 5 Remote Invocation. Gandeva Bayu Satrya, ST., MT. Telematics Labz. Informatics Department Telkom

Module 3 Accessing Remote Resources CS655! 3-1!

Distributed Systems are Everywhere!" CS162 Operating Systems and Systems Programming Lecture 22 Client-Server" Client-Server" Message Passing"

Networks and Operating Systems Chapter 3: Remote Procedure Call (RPC)

Remote Procedure Call

Remote Invocation. To do. Request-reply, RPC, RMI. q Today q. q Next time: Indirect communication

Desarrollo de Aplicaciones en Red. El modelo de comunicación. General concepts. Models of communication. Message Passing

Last Class: RPCs and RMI. Today: Communication Issues

CSE 358 Spring 2006 Selected Notes Set 8


Chapter 5: Remote Invocation. Copyright 2015 Prof. Amr El-Kadi

xkcd.com End To End Protocols End to End Protocols This section is about Process to Process communications.

CS 417 9/18/17. Paul Krzyzanowski 1. Socket-based communication. Distributed Systems 03. Remote Procedure Calls. Sample SMTP Interaction

Distributed Systems. 03. Remote Procedure Calls. Paul Krzyzanowski. Rutgers University. Fall 2017

Network Protocols. Sarah Diesburg Operating Systems CS 3430

CS555: Distributed Systems [Fall 2017] Dept. Of Computer Science, Colorado State University

Administrivia. Remote Procedure Calls. Reminder about last time. Building up to today

CSCI-1680 RPC and Data Representation. Rodrigo Fonseca

Lecture 8: February 19

Transport Protocols. CSCI 363 Computer Networks Department of Computer Science

Chapter 4 Communication

Building up to today. Remote Procedure Calls. Reminder about last time. Threads - impl

Fault Tolerance Part I. CS403/534 Distributed Systems Erkay Savas Sabanci University

Distributed Systems. The main method of distributed object communication is with remote method invocation

COMMUNICATION PROTOCOLS: REMOTE PROCEDURE CALL (RPC)

Chapter 5: Distributed objects and remote invocation

Outline. Interprocess Communication. Interprocess Communication. Communication Models: Message Passing and shared Memory.

CS603: Distributed Systems

Distributed Systems. Remote Procedure Calls

CHAPTER 4: INTERPROCESS COMMUNICATION AND COORDINATION

Communication in Distributed Systems

Chapter 4 Communication

Distributed Systems Fault Tolerance

System Models and Communication


Chapter 5 Distributed Objects and Remote Invocation

Distributed Systems Inter-Process Communication (IPC) in distributed systems

Transcription:

Today CSCI 5105 Communication in Distributed Systems Overview Types Remote Procedure Calls (RPC) Instructor: Abhishek Chandra 2 Communication How do program modules/processes communicate on a single machine? Communication in Distributed Systems Distributed processes Located on different machines Need communication mechanisms Goal: Hide distributed nature as far as possible 3 4 1

Communication in Distributed Systems Networking primitives and protocols (e.g.: TCP/IP) Advanced communication models: Built on networking primitives Remote Procedure Calls (RPC) Remote Method Invocation (RMI) Messages Streams Types of Communication Defined by two main properties: Persistence Synchronization 5 6 Persistence Persistent communication Messages are stored until receiver is ready Sender/receiver don t have to be up at the same time Transient communication Message is stored only so long as both sending/receiving applications are executing Discard message if it can t be delivered to receiver Synchronization Synchronous communication Sender blocks until message is delivered to receiver Variant: block until receiver processes the message Asynchronous communication Sender continues immediately after it has submitted the message Several combinations of persistence and synchronization 7 8 2

Persistence-Synchronization Combinations Persistence-Synchronization Combinations Persistent Asynchronous communication Persistent Synchronous communication Transient Asynchronous communication Receipt-based Transient Synchronous Communication Example: Email Example: Message Queuing Example: UDP, One-way RPC Example: Message-passing 9 10 Persistence-Synchronization Combinations Remote Procedure Calls (RPC) Delivery-based Transient Synchronous Communication Response-based Transient Synchronous Communication Goal: Make distributed computation look like centralized computation Idea: Allow processes to call procedures on other machines Make it appear like normal procedure calls Example: Asynchronous RPC Example: RPC, RMI 11 12 3

Local Procedure Calls RPC Operation foo(i, buf) buf i Return address, Local vars Stack Pointer Stack Pointer Challenges: Hide details of communication Pass parameters transparently Stubs Hide communication details Client and server stubs Marshalling Flattening and parameter passing 13 14 Stubs Code that communicates with the remote side Client stub: Converts function call to remote communication Passes parameters to server machine Receives results Server stub: Receives parameters and request from client Calls the desired server function Returns results to client Basic RPC Operation RPC Client Client Code Client Stub RPC Server Server Code Server Stub 15 16 4

Parameter Passing: Local Procedures Pass-by-value Original variable is not modified E.g.: integers, chars Pass-by-reference Passing a pointer Value may be changed E.g.: Arrays Pass-by-copy/restore Copy is modified and overwritten to the original E.g.: in-out parameters in Ada Marshalling Converting parameters into a byte stream Problems: Heterogeneous data formats: Big-endian vs. little-endian Type of parameter passing: by-value vs. byreference 17 18 Heterogeneous Data Formats Use a standard data format Examples: Network byte order, XDR (Extended Data Representation) Decide on a protocol for parameter ordering Parameter Passing: RPC Pass-by-value Send the value in standard format Pass-by-reference Can we pass pointers? What about complex data structures (linked lists, trees, graphs)? 19 20 5

Stub Generation Most stubs are similar in functionality Handle communication and marshalling Differences are in the main server-client code Application needs to know only stub interface Interface Definition Language (IDL) Allows interface specification IDL compiler generates the stubs automatically Binding How does the client stub find the server stub? Needs to know remote IP address/port no. Port mapper Daemon on server machine maintaining server bindings Listens on a well-known port Server stub registers its port no. and service name with portmapper Client gets this binding by querying portmapper 21 22 RPC Issues RPC Performed in a synchronous manner What if client wants to do something else? What if things fail? Asynchronous RPC RPC: Client blocks until results come back Asynchronous RPC Server sends ACK as soon as request is received Executes procedure later Deferred synchronous RPC Use two asynchronous RPCs Server sends reply via second asynchronous RPC One-way RPC Client does not even wait for an ACK from the server 23 24 6

RPC Failure Semantics: Network failures Client unable to locate server: Return error or raise exception Lost requests/replies: Timeout mechanisms Make operation idempotent Use sequence numbers, mark retransmissions RPC Failure Semantics: Server failure Server may crash during RPC Did failure occur before or after operation? Operation semantics Exactly once: desirable but impossible to achieve At least once At most once No guarantee 25 26 RPC Failure Semantics: Client Failure Client crashes while server is computing Server computation becomes orphan Possible actions Extermination: log at client stub and explicitly kill orphans Reincarnation: Divide time into epochs between failures and delete computations from old epochs Expiration: give each RPC a fixed quantum T; explicitly request extensions 27 7