#include <QuorumSystem.h>
Inheritance diagram for CODEX_Quorum::ByzantineQuorumSystem:


Public Member Functions | |
| ByzantineQuorumSystem (ResponseTracker *aRT) | |
| Create a ByzantineQuorumSystem. | |
| virtual | ~ByzantineQuorumSystem () |
| Virtual destructor. | |
| virtual unsigned int | quorumSystemSize ()=0 |
| virtual unsigned int | quorumSize ()=0 |
| virtual unsigned int | faultsTolerated ()=0 |
| virtual bool | broadcastMessage (const Message &msg, ReturnVector &rets, ResponseCallback *cb)=0 |
| Send a message to all the servers in a QuorumSystem. | |
| virtual bool | unicastMessage (const MessageVector &msgs, ReturnVector &rets, ResponseCallback *cb=0)=0 |
| Send a server-specific message to each server in a QuorumSystem. | |
| virtual void | poll (MessageDispatcher &requestDispatcher, QuorumDispatcher &responseDispatcher)=0 |
| Poll the RemoteServer%s for incoming messages, storing or dispatching them as appropriate. | |
| virtual unsigned char * | extractKey (const unsigned char *data) |
| Forwards a request to ResponseTracker::extractKey(). | |
| virtual bool | keyRegistered (const unsigned char *key) |
| Determines whether a key is registered with the ResponseTracker. | |
Protected Attributes | |
| ResponseTracker * | m_responseTracker |
| This is used to match responses to their associated requests. | |
It provides no additional interfaces, and is simply used to distinguish Byzantine quorum systems from other types.
Definition at line 221 of file QuorumSystem.h.
|
||||||||||||||||
|
Send a message to all the servers in a QuorumSystem.
This method only sends messages. It expects the vector
The message sent is also registered with the ResponseTracker, since broadcasts are generally requests awaiting replies. This can be prevented by passing a All messages should have identifying information for the initiator of the request and a unique ID for the request.
Implemented in CODEX_Quorum::StaticByzantineQuorumSystem< N, T >, CODEX_Quorum::StaticByzantineQuorumSystem< nServers, nFaults >, and CODEX_Quorum::StaticByzantineQuorumSystem< 3 *T+1, T >. Referenced by CODEX_Server::SignRequestHandler::handler(), and CODEX_Server::BroadcastRequestHandler::handler(). |
|
|
|
Determines whether a key is registered with the ResponseTracker.
Definition at line 207 of file QuorumSystem.h. References CODEX_Quorum::QuorumSystem::m_responseTracker. Referenced by CODEX_Server::UnicastRequestHandler::handler(), and CODEX_Server::BroadcastRequestHandler::handler(). |
|
||||||||||||
|
Poll the RemoteServer%s for incoming messages, storing or dispatching them as appropriate. A non-blocking select(2) is used to determine if there is incoming data. New requests are dispatched, and responses are stored in a ResponseTracker until a quorum has been received, at which point they too will be dispatched.
Implemented in CODEX_Quorum::StaticByzantineQuorumSystem< N, T >, CODEX_Quorum::StaticByzantineQuorumSystem< nServers, nFaults >, and CODEX_Quorum::StaticByzantineQuorumSystem< 3 *T+1, T >. |
|
|
|
Implemented in CODEX_Quorum::StaticByzantineQuorumSystem< N, T >, CODEX_Quorum::StaticByzantineQuorumSystem< nServers, nFaults >, and CODEX_Quorum::StaticByzantineQuorumSystem< 3 *T+1, T >. |
|
||||||||||||||||
|
Send a server-specific message to each server in a QuorumSystem.
This method only sends messages. It expects the vector By default, the message sent is not registered with the ResponseTracker, since unicasts are not generally requests awaiting replies. This behavior can be changed by passing a callback object. It is advisable in cases where the sender is part of the quorum system for there to be distinct outgoing and incoming server identifiers. For example, the first bit of the first byte might flag whether this is a request being sent by the server or a response to a request from the server. This prevents the request from being treated as a response to itself in ResponseTracker.
Implemented in CODEX_Quorum::StaticByzantineQuorumSystem< N, T >, CODEX_Quorum::StaticByzantineQuorumSystem< nServers, nFaults >, and CODEX_Quorum::StaticByzantineQuorumSystem< 3 *T+1, T >. Referenced by CODEX_Server::UnicastRequestHandler::handler(). |
1.4.1