Request Waiting List

This post was originally published on this site

Martin Fowler

Solution

The cluster node maintains a waiting list which maps a key and a callback function. The key is chosen depending on the specific criteria to invoke the callback. For example if it needs to be invoked whenever a message from other cluster node is received, it can be the Correlation Identifer of the message. In the case of Replicated Log it is the High-Water Mark. The callback handles the response and decides if the client request can be fulfilled.

Consider the example of a key-value store where, data is replicated on multiple servers. Here, Quorum can be used to decide when a replication can be considered successful to initiate a response to the client. The cluster node then tracks the requests sent to other cluster nodes, and a callback is registered with each request. Each request is marked with a Correlation Identifer, which is used to

To read the full article click on the 'post' link at the top.