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

Similar documents
Structured communication (Remote invocation)

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

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

DISTRIBUTED OBJECTS AND REMOTE INVOCATION

Slides for Chapter 5: Remote Invocation

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

Distributed Information Processing

Distributed Objects and Remote Invocation. Programming Models for Distributed Applications

Interprocess Communication

Chapter 5: Distributed objects and remote invocation

Lecture 5: Object Interaction: RMI and RPC

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

RMI: Design & Implementation

Lecture 06: Distributed Object

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

Remote Invocation. 1. Introduction 2. Remote Method Invocation (RMI) 3. RMI Invocation Semantics

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

Communication Paradigms

Middleware and Interprocess Communication

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

COMMUNICATION IN DISTRIBUTED SYSTEMS

Distributed object component middleware I - Java RMI

Distributed object component middleware I - Java RMI

Last Class: RPCs. Today:

Unit 7: RPC and Indirect Communication

CHAPTER - 4 REMOTE COMMUNICATION

SAI/ST course Distributed Systems

Chapter 5 Distributed Objects and Remote Invocation

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

CSci Introduction to Distributed Systems. Communication: RPC

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

MODELS OF DISTRIBUTED SYSTEMS

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

Lecture 5: RMI etc. Servant. Java Remote Method Invocation Invocation Semantics Distributed Events CDK: Chapter 5 TVS: Section 8.3

COMMUNICATION PROTOCOLS: REMOTE PROCEDURE CALL (RPC)

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

Operating System Support

Introduction to Distributed Systems. Fabienne Boyer, LIG,

Remote Procedure Calls CS 707

MODELS OF DISTRIBUTED SYSTEMS

Indirect Communication

02 - Distributed Systems

02 - Distributed Systems

Object-Oriented Distributed Technology

A Report on RMI and RPC Submitted by Sudharshan Reddy B

Distributed Systems. Definitions. Why Build Distributed Systems? Operating Systems - Overview. Operating Systems - Overview

Architecture of Software Intensive Systems

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

Chapter 4 Communication

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

Communication. Distributed Systems Santa Clara University 2016

NFS Design Goals. Network File System - NFS

Distributed Systems. 5. Remote Method Invocation

Distributed Systems. Client-Server Communication: Exercises

Java RMI Middleware Project

DISTRIBUTED COMPUTER SYSTEMS

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

Communication. Overview

Remote Invocation Vladimir Vlassov and Johan Montelius

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

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

Distributed File Systems. CS432: Distributed Systems Spring 2017

MTAT Enterprise System Integration. Lecture 2: Middleware & Web Services

Message Passing vs. Distributed Objects. 5/15/2009 Distributed Computing, M. L. Liu 1

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

Indirect Communication

Distributed Systems (5DV020) Group communication. Fall Group communication. Fall Indirect communication

Q.1. (a) [4 marks] List and briefly explain four reasons why resource sharing is beneficial.

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

Distributed Systems Question Bank UNIT 1 Chapter 1 1. Define distributed systems. What are the significant issues of the distributed systems?

Interprocess Communication

Module 3 - Distributed Objects & Remote Invocation

05 Indirect Communication

Distributed Information Systems

RPC flow. 4.3 Remote procedure calls IDL. RPC components. Procedure. Program. sum (j,k) int j,k; {return j+k;} i = sum (3,7); Local procedure call

Announcements. me your survey: See the Announcements page. Today. Reading. Take a break around 10:15am. Ack: Some figures are from Coulouris

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

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

Architecture of Distributed Systems

Transport Layer. Chapter 3: Transport Layer

ANSAwise - Remote Procedure Call in Distributed Systems

RPC and RMI. 2501ICT Nathan

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

The UNIVERSITY of EDINBURGH. SCHOOL of INFORMATICS. CS4/MSc. Distributed Systems. Björn Franke. Room 2414

Applications. RMI, RPC and events. Request reply protocol External data representation. Operating System

Introduction and Overview Socket Programming Lower-level stuff Higher-level interfaces Security. Network Programming. Samuli Sorvakko/Nixu Oy

Transport Protocols. CSCI 363 Computer Networks Department of Computer Science

Communication. Communication. Distributed Systems. Networks and protocols Sockets Remote Invocation Messages Streams. Fall /10/2001 DoCS

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

Lecture 8: February 17

Communication. Outline

RPC Paradigm. Lenuta Alboaie Andrei Panu

KTH ROYAL INSTITUTE OF TECHNOLOGY. Remote Invocation. Vladimir Vlassov and Johan Montelius

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

Process. Program Vs. process. During execution, the process may be in one of the following states

COMPUTER NETWORKS CS CS 55201

COMPUTER NETWORKS CS CS 55201

Chapter 09 Network Protocols

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

Last Class: RPCs and RMI. Today: Communication Issues

Transcription:

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

Outline Today Chapter 5 Remote Invocation. Chapter 6 Indirect Communication. Request-Reply Protocols RPC Remote Method Invocation Group Communication Shared Memory Approach

Introduction

1. Request-Reply Protocols Request-Reply Communication is synchronous because the client process blocks until the reply arrives from the server. It can also be Reliable because the reply from the server is effectively an acknowledgement to the client. The client-server exchanges are described in the following paragraphs in terms of the send and receive operations in the Java API for UDP datagrams, although many current implementations use TCP streams.

Request-Reply Communication

1. Request-Reply Protocols (con t) a) The Request-Reply Protocol : dooperation, getrequest and sendreply b) Message identifiers : requestid and identifier c) Failure model : omission failures d) Timeouts : return immediately e) Discarding duplicate request messages : receive it more than once f) Lost reply messages : has already sent g) History : contains a record h) Styles of exchange protocols : R-RR-RRA i) Use of TCP streams to implement the request-reply protocol : reliably j) HTTP : An example of a request-reply protocol k) Message contents : message body

2. RPC The concept of a Remote Procedure Call (RPC) represents a major intellectual breakthrough in distributed computing, with the goal of making the programming of distributed systems look similar, if not identical, to conventional programming. That is, achieving a high level of distribution transparency. in RPC, procedures on remote machines can be called as if they are procedures in the local address space.

A client and server through two asynchronous RPCs

a. Design issues for RPC Three issues that are important in understanding this concept: 1. Programming with interfaces : a) Interfaces in distributed systems : modular programming, Extrapolating to distributed systems, software evolution b) Interface definition languages: allow procedures implemented in different languages to invoke one another 2. RPC call semantics (Retry request message, Duplicate filtering, and Retransmission of results) a) Maybe semantics b) At-least-once semantics c) At-most-once semantics 3. Transparency

Call Semantics

b. Implementation of RPC We focus on RPC Protocol (stack) [PET 12] fragments and reassembles large messages (by BLAST) synchronizes request and reply messages (by CHAN) dispatches request to the correct process/procedure (by SELECT)

Role of Client and Server stub Procedures in RPC

c. Case study: Sun RPC RFC 1831 [Srinivasan 1995a] describes Sun RPC, which was designed for client-server communication in the Sun Network File System (NFS). Sun RPC is sometimes called ONC (Open Network Computing) RPC. The Sun RPC system provides an interface language called XDR and an interface compiler called rpcgen, which is intended for use with the C programming language.

c. Case study: Sun RPC Sun RPC details : Interface definition language : The Sun XDR language Binding : a local binding service called the port mapper (wellknown) Authentication : request and reply messages Client and server programs : www.cdk5.net/rmi

3. Remote Method Invocation RMI vs RPC Commonalities support programming with interfaces constructed on top of request-reply protocols and can offer a range of call semantics similar level of transparency Differences full expressive power of object-oriented programming in the development of distributed systems software all objects in an RMI-based system have unique object references

a. Design issues for RMI The key added design issue relates to the object model and, in particular, achieving the transition from objects to distributed objects. 1) The object model : Object references, Interfaces, Actions, Exceptions, and Garbage collection 2) Distributed objects : The state of an object consists of the values of its instance variables 3) The distributed object model : extensions to the object model to make it applicable to distributed objects 4) Actions in a distributed object system : is initiated by a method invocation, which may result in further invocations on methods in other objects.

objects are accessed Remote and local method invocations A remote object and its remote interface Instantiation of remote objects

b. Implementation of RMI Communication module : the message type, its requestid and the remote reference of the object to be invoked. Remote reference module : responsible for translating between local and remote object references and for creating remote object references. Servants : is an instance of a class that provides the body of a remote object The RMI software : Proxy, Dispatcher, and Skeleton. Dynamic invocation : An alternative to proxies Server and client programs : java.sun.com

c. Distributed Garbage Collection Distributed Garbage Collector is to ensure that if a local or remote reference to an object is still held anywhere in a set of distributed objects, the object itself will continue to exist The distributed garbage collector works in cooperation with the local garbage collectors : a) Each server process maintains a set of the names of the processes b) When a client C first receives a remote reference to a particular remote object, B, it makes an addref(b) invocation to the server c) When a client C s garbage collector notices that a proxy for remote object B is no longer reachable, it makes a removeref(b) invocation to the corresponding server d) When B.holders is empty, the server s local garbage collector will reclaim the space occupied by B

d. Case study: Java RMI

Outline Today Chapter 5 Remote Invocation. Chapter 6 Indirect Communication. Request-Reply Protocols RPC Remote Method Invocation Group Communication Shared Memory Approach

Indirect Communication Indirect communication is defined as communication between entities in a distributed system through an intermediary with no direct coupling between the sender and the receiver(s).

4. Group Communication Group communication provides our first example of an indirect communication paradigm. Group communication offers a service whereby a message is sent to a group and then this message is delivered to all members of the group. In this action, the sender is not aware of the identities of the receivers. Group communication represents an abstraction over multicast communication and may be implemented over IP multicast or an equivalent overlay network, adding significant extra value in terms of managing group membership, detecting failures and providing reliability and ordering guarantees.

a. The programming model In group communication, the central concept is that of a group with associated group membership, whereby processes may join or leave the group. Process groups and object groups : groups where the communicating entities are processes Other key distinctions :Closed and open groups

b. Implementation Issues The properties of the underlying multicast service in terms of reliability and ordering and also the key role of group membership management in dynamic environments, where processes can join and leave or fail at any time. Reliability and ordering in multicast : delivery guarantees and scheduling Group membership management : Providing an interface for group membership changes, Failure detection, Notifying members of group membership changes, and Performing group address expansion

The role of group membership management

5. Shared Memory Approaches Distributed shared memory techniques that were developed principally for parallel computing before moving on to tuple space communication, an approach that allows programmers to read and write tuples from a shared tuple space. Whereas distributed shared memory operates at the level of reading and writing bytes, tuple spaces offer a higher-level perspective in the form of semi-structured data.

a. Distributed Shared Memory Distributed shared memory (DSM) is an abstraction used for sharing data between computers that do not share physical memory. Processes access DSM by reads and updates to what appears to be ordinary memory within their address space.

b. Tuple Space Communication In this approach, processes communicate indirectly by placing tuples in a tuple space, from which other processes can read or remove them. Tuples do not have an address but are accessed by pattern matching on content

Partitioning in the York Linda Kernel

References [COU 12] [TAN 07] [PET 12] Coulouris, G. Dollimore, J., Kindberg, T., Blair, G., DISTRIBUTED SYSTEMS :Concepts and Design Fifth Edition, Pearson Education, Inc., United States of America, 2012. Tanenbaum, A.S., Steen, M.V., DISTRIBUTED SYSTEMS : Principles and Paradigms Second Edition, Pearson Education, Inc., United States of America, 2007. Peterson, L.L., and Davie, B.S., Computer Networks: A Systems Approach Fifth Edition, Morgan Kaufmann, Burlington USA, 2012.

Thank You Gandeva Bayu Satrya, ST., MT. Telematics Labz. Informatics Department Telkom University @2014