Server Connections
As of this writing, the ParaView client makes a single ParaView server connection at the beginning of a session, and closes the connection when the client exits (which causes the server to exit in turn). To support current and future requirements, the ParaQ client needs to implement a more flexible and robust model for making and breaking connections to the ParaView server, as outlined in Crash Test Dummies.
Currently, the ParaView Server Manager API contains a number of design assumptions based on the one-client-makes-one-connection model that will need to be updated to support multiple connections. As an example, vtkProcessModule has static member functions GetProcessModule() and SetProcessModule() that provide access to a single global process module instance. This has the effect of making vtkProcessModule a singleton, since these global accessors are used throughout the API.
To hide these assumptions and provide the UI layer with a clean abstraction for making-and-breaking server connections, the class "pqServer" has been created. Static member functions of pqServer act as factory functions for creating server connections, and return an instance of pqServer when a connection is successful. Clients use pqServer methods to interact with the server, and delete the pqServer instance to close the connection. Currently, only one instance of pqServer may be created at-a-time, but it is assumed that this requirement will be relaxed as the PSM API evolves.