Distributed Systems [INT1405] Remote Procedure Calls

Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

Remote Procedure Calls Today: Remote Procedure Call • Goal: Make distributed computing look like centralized computing • Allow remote services to be called as procedures • Issues – How to pass parameters – Binding – Semantics in face of errors

Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

Remote Procedure Calls Parameter Passing • Local procedure parameter passing – Call‐by‐value: integers, floats, chars – Call‐by‐reference: arrays, complex data structures • Make a remote procedure call look like a local one through: – Stubs – Marshalling

Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

Types of Communication

Figure 4-4. Viewing middleware as an intermediate (distributed) service in application-level communication. Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

Conventional Procedure Call

Figure 4-5. (a) Parameter passing in a local procedure call: the stack before the call to read. (b) The stack while the called procedure is active. Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

Client and Server Stubs

Figure 4-6. Principle of RPC between a client and server program. Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

Remote Procedure Calls Stubs • Client makes local call to the client stub • Sever stub calls the procedure • Stubs take care of packaging parameters/results and sending messages – Packaging parameters is called marshalling • Stub compiler generates client and server stubs automatically from specs in an Interface Definition Language (IDL) – Simplifies programmer’s task Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

Remote Procedure Calls (1) A remote procedure call occurs in the following steps: 1. 2. 3. 4. 5.

The client procedure calls the client stub in the normal way. The client stub builds a message and calls the local operating system. The client’s OS sends the message to the remote OS. The remote OS gives the message to the server stub. The server stub unpacks the parameters and calls the server. Continued …

Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

Remote Procedure Calls (2) A remote procedure call occurs in the following steps (continued): 6.

The server does the work and returns the result to the stub. 7. The server stub packs it in a message and calls its local OS. 8. The server’s OS sends the message to the client’s OS. 9. The client’s OS gives the message to the client stub. 10. The stub unpacks the result and returns to the client.

Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

Passing Value Parameters (1)

Figure 4-7. The steps involved in a doing a remote computation through RPC. Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

Passing Value Parameters (2)

Figure 4-8. (a) The original message on the Pentium. Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

Passing Value Parameters (3)

Figure 4-8. (b) The message after receipt on the SPARC Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

Passing Value Parameters (4)

Figure 4-8. (c) The message after being inverted. The little numbers in boxes indicate the address of each byte. Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

Parameter Specification and Stub Generation

Figure 4-9. (a) A procedure. (b) The corresponding message. Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

Asynchronous RPC (1)

Figure 4-10. (a) The interaction between client and server in a traditional RPC. Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

Asynchronous RPC (2)

Figure 4-10. (b) The interaction using asynchronous RPC. Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

Asynchronous RPC (3)

Figure 4-11. A client and server interacting through two asynchronous RPCs. Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

Writing a Client and a Server (1)

Figure 4-12. The steps in writing a client and a server in DCE RPC. Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

Writing a Client and a Server (2) Three files output by the IDL compiler: • • •

A header file (e.g., interface.h, in C terms). The client stub. The server stub.

Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

Binding a Client to a Server (1) •

Registration of a server makes it possible for a client to locate the server and bind to it.



Server location is done in two steps: 1. Locate the server’s machine. 2. Locate the server on that machine.

Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

Binding a Client to a Server (2)

/local/multimedia/video/movies

Figure 4-13. Client-to-server binding in DCE. Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

Berkeley Sockets

Figure 4-14. The socket primitives for TCP/IP. Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

The Message-Passing Interface (1)

Figure 4-15. Connection-oriented communication pattern using sockets. Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

The Message-Passing Interface (2)

Figure 4-16. Some of the most intuitive message-passing primitives of MPI. Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

Message-Queuing Model (1)

Figure 4-17. Four combinations for loosely-coupled communications using queues. Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

Message-Queuing Model (2)

Figure 4-18. Basic interface to a queue in a message-queuing system. Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

General Architecture of a MessageQueuing System (1)

Figure 4-19. The relationship between queue-level addressing and network-level addressing. Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

General Architecture of a MessageQueuing System (2)

Figure 4-20. The general organization of a message-queuing system with routers.

Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

Message Brokers

Figure 4-21. The general organization of a message broker in a message-queuing system. Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

IBM’s WebSphere Message-Queuing System

Figure 4-22. General organization of IBM’s message-queuing system. Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

Channels

Figure 4-23. Some attributes associated with message channel agents. Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

Message Transfer (1)

Figure 4-24. The general organization of an MQ queuing network using routing tables and aliases. Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

Message Transfer (2)

Figure 4-25. Primitives available in the message-queuing interface. Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

Data Stream

Figure 4-26. A general architecture for streaming stored multimedia data over a network. Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

Streams and Quality of Service Properties for Quality of Service: • The required bit rate at which data should be transported. • The maximum delay until a session has been set up • The maximum end-to-end delay . • The maximum delay variance, or jitter. • The maximum round-trip delay.

Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

Enforcing QoS (1)

Figure 4-27. Using a buffer to reduce jitter. Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

Enforcing QoS (2)

Figure 4-28. The effect of packet loss in (a) non interleaved transmission and (b) interleaved transmission. Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5

Remote Procedure Calls.pdf

Sign in. Loading… Whoops! There was a problem loading more pages. Retrying... Whoops! There was a problem previewing this document. Retrying.

2MB Sizes 1 Downloads 154 Views

Recommend Documents

REMOTE PROCEDURE CALL.pdf
Sign in. Loading… Whoops! There was a problem loading more pages. Retrying... Whoops! There was a problem previewing this document. Retrying.

REMOTE PROCEDURE CALL.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Main menu.

Disciplinary Procedure
informally, as such something similar to the Corporate Responsibility & Member Action Pyramid in the drugs & alcohol policy may be used if appropriate.

Cheap Wireless Bluetooth Remote Control Multimedia Remote ...
Cheap Wireless Bluetooth Remote Control Multimedia Remote Music Control Camera Shutter for Smartphone.pdf. Cheap Wireless Bluetooth Remote Control ...

Standard operating procedure for evaluation procedure for CVMP ...
Standard operating procedure – PUBLIC. SOP/V/4112 15-DEC-20. Page 6/10. 5.0. Final SA. 5.1. Adoption of scientific advice. 5.2. Send to applicant. No. 5.5. Clarification? 2.0. Yes. Yes. 5.3. Archive and update tracking. 5.4. Include in post- meetin

APNA DHAN PROCEDURE
In C: Drive. (i). For 64 bit system. (a) Go to C:/Program Files/CSC Morpho/Morpho Fingerprint Scanner and copy java.policy and policy-replace-batch-morpho.bat files. (b) Then go to C:/Program Files(x86)/Java/jre1.8.0_45/lib/security and replace and p

apna dhan procedure - Panchayat
Page 39 of 48. 55. After Completing the registration process, again login in to APNA DHAN Service. 56. After login into APNA DHAN Service, VLE finger scan page is open and security warning pop up comes. To remove this Pop Up click on checkbox as show

Procedure Manual.pdf
Academic Affairs, to provide data-driven answers and information in a timely ... to help you as you make decisions regarding college planning, programming,.

Tharpanam procedure. - DoCuRi
Madhu nakthamuthoshasi madu math parthivagam raja madhu dhourasthu na pitha ... Madhumanno vanaspathir madhu magma asthu soorya,. Maadweer gavo ...

Parliamentary Procedure Table
Majority. Affirmative vote only. To call for division. No. No. No. Call for division by one (1) person forces re-vote. No. To appeal a decision of the chairperson. Yes.

Computer programmable remote control
Apr 3, 2001 - 180 (preferably a hard disk) as knoWn in the art. The general ..... commands against those of the screen objects in the data base. If a match is ...

Remote controls.pdf
Live view reduces camera shake from mirror. movement. • Before buying a Remote - make sure the Remote will work with and. connect to your camera - Costs around $50 for most Remotes. • Helps if camera has a bulb or unlimited shutter speed feature.

Remote reservoir resistivity mapping
Mar 11, 2004 - do not exceed 0.1 degree and the total amplitude variations of the source currents .... described in M. Zhdanov and G. Keller, (1994, op. cit.) or.

remote..pdf
interactive symbol, at the same time another among us said that it is pop up notification symbol, and. like this the discussion was going on but till the last that was not proved what does that button. symbol and the verbal communication Active means

Computer programmable remote control
Apr 3, 2001 - development software and used to prepare a screen object corresponding to the programmed remote control unit 200A of the multimedia ...

remote-sensing.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. remote-sensing.

Remote reservoir resistivity mapping
Mar 11, 2004 - tion increases as a fractional poWer of source strength,. betWeen MN5 .... In an alternative embodiment, the inverted resistivity depth images ...

procedure filing complaints.pdf
Office of the Ombudsman. Ombudsman Building, Agham Road,. North Triangle, Diliman, Quezon City. Telephone Nos. (+632) 927-4102; 927-2404;. 0926-699- ...

Incomplete Grade Procedure -
timeline for removal of the “IC” grade. This agreement ... The exact timeline is at the instructor's discretion however the ... Student's Name: (Last). (First). GSC ID:.