Presentation is loading. Please wait.

Presentation is loading. Please wait.

Client-Server Communication Sockets Remote Procedure Calls Remote Method Invocation (Java)

Similar presentations


Presentation on theme: "Client-Server Communication Sockets Remote Procedure Calls Remote Method Invocation (Java)"— Presentation transcript:

1 Client-Server Communication Sockets Remote Procedure Calls Remote Method Invocation (Java)

2 Sockets A socket is defined as an endpoint for communication. Concatenation of IP address and port The socket 161.25.19.8:1625 refers to port 1625 on host 161.25.19.8 Communication consists between a pair of sockets. Considered a low-level form of communication between distributed processes.  Sockets allow only an unstructured stream of bytes to be exchanged. It is the responsibility of the client or server application to impose a structure on the data.

3 Socket Communication

4 Remote Procedure Calls Remote procedure call (RPC) abstracts procedure calls between processes on networked systems. Stub – client-side proxy for the actual procedure on the server. Server has a similar stub as well. The client-side stub locates the server and marshals the parameters. The server-side stub receives this message, unpacks the marshaled parameters, and performs the procedure on the server. External data representation (XDR)  I.e most-significant (big-endian), least-significant(little-endian)

5 Execution of RPC

6 Remote Method Invocation Remote Method Invocation (RMI) is a Java mechanism similar to RPCs. RMI allows a Java program on one machine to invoke a method on a remote object.

7 Marshalling Parameters

8 Remote Method Invocation RMI and RPC differs in two ways: 1. RPCs support procedural programming whereby only remote procedures or functions may be called. RMI is object based: It supports invocation of methods on remote objects. 2. The parameters to remote procedures are ordinary data structures in RPC; with RMI it is possible to pass objects as parameters to remote methods. If the marshaled parameters are local (non remote) objects, they are passed by copy using a technique known as object serialization.  Object serialization allowed the state of an object to be written toa byte stream.


Download ppt "Client-Server Communication Sockets Remote Procedure Calls Remote Method Invocation (Java)"

Similar presentations


Ads by Google