1 / 12

Remote Procedure Call and Serialization

Remote Procedure Call and Serialization. By: Aaron Mckay. Remote Procedure Call (RPC). What is RPC? An inter-process communication that allows a computer to cause a subroutine or procedure to execute in another space (such as another computer on a network) RPC on the OSI model

thora
Download Presentation

Remote Procedure Call and Serialization

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Remote Procedure Call and Serialization By: Aaron Mckay

  2. Remote Procedure Call (RPC) • What is RPC? • An inter-process communication that allows a computer to cause a subroutine or procedure to execute in another space (such as another computer on a network) • RPC on the OSI model • Contains elements of session and presentation layers • Why use RPC? • To make distribution more transparent and easier to accomplish

  3. RPC Toolkits • Typical toolkits automatically handle: • Reliability such as communication errors and transactions • Security • Serialization

  4. RPC Model

  5. Serialization • Serialization – The process of translating data structures or object state into a format that can be stored and reconstructed in the same or another computer environment. • When referring to RPC, Serialization is used to transmit data across a network and deserialization is used to extract a data structure. • There are many different versions of serialization. Custom serialization is even an option as long as the serialization and deserialization processes are defined for the object.

  6. Serialization

  7. Local Procedure Call vs Remote Procedure Call • Local Procedure Call • Transfer control from one part of a process to another. The control must be returned at the end of the procedure. • Remote Procedure Call • Local process starts a process on a remote system. • Waits for a response from this system.

  8. Transparency • Network code is hidden in the client and server stubs. • The stubs are usually generated automatically • Keeps the user from having to deal with sockets, byte ordering, acknowledgements, etc.

  9. Call Semantics • Exactly Once • Procedure was executed exactly once (subtracting money from a bank account) • At Most Once • If a normal return to caller occurs then the procedure occurred one time. If an error is made then it is uncertain if the procedure executed once or not at all. • At Least Once • Client stub keeps making procedure calls until it receives a valid response.

  10. Iterative RPC Server Loop { Wait for RPC request Receive RPC request decode arguments execute desired function reply result to client } Problem: RPC server cannot accept new RPC until function is executed

  11. Concurrent RPC Server Loop { Wait for RPC request Receive RPC request decode arguments Spawn a process or thread { execute desired function reply result to client } }

  12. Summary • RPC is useful for having transparent communication. • It is the basis for many client/server applications • Easy to use • It will end world hunger • Enjoy catching Pokémon on Google Maps

More Related