FountainServer Class Reference
[Fountain server]

Implements the Scalable Systems Software node monitor specification. More...

#include <FountainServer.h>

List of all members.

Public Member Functions

void checkConnections ()
 Checks our listening port for incoming client requests and services existing connections.

Private Member Functions

void registerServiceDirectory ()
 Register with the SSS service directory and setup our listener sockets to take administrative and node monitor requests.
void handleClientRequest (FountainWireProtPtr clientConnection, ConstParseMsgPtr clientRequest)
 Handles a client request.
bool isManager (const char *actor) const
 Helper function to determine if an actor is granted permissions to administer this Fountain server.
void sendQuery ()
 Sends a query request to the Fountain nodes.
void handleNodeRequest (FountainWireProtPtr clientConnection, ConstParseMsgPtr clientRequest, FountainMessage::MessageAction action)
 Handles a node request.
unsigned int processNodeQueryResponse (ConstParseMsgPtr nodeMessage)
 Processes an incoming query response from the node master Fountain node and adds the information to the node monitor database accordingly.
void joinMasterNode ()
 joins a master Fountain node
void handleAdmin (FountainWireProtPtr clientConnection, ConstParseMsgPtr clientRequest)
 Handles an admin client request.
void handleQuery (FountainWireProtPtr clientConnection, const BambooLib::XMLElement *requestElement)
 Handles a query client request.
 FountainServer (const NodeID &myID, const NodeID &masterNodeID)
 Private constructor since we are using a singleton design pattern.
 ~FountainServer ()
 Private destructor since we are using a singleton design pattern.
const FountainServeroperator= (const FountainServer &rhs)
 Private assignment operator since we are using a singleton design pattern.
 FountainServer (const FountainServer &rhs)
 Private copy ctor since we are using a singleton design pattern.

Private Attributes

ServerDataSource::NodeHashTable nodeMonitorDatabase_
ServerDataSourceserverDataPtr_
FountainSocketHandlers serverConnections_
std::vector< std::string > managers_
NodeID masterNodeID_
FountainWireProtPtr nodeConnection_
NodeID myID_
time_t startTime_
BambooLib::SSS_Protocols nodeMonitorProtocol_
int nodeMonitorPort_

Friends

class FountainServerCreator


Detailed Description

Implements the Scalable Systems Software node monitor specification.

The Fountain server is responsible for handling incoming client requests by sending a response message. Its primary purpose in life is to accept node monitor requests in the SSSRMAP format. It responds to these requests by maintaining a node monitor database and matching the request message parameters against each node entry in the database. The node monitor database can be populated and updated by a variety of methods:

  1. In response to a query request from the master Fountain daemon
  2. Discovering a server specific datasource
  3. Parsing the server specific datasource's nodelist file

Each of these options can be enabled or disabled during the configure step before compiling Fountain. When the Fountain node daemons are enabled, the Fountain server sends them a query request message at a user specified interval. The master Fountain daemon will respond to this request with a query response containing the node statistical information for each node in the Fountain tree topology. The Fountain server then parses this request and updates its node monitor database.

Fountain supports an extensible interface for obtaining statistics about server specific datasources. In this context, a server specific datasource is described as some quantitative source of information that can be gathered by the Fountain server. Certain server specific datasources are orthogonal to the Fountain node daemons, meaning support for the node daemons is disabled when that particular server specific datasource is enabled. For example, Fountain provides support for the Cray XT3 supercomputer by providing a wrapper around various Cray XT3 specific scripts to discover the number of compute nodes and their availability. Obviously on such a system like this, support for the Fountain node daemons should be disabled.

An instance where the Fountain daemons and a server specific datasource can coexist is the Infiniband datasource. In this case, Fountain provides a wrapper around the OpenIB software stack to discover and update Infiniband network resources.


Constructor & Destructor Documentation

FountainServer::FountainServer const NodeID myID,
const NodeID masterNodeID
[explicit, private]
 

Private constructor since we are using a singleton design pattern.

Parameters:
[in] myID The NodeID to use for this Fountain server
[in] masterNodeID The NodeID of the master Fountain node
Exceptions:
FountainException if the server could not be started


Member Function Documentation

void FountainServer::handleAdmin FountainWireProtPtr  clientConnection,
ConstParseMsgPtr  clientRequest
[private]
 

Handles an admin client request.

Parameters:
[in] clientConnection Connection to the client
[in] clientRequest The request from the client
Precondition:
clientConnection != NULL && clientRequest != NULL
Exceptions:
FountainException if the client request was malformed and could not be processed

void FountainServer::handleClientRequest FountainWireProtPtr  clientConnection,
ConstParseMsgPtr  clientRequest
[private]
 

Handles a client request.

Parameters:
[in] clientConnection The connection to the client
[in] clientRequest The request from the client
Returns:
The response message to send back to the client
Exceptions:
FountainException if there was an error handling the client request
Precondition:
clientConnection != NULL && clientRequest != NULL

void FountainServer::handleNodeRequest FountainWireProtPtr  clientConnection,
ConstParseMsgPtr  clientRequest,
FountainMessage::MessageAction  action
[private]
 

Handles a node request.

Parameters:
[in] clientConnection Connection to the client
[in] clientRequest The request from the client
[in] action The MessageAction of the request
Exceptions:
FountainException If the request could not be handled
Precondition:
clientConnection != NULL && clientRequest != NULL

void FountainServer::handleQuery FountainWireProtPtr  clientConnection,
const BambooLib::XMLElement requestElement
[private]
 

Handles a query client request.

Parameters:
[in] clientConnection Connection to the client
requestElement A pointer to the request element from the request message
Precondition:
clientConnection != NULL && requestElement != NULL

bool FountainServer::isManager const char *  actor  )  const [private]
 

Helper function to determine if an actor is granted permissions to administer this Fountain server.

Parameters:
actor - C string containing the actor attribute
Returns:
true if the actor is a manager, false otherwise

unsigned int FountainServer::processNodeQueryResponse ConstParseMsgPtr  nodeMessage  )  [private]
 

Processes an incoming query response from the node master Fountain node and adds the information to the node monitor database accordingly.

Parameters:
nodeMessage The FountainparseMessage response from the master Fountain node
Return values:
unsigned int The number of nodes processed in the query response message
Exceptions:
FountainException if the node response message was malformed
Precondition:
nodeMessage is not NULL

void FountainServer::sendQuery  )  [private]
 

Sends a query request to the Fountain nodes.

Exceptions:
FountainException if the query response could not be parsed correctly


Member Data Documentation

std::vector<std::string> FountainServer::managers_ [private]
 

A list of usernames who can administer this Fountain server

NodeID FountainServer::masterNodeID_ [private]
 

NodeID of the master Fountain node

NodeID FountainServer::myID_ [private]
 

NodeID of this Fountain server

FountainWireProtPtr FountainServer::nodeConnection_ [private]
 

FountainWireProt handler to the master Fountain node

ServerDataSource::NodeHashTable FountainServer::nodeMonitorDatabase_ [private]
 

The node monitor database holds node statistics for a collection of nodes in a cluster or parallel computer

int FountainServer::nodeMonitorPort_ [private]
 

Port to listen for Node Monitor requests

BambooLib::SSS_Protocols FountainServer::nodeMonitorProtocol_ [private]
 

Protocol used for the Node Monitor port

FountainSocketHandlers FountainServer::serverConnections_ [private]
 

A socket handler instance to maintain our open sockets

ServerDataSource* FountainServer::serverDataPtr_ [private]
 

A bald pointer to our server specific data source

time_t FountainServer::startTime_ [private]
 

The time this object was instantiated


The documentation for this class was generated from the following files:
Generated on Wed Mar 8 14:43:33 2006 for Fountain by  doxygen 1.4.6