GatherInformation
From ParaQ Wiki
Jump to navigationJump to search
Overview
This pertains to the new ProcessModule design (in which it's possible for a Client to connect to multiple servers and for a server to connect to multiple clients). The purpose of this document is to describe how GatherInformation works in this new model.
Design
- Every Node (client/server/server-satellites) have a vtkProcessModuleConnectionManager (ConnectionManager for short). The ConnectionManager abstract the multiple connections.
- There is special connection on each node called the SelfConnection. This is the connection to the node itself. For root nodes (in an MPI group) this connection includes the satellites. For the satellite nodes (and nodes without MPI), the SelfConnection merely includes itself.
- There has be 1 and only 1 SelfConnection on every node.
- Client node and ServerRoot node can have additional connections. Satellite nodes can never have any connection other than the SelfConnection. These other connections are collectively called RemoteConnections, because these are the connections between Client and Server using sockets. The connection on the Client connecting to the Server is called ServerConnection; while that on Server which connects to the client is called ClientConnection. ServerConnection objects only exists on a Client node, and ClientConnection objects only exist on the Server (more specifically ServerRoot) node.
- vtkProcessModule now supports the method GatherInformation(vtkConnectionID cid, vtkTypeUInt32 serverFlags, vtkPVInformation* info, vtkClientServerID oid) meaning gather information on the cid connection, from serverFlags servers for the object with id oid and fill it in info.
- Any GUI/ServerManager entity that needs to GatherInformation directly calls this method on the local ProcessModule to request information gathering. As a consequence, ProcessModule forwards the call over to the ConnectionManager.
- ConnectionManager identifies the connection. Once the connection has been located and deemed valid, ConnectionManager calls GatherInformation(serverFlags, info, oid) on the vtkProcessModuleConnection object. Each type of connection behaves differently to this call.
- SelfConnection collects the information from the local object associated with the provided oid. If there are satellite nodes (which is true only for the Root ), and info->RootOnly flag is not set, it collects the information from every satellite and adds it to the local information.
- ClientConnection cannot handle the GatherInformation call at all. The reasons for that will be obvious soon.
- A ServerConnection is responsible to request the information from the Server node(s) and report that information. On a GatherInformation request, the ServerConnection (on the Client) triggers an RMI which the server is watching. The Server responds to this trigger by calling a GatherInformation on its SelfConnection and sending this collected information back to the Client over the socket connection. Client receives this information and returns it. ServerConnection can have separate channels for RenderServer and DataServer, and we can choose among them by using the serverFlags.
- The neat this about this the Client-Server connections don't have to worry at all about whether it's using MPI or not. All that code for setting up MPI communication etc simply rests in SelfConnection. Thus as far as the Client is concerned, the Server is simply a blob at the other end.