130 likes | 259 Views
Interprocess Communication. Client-Server Communication Request and reply messages provide base for communication Group Communication Same message is sent to all server process. C-S communication. Message exchange is done by client server interaction. Synchronous. Asynchronous.
E N D
Interprocess Communication • Client-Server Communication • Request and reply messages provide base for communication • Group Communication • Same message is sent to all server process
C-S communication • Message exchange is done by client server interaction. • Synchronous. • Asynchronous. • The 3 stages in C-S commn are • DoOperation. • GetRequest. • SendReply.
C-S commn Request msg DoOperation GetRequest … … execute request wait … … Reply msg (continuation) SendReply Client Server
Delivery Failure. • Messages are occasionally dropped by the sender, receiver and network gateways. • Network may become partitioned. That is one or more nodes of a network may become detached from the remainder of the network. • Process may become failure. • Corruptions on data. This can be avoided by error checking mechanism.
RPC exchange protocols • The request(R) protocol. • The request-reply(RR) protocol. • The request-reply-ack reply(RRA) protocol.
The request(R) protocol. • This protocol is used when there is no value is to be returned from the procedure and the client requires no confirmation that the procedure has been executed. The client may proceed immediately after the request message is sent as there is no need to wait for a reply.
The request-reply(RR) protocol. • RR protocol is useful because no special ack messages are not required, because servers reply message is regarded as the ack of the clients request message. Similarly a subsequent call from a client may be regarded as an ack of servers reply message.
The request-reply-ack reply(RRA) protocol. • The RRA protocol is based on three messages: request-reply-acknowledge reply. The ack reply message contains the requestid from the reply message being acknowledged. The arrival of a requestid in an ack message will be interepted as acknowledging the receipt of all reply messages with lower requestids, so the loss of an ack message is harmless.
Group Commn • The exchange of dingle message is not the best model for commn from one process to a group of other process. For a better performance we can use multicast messages. That is a message is send by one process to a group of processes. Multicast messages provide a useful infrastructure for providing fault tolerance in distributed systems.
Characteristics • Fault tolerance based on replicated services. • Locating objects in distributed services. • Better performance through replicated data. • Multiple update.
Atomicity • Atomic multicast: A message transmitted by atomic multicast is either received by all of the processes that are members of the receiving group or else it is received by none of them. • Reliable multicast: it is a message transmission method that makes best effort to deliver to all the members of a group but does not guarantee to do so. It transmits the multicast message only once.
Ordering • Totally-ordered multicast: When several messages are transmitted to a group by totally ordered multicast the messages reach all of the members of the group in the same order.