implementing remote procedure calls
play

Implementing Remote Procedure Calls Andrew Birrell and Bruce Nelson - PowerPoint PPT Presentation

Implementing Remote Procedure Calls Andrew Birrell and Bruce Nelson Presented by Kai Cong Conventional Procedure Calls main proc 1 proc 2 proc 3 proc 4 proc 5 proc 6 proc 7 proc 8 Within a program on a single computer!!! Extension of the


  1. Implementing Remote Procedure Calls Andrew Birrell and Bruce Nelson Presented by Kai Cong

  2. Conventional Procedure Calls main proc 1 proc 2 proc 3 proc 4 proc 5 proc 6 proc 7 proc 8 Within a program on a single computer!!!

  3. Extension of the Procedural Model computer 1 computer 2 main proc 1 proc 2 proc 3 proc 4 proc 5 proc 6 proc 7 proc 8 across a netWork betWeen programs on different computers!!!

  4. Remote Procedure Call (RPC) Client Server Blocked Blocked Computing Blocked 4

  5. RPC – How it works client process server process client server RPC Runtime module RPC Runtime module procedure call procedure client stub server stub locate (un)marshal (un)marshal (de)serialize (de)serialize receive (send) send (receive)

  6. Issues • Binding • Passing data • Implementation • Exceptions • RPC systems

  7. Binding • The binding operation is to bind an importer of an interface to an exporter of an interface. • After binding, calls made by the importer invoke procedures implemented by the remote exporter. • static binding vs dynamic binding

  8. Static Binding • static binding(not presented by the paper) – hard coded stub – simple – efficient – not flexible – stub recompilation is necessary if the location of the server changes – use of redundant servers is not possible

  9. Dynamic Binding • dynamic binding – Interface: type and instance – Database • load balancing – flexible – redundant servers is possible

  10. Dynamic Binding client process server process server client RPC Runtime module RPC Runtime module procedure procedure call 3 client stub server stub 7 1 7 bind register (un)marshal (un)marshal (de)serialize (de)serialize 4 find receive send send receive 5 6 2 Database

  11. Issues • Binding • Passing data • Implementation • Exceptions • RPC systems

  12. Passing Data • Can't use the stack! • Can't use shared memory! • Generally use message passing

  13. Passing data Build a message that includes: • Who and what's being called • Identity of the caller • Data values in known byte order • Using an intermediate data representation

  14. Issues • Binding • Passing data • Implementation • Exceptions • RPC systems

  15. Implementation

  16. Implementation • Function prototype is (almost) all that's needed to build the client stub – Also need binding information • Function prototype is (almost) all that's needed to build server stub – Also need method to wait for message

  17. Implementation • Stub compiler – Generates stubs for client and server – Language dependent – Compile into machine-independent format • Transport protocol – PUP, XML, SOAP, DCOM, CORBA, …

  18. Implementation Clients Servers Threaded Event Driven

  19. Issues • Binding • Passing data • Implementation • Exceptions • RPC systems

  20. Exceptions • What can happen in "normal" procedures ? – Procedure generates an exception – Procedure infinite loops – Procedure generates wrong results

  21. Exceptions • What can happen in "remote" procedures? – Client stub generates an exception – Transmission failure  knowable failure  unknowable failure – Remote procedure generates an exception – Remote procedure infinite loops – Remote procedure generates wrong results

  22. Issues • Binding • Passing data • Implementation • Exceptions • RPC systems

  23. RPC Systems  Sun RPC  DCE RPC  DCOM  CORBA  Java RMI  XML RPC, SOAP/.NET, AJAX, REST  Protocol Buffers (Google)  Thrift (Facebook)

  24. Conclusion • Remote Procedure Call should look and feel like local call • Remote Procedure Call should be independent of where it executes • Remote Procedure Call should be "efficient“

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend