Apr 26, 2008

Remote Method Invocation (RMI) , Remote Procedure Call (RPC)

RMI

RMI - Remote Method Invocation is a JAVA Technology allowing a computer to run object methods on a remote computer. It offers the following characteristics:

  • The RMI handles establishing any required connection and the programmer does not add code for setting up sockets.
  • The protocol used for sending data is managed by RMI.

The Java Remote Method Protocol (JRMP) is used by Java/RMI for support. The RMI server and client objects must both be written in Java. The server has a defined interface which is used to access the server object by the client.

RPC

Remote Procedure Call (RPC) provides a method for a program on one machine to execute a routine or program on another machine. RPC functions are compiled into the code executed on the client machine. RPC is described by RFC 1057.

The process of performing a remote procedure call is basically as follows:

  • The server process is sleeping and waits for a call
  • The client process sends a RPC message including procedure parameters to the server process.
  • The client then waits for a response but may do other work while waiting.
  • The server process wakes up, checks authentication, and runs the procedure and returns results to the client.

RPC Characteristics

  • No reliability is implemented with RPC and reliability is left to the application.
  • RPC does not rely on a specific transport protocol.
  • RPC can run on any operating system.
  • Fields for client and server identification and authorization are provided.

RFC 1057 says the following are requirements for the RPC protocol:

  1. The ability for response messages to be matched with request messages must exist.
  2. The procedure to be called must have a unique specification.
  3. The caller must be able to be authenticated by the service and the service must be able to be authenticated by the caller.

Additional items that should be detected according to RFC 1057 are:

  1. RPC protocol mismatches.
  2. Remote program protocol version mismatches.
  3. Protocol errors (such as misspecification of a procedure's parameters).
  4. Reasons why remote authentication failed must be detected.
  5. Any additional reasons why the requested procedure call failed.

RPC Call Fields

  • Remote program number - A central authority administers the program numbers.
  • Remote program version number.
  • Remote procedure number - A four byte field with the number of the procedure being called.
  • RPC version number.
  • Transaction ID
  • Sending Direction Indicator
  • Remote Protocol Number

No comments:

Post a Comment

Popular Posts