Remote Procedure Call Intro

download Remote Procedure Call Intro

of 4

Transcript of Remote Procedure Call Intro

  • 7/31/2019 Remote Procedure Call Intro

    1/4

    Remote procedure call 1

    Remote procedure callIn computer science, a remote procedure call (RPC ) is an inter-process communication that allows a computer

    program to cause a subroutine or procedure to execute in another address space (commonly on another computer on

    a shared network) without the programmer explicitly coding the details for this remote interaction. That is, the

    programmer writes essentially the same code whether the subroutine is local to the executing program, or remote.When the software in question uses object-oriented principles, RPC is called remote invocation or remote method

    invocation .

    Many different (often incompatible) technologies can be used to implement the concept.

    History and originsThe idea of treating computer network operations as remote procedure calls goes back at least to the 1970s in early

    ARPANET documents. [1] Bruce Jay Nelson is generally credited with coining the term. [2][3][4] One of the first

    business uses of RPC was by Xerox under the name "Courier" in 1981. The first popular implementation of RPC on

    Unix was Sun's RPC (now called ONC RPC), used as the basis for Network File System.

    Message passingAn RPC is initiated by the client , which sends a request message to a known remote server to execute a specified

    procedure with supplied parameters. The remote server sends a response to the client, and the application continues

    its process. There are many variations and subtleties in various implementations, resulting in a variety of different

    (incompatible) RPC protocols. While the server is processing the call, the client is blocked (it waits until the server

    has finished processing before resuming execution), unless the client sends an asynchronous request to the server,

    such as an XHTTP call.

    An important difference between remote procedure calls and local calls is that remote calls can fail because of unpredictable network problems. Also, callers generally must deal with such failures without knowing whether the

    remote procedure was actually invoked. Idempotent procedures (those that have no additional effects if called more

    than once) are easily handled, but enough difficulties remain that code to call remote procedures is often confined to

    carefully written low-level subsystems.

    Sequence of events during a RPC

    1. The client calls the client stub. The call is a local procedure call, with parameters pushed on to the stack in the

    normal way.

    2. The client stub packs the parameters into a message and makes a system call to send the message. Packing the

    parameters is called marshalling.3.3. The kernel sends the message from the client machine to the server machine.

    4. The kernel on the server machine passes the incoming packets to the server stub.

    5.5. Finally, the server stub calls the server procedure. The reply traces the same steps in the reverse direction.

    http://en.wikipedia.org/w/index.php?title=Class_skeletonhttp://en.wikipedia.org/w/index.php?title=Marshalling_%28computer_science%29http://en.wikipedia.org/w/index.php?title=Class_stubhttp://en.wikipedia.org/w/index.php?title=Stub_%28distributed_computing%29http://en.wikipedia.org/w/index.php?title=Idempotenthttp://en.wikipedia.org/w/index.php?title=Network_File_System_%28protocol%29http://en.wikipedia.org/w/index.php?title=ONC_RPChttp://en.wikipedia.org/w/index.php?title=Unixhttp://en.wikipedia.org/w/index.php?title=Xeroxhttp://en.wikipedia.org/w/index.php?title=Bruce_Jay_Nelsonhttp://en.wikipedia.org/w/index.php?title=ARPANEThttp://en.wikipedia.org/w/index.php?title=Object-orientedhttp://en.wikipedia.org/w/index.php?title=Address_spacehttp://en.wikipedia.org/w/index.php?title=Subroutinehttp://en.wikipedia.org/w/index.php?title=Computer_programhttp://en.wikipedia.org/w/index.php?title=Computer_programhttp://en.wikipedia.org/w/index.php?title=Inter-process_communicationhttp://en.wikipedia.org/w/index.php?title=Computer_science
  • 7/31/2019 Remote Procedure Call Intro

    2/4

    Remote procedure call 2

    Standard contact mechanisms

    To let different clients access servers, a number of standardized RPC systems have been created. Most of these use

    an interface description language (IDL) to let various platforms call the RPC. The IDL files can then be used to

    generate code to interface between the client and server. The most common tool used for this is RPCGEN.

    Other RPC analoguesRPC analogues found elsewhere:

    Java's Java Remote Method Invocation (Java RMI) API provides similar functionality to standard Unix RPC

    methods.

    Modula-3's network objects, which were the basis for |Java's RMI [5]

    XML-RPC is an RPC protocol that uses XML to encode its calls and HTTP as a transport mechanism.

    JSON-RPC is an RPC protocol that uses JSON-encoded messages

    JSON-WSP is an RPC protocol that uses JSON-encoded messages

    SOAP is a successor of XML-RPC and also uses XML to encode its HTTP-based calls.

    Microsoft .NET Remoting offers RPC facilities for distributed systems implemented on the Windows platform. RPyC implements RPC mechanisms in Python, with support for asynchronous calls.

    Pyro object-oriented form of RPC for Python.

    ZeroC's Internet Communications Engine (Ice) distributed computing platform.

    Etch (protocol) framework for building network services.

    Facebook's Thrift protocol and framework.

    CORBA provides remote procedure invocation through an intermediate layer called the object request broker .

    Distributed Ruby (DRb) allows Ruby programs to communicate with each other on the same machine or over a

    network. DRb uses remote method invocation (RMI) to pass commands and data between processes.

    Action Message Format (AMF) allows Adobe Flex applications to communicate with back-ends or other

    applications that support AMF. Libevent provides a framework for creating RPC servers and clients. [6]

    Windows Communication Foundation is an application programming interface in the .NET framework for

    building connected, service-oriented applications.

    Google Protocol Buffers (protobufs) package includes an interface definition language used for its RPC

    protocols. [7]

    Google Web Toolkit uses an asynchronous RPC to communicate the server service. [8]

    WebFurther information: Web service#Styles of use

    ReferencesThis article was originally based on material from the Free On-line Dictionary of Computing, which is

    licensed under the GFDL.

    [1] James E. White (December 23, 1975). "A High-Level Framework for Network-Based Resource Sharing" (http:/ / tools. ietf. org/ html/

    rfc707). RFC 707 . Augmentation Research Center. . Retrieved July 11, 2011.

    [2] "1994 Andrew Birrell, Bruce Nelson: Remote Procedure Call" (http:/ / awards. acm. org/ citation. cfm?id=5125494& srt=all& aw=149&ao=SOFTWSYS& yr=1994). Software System Award citation . Association for Computing Machinery. . Retrieved July 11, 2011.

    [3] "SIGOPS Hall of Fame Award" (http:/ / www. sigops. org/ award-hof. html). Special Interest Group on Operating Systems . Association for

    Computing Machinery. . Retrieved July 11, 2011.

    [4] Bruce Jay Nelson (May 1981). Remote Procedure Call . Xerox Palo Alto Research Center. PhD thesis.[5] http:/ / www. computerworld. com. au/ index. php/ id;1422447371;pp;3;fp;4194304;fpid;1

    [6] http:/ / www. monkey. org/ ~provos/ libevent/ doxygen-1. 4. 10/

    http://www.monkey.org/~provos/libevent/doxygen-1.4.10/http://www.computerworld.com.au/index.php/id;1422447371;pp;3;fp;4194304;fpid;1http://en.wikipedia.org/w/index.php?title=Bruce_Jay_Nelsonhttp://en.wikipedia.org/w/index.php?title=Association_for_Computing_Machineryhttp://en.wikipedia.org/w/index.php?title=Association_for_Computing_Machineryhttp://www.sigops.org/award-hof.htmlhttp://en.wikipedia.org/w/index.php?title=Association_for_Computing_Machineryhttp://awards.acm.org/citation.cfm?id=5125494&srt=all&aw=149&ao=SOFTWSYS&yr=1994http://awards.acm.org/citation.cfm?id=5125494&srt=all&aw=149&ao=SOFTWSYS&yr=1994http://en.wikipedia.org/w/index.php?title=Augmentation_Research_Centerhttp://tools.ietf.org/html/rfc707http://tools.ietf.org/html/rfc707http://en.wikipedia.org/w/index.php?title=GNU_Free_Documentation_Licensehttp://en.wikipedia.org/w/index.php?title=Wikipedia:Foldoc_licensehttp://en.wikipedia.org/w/index.php?title=Free_On-line_Dictionary_of_Computinghttp://en.wikipedia.org/w/index.php?title=Web_service%23Styles_of_usehttp://en.wikipedia.org/w/index.php?title=Google_Web_Toolkithttp://en.wikipedia.org/w/index.php?title=Protocol_Buffershttp://en.wikipedia.org/w/index.php?title=Windows_Communication_Foundationhttp://en.wikipedia.org/w/index.php?title=Libeventhttp://en.wikipedia.org/w/index.php?title=Back-end%23Computer_sciencehttp://en.wikipedia.org/w/index.php?title=Adobe_Flexhttp://en.wikipedia.org/w/index.php?title=Action_Message_Formathttp://en.wikipedia.org/w/index.php?title=Distributed_Rubyhttp://en.wikipedia.org/w/index.php?title=CORBAhttp://en.wikipedia.org/w/index.php?title=Thrift_%28protocol%29http://en.wikipedia.org/w/index.php?title=Facebookhttp://en.wikipedia.org/w/index.php?title=Etch_%28protocol%29http://en.wikipedia.org/w/index.php?title=Internet_Communications_Enginehttp://en.wikipedia.org/w/index.php?title=ZeroChttp://en.wikipedia.org/w/index.php?title=PYthon_Remote_Objectshttp://en.wikipedia.org/w/index.php?title=RPyChttp://en.wikipedia.org/w/index.php?title=.NET_Remotinghttp://en.wikipedia.org/w/index.php?title=.NET_Frameworkhttp://en.wikipedia.org/w/index.php?title=SOAPhttp://en.wikipedia.org/w/index.php?title=JSONhttp://en.wikipedia.org/w/index.php?title=JSON-WSPhttp://en.wikipedia.org/w/index.php?title=JSONhttp://en.wikipedia.org/w/index.php?title=JSON-RPChttp://en.wikipedia.org/w/index.php?title=HTTPhttp://en.wikipedia.org/w/index.php?title=XMLhttp://en.wikipedia.org/w/index.php?title=XML-RPChttp://en.wikipedia.org/w/index.php?title=Modula-3http://en.wikipedia.org/w/index.php?title=Java_Remote_Method_Invocationhttp://en.wikipedia.org/w/index.php?title=Java_%28programming_language%29http://en.wikipedia.org/w/index.php?title=RPCGENhttp://en.wikipedia.org/w/index.php?title=Interface_description_language
  • 7/31/2019 Remote Procedure Call Intro

    3/4

    Remote procedure call 3

    [7] "Protocol Buffers - Google's data interchange format" (http:/ / code. google. com/ p/ protobuf/ ). Google project website . . Retrieved

    November 1, 2011.

    [8] "Google Web Toolkit" (http:/ / code. google. com/ webtoolkit/ ). Google project website . . Retrieved November 1, 2011.

    Further reading Birrell, A. D.; Nelson, B. J. (1984). "Implementing remote procedure calls". ACM Transactions on Computer

    Systems 2: 39. doi:10.1145/2080.357392.

    External links RFC 1057 - Specifies version 1 of ONC RPC

    RFC 5531 - Specifies version 2 of ONC RPC

    Remote Procedure Calls (RPC) (http:/ / www. cs. cf. ac. uk/ Dave/ C/ node33. html) A tutorial on ONC RPCby Dr Dave Marshall of Cardiff University

    Introduction to RPC Programming (http:/ / techpubs. sgi. com/ library/ tpl/ cgi-bin/ getdoc. cgi?coll=0650&

    db=bks& srch=& fname=/ SGI_Developer/ IRIX_NetPG/ sgi_html/ ch04. html) A developer's introduction to

    RPC and XDR, from SGI IRIX documentation.

    http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi?coll=0650&db=bks&srch=&fname=/SGI_Developer/IRIX_NetPG/sgi_html/ch04.htmlhttp://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi?coll=0650&db=bks&srch=&fname=/SGI_Developer/IRIX_NetPG/sgi_html/ch04.htmlhttp://www.cs.cf.ac.uk/Dave/C/node33.htmlhttp://code.google.com/webtoolkit/http://code.google.com/p/protobuf/
  • 7/31/2019 Remote Procedure Call Intro

    4/4

    Article Sources and Contributors 4

    Article Sources and ContributorsRemote procedure call Source : http://en.wikipedia.org/w/index.php?oldid=476968622 Contributors : A930913, Aldie, Amolshah, Andot, Andre Engels, Andreas Kaufmann, Astronouth7303,Beatfox, Blainster, Bomazi, Bovineone, BurntSky, Can't sleep, clown will eat m e, CanisRufus, Chris Chittleborough, Christopher Mahan, Conversion script, Cybercobra, Dbroadwell, Dysprosia,Emperorbma, Enjoi4586, Esposimi, Ewlyahoocom, Eyreland, Frap, Fritz Saalfeld, Goutham 9, Grunt, Guidod, Guy Har ris, Huds, ILikeThings, Ian Yorston, Intgr, Itai, Ivmai77, JLaTondre,Jakobsg, Janssen, Jeiki Rebirth, Joakim Ziegler, Joe.dolivo, Johnuniq, JonSangster, Jsnx, Katherine, Kbrose, Keithdunwoody, Kgaughan, Kinema, KneeLess, Kooky, Lakmiviji, Larsinio,Lastorset, Lee.Sailer, Lenehey, Mange01, Marekventur, Marj Tiefert, Maury Markowitz, Medinoc, Michael Hardy, Minipie8, Mipadi, Miym, Mohit kesarwani, Mraric, Mwtoews, Nat Mishkin,Nicholas Sund, Paddles, Pedroarroba, Peturbed, Pkamala, Pretzelpaws, R. S. Shaw, Raanoo, Raigedas, RedWolf, Reisio, Rich Farmbrough, RobertStar20, Sander, Secured128, Sergey shandar,

    Sgould, Shadowjams, Shangri, Sparky62, Strait, S uruena, Tobias Bergemann, Tony1, Toytoy, TwoOneTwo, Velella, Velle, Venkytv, Versus22, W Nowicki, Walden, Waxmop, Wik, WilliamAllen Simpson, Wknight94, Wrs1864, Youssefsan, 209 anonymous edits

    LicenseCreative Commons Attribution-Share Alike 3.0 Unported

    //creativecommons.org/licenses/by-sa/3.0/