Manish Kumar,MSRITSoftware Architecture1 Remote procedure call Client/server architecture.

Slides:



Advertisements
Similar presentations
RPC Robert Grimm New York University Remote Procedure Calls.
Advertisements

Remote Procedure Call (RPC)
Remote Procedure Call Design issues Implementation RPC programming
Tam Vu Remote Procedure Call CISC 879 – Spring 03 Tam Vu March 06, 03.
Distributed systems Programming with threads. Reviews on OS concepts Each process occupies a single address space.
Distributed Object & Remote Invocation Vidya Satyanarayanan.
Remote Procedure CallCS-4513, D-Term Remote Procedure Call CS-4513 Distributed Computing Systems (Slides include materials from Operating System.
Multiple Processor Systems
Implementing Remote Procedure Calls Andrew Birrell and Bruce Nelson Presented by Kai Cong.
CS-550: Distributed File Systems [SiS]1 Resource Management in Distributed Systems: Distributed File Systems.
L-7 RPC 1. Last Lecture Important Lessons - Naming Naming is a powerful tool in system design  A layer of indirection can solve many problems Name+context.
Distributed systems Programming with threads. Reviews on OS concepts Each process occupies a single address space.
Distributed Systems Lecture #3: Remote Communication.
CS533 - Concepts of Operating Systems 1 Remote Procedure Calls - Alan West.
Lecture 4 Remote Procedure Calls (cont). EECE 411: Design of Distributed Software Applications [Last time] Building Distributed Applications: Two Paradigms.
Outcomes What is RPC? The difference between conventional procedure call and RPC? Understand the function of client and server stubs How many steps could.
16: Distributed Systems1 DISTRIBUTED SYSTEM STRUCTURES NETWORK OPERATING SYSTEMS The users are aware of the physical structure of the network. Each site.
NFS. The Sun Network File System (NFS) An implementation and a specification of a software system for accessing remote files across LANs. The implementation.
.NET Mobile Application Development Remote Procedure Call.
1 DNS,NFS & RPC Rizwan Rehman, CCS, DU. Netprog: DNS and name lookups 2 Hostnames IP Addresses are great for computers –IP address includes information.
Distributed File Systems Concepts & Overview. Goals and Criteria Goal: present to a user a coherent, efficient, and manageable system for long-term data.
Networked File System CS Introduction to Operating Systems.
Distributed Systems. Interprocess Communication (IPC) Processes are either independent or cooperating – Threads provide a gray area – Cooperating processes.
REMOTE PROCEDURE CALLS EE324. Administrivia  Course feedback  Midterm plan  Reading material/textbook/slides are updated.  Computer Systems: A Programmer's.
Distributed File Systems
Remote Procedure Call (RPC) and Transparency Brad Karp UCL Computer Science CS Z03 / th October, 2006.
What is a Distributed File System?? Allows transparent access to remote files over a network. Examples: Network File System (NFS) by Sun Microsystems.
 Remote Procedure Call (RPC) is a high-level model for client-sever communication.  It provides the programmers with a familiar mechanism for building.
NFS : Network File System SMU CSE8343 Prof. Khalil September 27, 2003 Group 1 Group members: Payal Patel, Malka Samata, Wael Faheem, Hazem Morsy, Poramate.
CSE 451: Operating Systems Winter 2015 Module 22 Remote Procedure Call (RPC) Mark Zbikowski Allen Center 476 © 2013 Gribble, Lazowska,
Page 1 Remote Procedure Calls Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
Shuman Guo CSc 8320 Advanced Operating Systems
Chapter 5: Distributed objects and remote invocation Introduction Remote procedure call Events and notifications.
Remote Procedure Call (RPC) and Transparency Brad Karp UCL Computer Science CS GZ03 / nd October, 2007.
Distributed Objects & Remote Invocation
The Client-Server Model And the Socket API. Client-Server (1) The datagram service does not require cooperation between the peer applications but such.
GLOBAL EDGE SOFTWERE LTD1 R EMOTE F ILE S HARING - Ardhanareesh Aradhyamath.
Remote Procedure Call RPC
- Manvitha Potluri. Client-Server Communication It can be performed in two ways 1. Client-server communication using TCP 2. Client-server communication.
Distributed File Systems 11.2Process SaiRaj Bharath Yalamanchili.
Remote Procedure Call and Serialization BY: AARON MCKAY.
Computer Science Lecture 3, page 1 CS677: Distributed OS Last Class: Communication in Distributed Systems Structured or unstructured? Addressing? Blocking/non-blocking?
Implementing Remote Procedure Call Landon Cox February 12, 2016.
Chapter Five Distributed file systems. 2 Contents Distributed file system design Distributed file system implementation Trends in distributed file systems.
© Oxford University Press 2011 DISTRIBUTED COMPUTING Sunita Mahajan Sunita Mahajan, Principal, Institute of Computer Science, MET League of Colleges, Mumbai.
Distributed Computing & Embedded Systems Chapter 4: Remote Method Invocation Dr. Umair Ali Khan.
DISTRIBUTED FILE SYSTEM- ENHANCEMENT AND FURTHER DEVELOPMENT BY:- PALLAWI(10BIT0033)
Topic 4: Distributed Objects Dr. Ayman Srour Faculty of Applied Engineering and Urban Planning University of Palestine.
Object Interaction: RMI and RPC 1. Overview 2 Distributed applications programming - distributed objects model - RMI, invocation semantics - RPC Products.
03 – Remote invoaction Request-reply RPC RMI Coulouris 5
Prof. Leonardo Mostarda University of Camerino
#01 Client/Server Computing
CSE 451: Operating Systems Winter 2006 Module 20 Remote Procedure Call (RPC) Ed Lazowska Allen Center
DISTRIBUTED COMPUTING
CSE 451: Operating Systems Autumn 2003 Lecture 16 RPC
CSE 451: Operating Systems Winter 2007 Module 20 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Distributed File Systems
Distributed File Systems
CSE 451: Operating Systems Winter 2004 Module 19 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Distributed File Systems
CSE 451: Operating Systems Spring 2012 Module 22 Remote Procedure Call (RPC) Ed Lazowska Allen Center
CSE 451: Operating Systems Autumn 2009 Module 21 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Distributed File Systems
CSE 451: Operating Systems Autumn 2010 Module 21 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Lecture 7: RPC (exercises/questions)
CSE 451: Operating Systems Winter 2003 Lecture 16 RPC
Distributed File Systems
Last Class: Communication in Distributed Systems
CSE 451: Operating Systems Messaging and Remote Procedure Call (RPC)
#01 Client/Server Computing
Presentation transcript:

Manish Kumar,MSRITSoftware Architecture1 Remote procedure call Client/server architecture

Manish Kumar,MSRIT Software Architecture 2 Client-server architecture Client sends a request, server replies w. a response  Interaction fits many applications  Naturally extends to distributed computing Why do people like client/server architecture?  Provides fault isolation between modules  Scalable performance (multiple servers)  Central server: Easy to manage Easy to program

Manish Kumar,MSRIT Software Architecture 3 Remote procedure call A remote procedure call makes a call to a remote service look like a local call  RPC makes transparent whether server is local or remote  RPC allows applications to become distributed transparently  RPC makes architecture of remote machine transparent

Manish Kumar,MSRIT Software Architecture 4 Developing with RPC 1. Define APIs between modules Split application based on function, ease of development, and ease of maintenance Don’t worry whether modules run locally or remotely 2. Decide what runs locally and remotely Decision may even be at run-time 3. Make APIs bullet proof Deal with partial failures

Manish Kumar,MSRIT Software Architecture 5 Stubs: obtaining transparency Compiler generates from API stubs for a procedure on the client and server Client stub  Marshals arguments into machine-independent format  Sends request to server  Waits for response  Unmarshals result and returns to caller Server stub  Unmarshals arguments and builds stack frame  Calls procedure  Server stub marshalls results and sends reply

Manish Kumar,MSRIT Software Architecture 6 RPC vs. LPC 4 properties of distributed computing that make achieving transparency difficult:  Partial failures  Concurrency  Latency  Memory access

Manish Kumar,MSRIT Software Architecture 7 Partial failures In local computing:  if machine fails, application fails In distributed computing:  if a machine fails, part of application fails  one cannot tell the difference between a machine failure and network failure How to make partial failures transparent to client?

Manish Kumar,MSRIT Software Architecture 8 Strawman solution Make remote behavior identical to local behavior:  Every partial failure results in complete failure You abort and reboot the whole system  You wait patiently until system is repaired Problems with this solution:  Many catastrophic failures  Clients block for long periods System might not be able to recover

Manish Kumar,MSRIT Software Architecture 9 Real solution: break transparency Possible semantics for RPC:  Exactly-once Impossible in practice  More than once: Only for idempotent operations  At most once Zero, don’t know, or once  Zero or once Transactional semantics At-most-once most practical  But different from LPC

Manish Kumar,MSRIT Software Architecture 10 Where RPC transparency breaks True concurrency  Clients run truely concurrently client() { if (exists(file)) if (!remove(file)) abort(“remove failed??”); } RPC latency is high  Orders of magnitude larger than LPC’s Memory access  Pointers are local to an address space

Manish Kumar,MSRIT Software Architecture 11 Summary: expose remoteness to client Expose RPC properties to client, since you cannot hide them  Consider: E-commerce application Application writers have to decide how to deal with partial failures

Manish Kumar,MSRIT Software Architecture 12 RPC implementation Stub compiler  Generates stubs for client and server  Language dependent  Compile into machine-independent format E.g., XDR  Format describes types and values RPC protocol RPC transport

Manish Kumar,MSRIT Software Architecture 13 RPC protocol Guarantee at-most-once semantics by tagging requests and response with a nonce RPC request header:  Request nonce  Service Identifier  Call identifier Protocol:  Client resends after time out  Server maintains table of nonces and replies

Manish Kumar,MSRIT Software Architecture 14 RPC transport Use reliable transport layer  Flow control  Congestion control  Reliable message transfer Combine RPC and transport protocol  Reduce number of messages RPC response can also function as acknowledgement for message transport protocol

Manish Kumar,MSRIT Software Architecture 15 Example: NFSv2 Old file system API used in distributed computing  No current directory  No file descriptors  No streams (unnamed pipes)  No close Inodes are named by file handles:  Opaque to client  Servers stores inode and device number Open() RPC translates names to file handles

Manish Kumar,MSRIT Software Architecture 16 NFS implementation Uses RPC  Marshals data structures in XDR format Pointers for directories  Generates stubs at client and server State-less protocol  Client maintains no state (No close() RPC!)  Server has no crucial runtime state File handles contain info to recover from server reboots NFS semantics:  Soft mounting: zero or more  Hard mounting: one or more

Manish Kumar,MSRIT Software Architecture 17 Implementation of write Semantics of writes:  Write-through (no close() RPC) What are possible outcomes after server failure:  Failed (stale file handle, I/O error)  Succeeded (NFS OK)  Don’t know (Client cannot tell!) Rename() example  Might happen multiple times

Manish Kumar,MSRIT Software Architecture 18 NFS RPC summary Remote service is not transparent  API is different  Failure semantics are different Not specified File systems semantics are unspecified!  Concurrency semantics awkard

Manish Kumar,MSRIT Software Architecture 19 Any Question ???

Manish Kumar,MSRIT Software Architecture 20 Thank you !!!