API for internet protocols

RGPV: Distributed System: Unit 3



1.     Characteristics of IPC:-

·         Interprocess communication (IPC) is the transfer of data among processes. Exchange of data between two or more separate, independent processes.


·         Distributed systems make use of these facilities to provide API which allows IPC to be programmed at a higher level of abstraction.


·         Message passing b/w a pair of processes supported by two communication operations- Send and Receive.


·         Communication is termed as synchronous and asynchronous.

Synchronous:-1. Sender blocks until a receive is issued.

                        2. Receiver blocks until a message arrives.

Asnchronous:-1. Sender is non-blocking.

                        2. Receiver blocking or non- blocking


·         Message destinations

·         Reliability

·         Ordering


2.     Socket:-

·         Communication between processes is made between ports. Each computer has 2^16 possible ports represented by integer numbers.


·         Sockets are software abstractions of ports used within running processes. Messages are sent between a pair of sockets.


·         Each socket is associated with a particular transport protocol, i.e. UDP or TCP.



3.     UDP Datagram Communication:-

·         There are some instances when it makes to use UDP instead of TCP. Some popular applications built around UDP are DNS, NFS and SNMP.


·         A datagram is communicated between processes when one process sends it and the other receives it. Datagram sent from socket to socket without acknowledgement or reliability.


·         Message size: - IP puts a limit of 64 kbytes on packets.


·         Blocking: - Sockets provide non-blocking sends and blocking receives for datagram communication.


·         Timeouts: - Timeouts can be set on receiver socket to forbid indefinitely waiting in case of crashed sender or lost message.


·         Receive from any:-The receive method does not specify an origin for messages.


4.     TCP Stream Communication:-


·         An abstraction provided by TCP API  as a stream of bytes to which data may be written and from which data may be read. It offers following characteristics:-


·         Message size:-Application can choose how much data written to or read from a stream. No restriction of message size.


·         Lost massage:-The sender retransmits the massage if it does not receive an ack within a timeout.


·         Message duplication and ordering.


·         Pair of communicating processes establishes a connection before they can communicate over a stream. One of the two processes plays the client role and the other plays the server role.


·         The pair of sockets in client and server is connected by input and output streams, one for each direction.






Related topics

Professor Jayesh video tutorial

Please use contact page in this website if you find anything incorrect or you want to share more information about the topic discussed above.