Presentation is loading. Please wait.

Presentation is loading. Please wait.

Remote Procedure Call (RPC)

Similar presentations


Presentation on theme: "Remote Procedure Call (RPC)"— Presentation transcript:

1 Remote Procedure Call (RPC)
11/29/2018

2 Remote Procedure Call (RPC)…
STEP 1: Client calling the client stub. This call is a local procedure call, with the parameters pushed onto the stack in the normal way. STEP 2: Client stub packing the parameters into a message and making a system call to send the message. Packing the parameters is called marshaling. STEP 3: Kernel sending the message from the client machine to the server machine. STEP 4: Kernel passing the incoming packet to the server stub. STEP 5: Server stub calling the server procedure with the unmarshaled parameters. The reply traces the same path in the other direction 11/29/2018

3 Socket Sockets are commonly used for client/server communication.
Client and server processes communicate with each other if and only if there is a socket at each end. 11/29/2018

4 Socket address 11/29/2018

5 Socket Characteristics
A socket is represented by an integer value. A socket exists as long as the process maintains an open link to the socket. Sockets perform the communication when the server accepts connections from them, or when it exchanges messages with them. 11/29/2018

6 Socket Primitives 11/29/2018

7 Socket Programming 11/29/2018

8 TCP Timers TCP Timers Retransmission Timer Persistence Timer
Keepalive Timer TIME-WAIT Timer 11/29/2018

9 Retransmission Timer The most important of these is the retransmission timer. When a segment is sent, a retransmission timer is started. If the segment is acknowledged before the timer expires, the timer is stopped. If, on the other hand, the timer goes off before the acknowledgement comes in, the segment is retransmitted (and the timer started again). 11/29/2018

10 Keepalive Timer Used in some implementations to prevent a long idle connection between two TCPs. Suppose that a client opens a TCP connection to a server, transfers some data, and becomes silent. Perhaps the client has crashed. In this case, the connection remains open forever. To remedy this situation is to equip a server with a keepalive timer. Each time the server hears from a client, it resets this timer. The timeout is usually 2 hours. If the server does not hear from the client after two hours, it send a probe segment. If there is no response after 10 probes, each of which is 75 sec apart, it assumes that the client is down and terminates the connection 11/29/2018

11 TIME-WAIT Timer It is used during connection termination. This timer is set to a time equal to twice the maximum packet lifetime to ensure that after closing a connection all the packets created by it die off. 11/29/2018

12 WIRELESS TCP AND UDP Most TCP implementations have been designed for wired networks, so usually these implementations get failed on the wireless network. The major problem is congestion control algorithm. If the packet has been delayed, most TCP assume that the delay has been introduced due to the network congestion and not because of the packet loss. Consequently, when a timer goes off, TCP slows down and sends less enthusiastically. The idea behind this approach is to reduce the network load and thus lighten the congestion. 11/29/2018

13 WIRELESS UDP… Wireless networks also introduce some problems in the working of UDP. The main trouble is that programs use UDP expects that it should be highly reliable. They know that UDP does not give any guarantee of reliable transmission, but they still expect it to be near perfect. In a wireless environment, UDP will be far from perfect. 11/29/2018


Download ppt "Remote Procedure Call (RPC)"

Similar presentations


Ads by Google