ServerManager Collection




The ServerManager is a creatable collection object whose purpose is to provide a pool of open server connections to PI3.3 servers.  Web based business objects can provide improved performance while maintaining security by creating a single ServerManager as an application level object.  The ServerManager uses the PI3.3 PITrust table, maintained on the PI server, to validate connected domain users and provides open connections as trusted PI users. 


The PI-SDK object hierarchy derives significant performance benefits from caching Server information as it is retrieved over time.  Typical PI-SDK client/server applications maintain a small number of connections over the execution of the application, reaping the benefits of cached data.  In a “connectionless” Web environment, reestablishing a PI-SDK hierarchy with each client access is prohibitively slow.  The ServerManager solves this problem by storing open Server objects and providing secure access to them as required.


Behind the scenes, when a Server is requested from the ServerManager via the Item property, the collection detects the user associated with the current thread and looks for a trust relationship on the desired server.  If a valid trust is found, the ServerManager examines its collection for an existing connection for the trusted PI user on the target server.  If the connection is found a reference to the already open PI server is returned.  Cached child objects of the returned server are available without server roundtrips.  If no connection is found the ServerManager creates a new connection and returns a Server object already opened. 


Applications can manage the data cached by the PI-SDK as in the past using the IRefresh interface on various members of the hierarchy.  In addition, the ServerManager can be directed to delete connections that are not currently in use to manage memory and network resources. 



The ServerManager  should be the first PI-SDK object created in an application.  It will in turn create the parent PISDK object which can be accessed through the ServerManager's PISDK property.  This allows the PISDK object, when asked for its Servers property,  to return an interface based on the ServerManager collection rather than the Known Servers Table.

The ServerManager does not currently work with servers that do not support the PITrust table

Enabling Operational Intelligence