References
http://www.jgroups.org/javagroupsnew/docs/papers/Middleware.ps.gz
Introduction
Reliable group communication is built on the assumption that all group members receive the messages sent by a group member in the order they were sent (FIFO order). For TOTAL order, the constraint is even stricter: all messages from all members have to be received in the same order at every receiver.
*A Synchronous Group RPC*invokes a procedure on all group members and blocks until all replies have been received. The preferred way of referring to a GRPC is method invocation rather than procedure invocation.
*The explanation of deadlock*When the receiver P of a synchronous GRPC m1 invokes in turn another synchronous GRPC m2 as part of the processing logic of m1, then m2 (which is also received by P as P itself is a group member) will not be processed by P until m1 has completed (which in turns waits for the completion of m2), causing a deadlock.
Ordering in Reliable Group Communication
The requests are processed on a single thread. We cannot use concurrent request handling since the non-determinism of request processing would violate the ordering properties associated with the group.
Synchronous Group RPC
Synchronous GRPC is a JGroups class that allows a developer to make remote procedure calls to all members of a group and to block until n replies have been received. Values for n may be all replies, the first reply only (discarding subsequent replies), and group majority. The result of the GRPC is a list of replies, with each entry containing:
the result (if available)
the sender
a flag stating whether the reply was received or not (e.g. when a timeout occured, some replies may not have been received)
a flag marking the reply as suspected, which means that while waiting for replies, a member from whom we hadn't received a reply yet, was suspected as having crashed. In this case we mark its reply as not received and suspected. This prevents blocking indefinitely, e.g. when waiting for replies from members P, Q and R, and R crashes. In this case GRPC would not have to wait for R's reply, which will never be received, but may return after having received P and Q's reply.
Comments