remote procedure call practical issues l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Remote Procedure Call Practical Issues PowerPoint Presentation
Download Presentation
Remote Procedure Call Practical Issues

Loading in 2 Seconds...

play fullscreen
1 / 25

Remote Procedure Call Practical Issues - PowerPoint PPT Presentation


  • 284 Views
  • Uploaded on

Remote Procedure Call Practical Issues. CS-4513 Distributed Computing Systems

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Remote Procedure Call Practical Issues' - emily


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
remote procedure call practical issues

Remote Procedure CallPractical Issues

CS-4513Distributed Computing Systems

(Slides include materials from Operating System Concepts, 7th ed., by Silbershatz, Galvin, & Gagne, Modern Operating Systems, 2nd ed., by Tanenbaum, and Distributed Systems: Principles & Paradigms, 2nd ed. By Tanenbaum and Van Steen)

Practical Issues of RPC

review
Review
  • Message-oriented communication
      • Connections
      • Establishing a connection with a service
      • Reliable communication via TCP
      • Connection-less communication via UDP
  • Remote Procedure Call
      • Procedural interface between client and service
      • IDL & stub compiler (hides communication details)
      • Hiding data representation differences
      • Restrictions on passing objects by reference

Practical Issues of RPC

practical rpc systems
Practical RPC Systems
  • DCE (Distributed Computing Environment)
      • Open Software Foundation
      • Basis for Microsoft DCOM
      • Tanenbaum & Van Steen, §4.2.4
  • Sun’s ONC (Open Network Computing)
      • Very similar to DCE
      • Widely used
      • rpcgen
      • http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-Q0R5B-TET1_html/TITLE.html

Practical Issues of RPC

practical rpc systems continued
Practical RPC Systems (continued)
  • Java RMI (Remote Method Invocation)
      • java.rmi standard package
      • Java-oriented approach — objects and methods
  • CORBA (Common Object Request Broker Architecture)
      • Standard, multi-language, multi-platform middleware
      • Object-oriented
      • Heavyweight

Practical Issues of RPC

implementation model for dce
Implementation Model for DCE

Practical Issues of RPC

differences for onc
Differences for ONC

program & version #

program & version #

rpcgen

Practical Issues of RPC

validating a remote service
Validating a Remote Service
  • Purpose
      • Avoid binding to wrong service or wrong version
  • DCE
      • Globally unique ID
        • Generated in template of IDL file
  • Sun ONC
      • Program numbers registered with Sun
      • Version # and procedure # administered locally

Practical Issues of RPC

rpc binding sun onc
RPC Binding — Sun ONC
  • Service registers with portmapper on server OS
      • Program # and version #
      • Optional static port #
  • Client
      • Must know host name or IP address
      • clnt_create(host, prog, vers, proto)
        • I.e., RPC to portmapper of host requesting to bind to prog, vers using protocol proto (tcporudp)
      • (Additional functions for authentication, etc.)
      • Invokes remote functions by name

Practical Issues of RPC

sun onc continued
Sun ONC (continued)
  • #include <rpc/rpc.h>
      • Header file for client and server
  • rpcgen
      • The stub compiler
        • Compiles interface.x
        • Produces .h files for client and service; also stubs
  • See also
      • rpcinfo
      • RPC Programming Guide

Practical Issues of RPC

note on xdr the interface definition language for onc
Note on XDR(the interface definition language for ONC)
  • Much like C
  • Exceptions
    • string type – maps to char *
    • bool type – maps to bool_t

Practical Issues of RPC

sun onc
Sun ONC
  • Online tutorial
      • http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-Q0R5B-TET1_html/TITLE.html
  • CS-4513 code samples
      • http://web.cs.wpi.edu/~rek/DCS/D04/SunRPC.html
      • http://web.cs.wpi.edu/~goos/Teach/cs4513-d05/
      • http://web.cs.wpi.edu/~cs4513/b05/week4-sunrpc.pdf
  • Any other resources you can find

Practical Issues of RPC

java rmi
Java RMI
  • Based on objects & methods
    • I.e., an object may be located remotely
    • Accessed via methods
    • RMI causes methods to be invoked by RPC
  • Stubs may be local or remote
    • Subject to security policy

Practical Issues of RPC

java rmi binding
Java RMI Binding
  • Remote objects must be registered with RMI registry
    • May specify a port
    • Security policy compiled with object
  • Client looks up object via Naming method
    • Specifies host (& port, if needed)
    • Remote stubs delivered with lookup, subject to security policy

Practical Issues of RPC

java remote object details
Java Remote Object details
  • Interface must extend java.RMI.Remote
      • Must be public
      • No new methods introduced by java.RMI.Remote
  • Should also extend
      • java.rmi.server.UnicastRemoteObject
      • Replaces some Object class methods for proper operation in distributed environment
  • Must throw java.rmi.RemoteException
      • May impact definition of existing interfaces

Practical Issues of RPC

java remote object details continued
Java Remote Object details (continued)
  • Compiling object and stubs
      • Object compiled to bytecodes with javac
      • Stubs compiled with rmic
  • RMI registry must be running before remote object can be launched
      • rmiregistry command (part of JDK distribution)
      • Multiple registries possible on different ports
  • Remote object registers itself
      • java.rmi.Naming interface

Practical Issues of RPC

java client details
Java Client details
  • Initialize RMI security manager
      • System.setSecurityManager(…)
      • If no security manager, only local stubs may be loaded
  • Client must find and bind to remote object
      • lookup() method in java.RMI.Naming
      • Location of remote object specified in URL style
        • E.g., “rmi://garden.wpi.edu:1099/ObjectName”
      • Remote stubs loaded by lookup
        • Per security policy

Practical Issues of RPC

java rmi17
Java RMI
  • CS-4513 examples
    • http://web.cs.wpi.edu/~cs4513/b05/week4-javarmi.pdf
    • http://web.cs.wpi.edu/~goos/Teach/cs4513-d05/
    • http://web.cs.wpi.edu/~rek/DCS/D04/Comm_Part2.pdf
      • Uses terms “proxy” and “skeleton” for “client-side stub” and “service-side stub” respectively
      • Identifies issues with SYNCHRONIZED remote objects
  • Tanenbaum & Van Steen
      • §10.3, esp. §10.3.4
  • Any other resources you can find

Practical Issues of RPC

questions

Questions?

Practical Issues of RPC

fundamental issue
Fundamental Issue
  • With Sun ONC and Java RMI, client must know name or address of server machine in order to bind to remote service
      • IP address or remote name
      • (Sometimes) port number
  • I.e., services are bound to server machines

Practical Issues of RPC

problems
Problems
  • Location of remote objects not always known
  • Location of remote objects not always constant
  • Pointers/References to remote services are only useful to fixed servers
  • Distributed & replicated services are difficult, at best
  • Location independence is impossible

Practical Issues of RPC

needed
Needed
  • Location-independent object registry
      • Any object can register itself
  • Location-independent object naming
      • Name of object does not imply location
  • Distributed, replicated registry
      • If any instance goes down, others can serve
  • Distributed, replicated remote objects
      • Any instance may serve in many cases

Practical Issues of RPC

solutions
Solutions
  • Some or all of these things are typically provided in the major distributed object standards
      • DCOM, CORBA, etc.
  • “Global” registry is central component

Practical Issues of RPC

slide23
But …
  • None really get it right for broad spectrum of distributed systems & applications
  • E.g., CORBA
      • Very heavyweight (too cumbersome)
      • Object can live in only one location
        • Inefficient for very commonly accessed objects
        • Distributed, replicated object difficult to support

Practical Issues of RPC

reading assignment
Reading Assignment
  • “Grapevine: An Exercise in Distributed Computing,” Communications of the ACM, April 1982
      • PDF link

Practical Issues of RPC

break

Break

Practical Issues of RPC