Support for Multiple Clients

Open Data Services can maintain simultaneous connections with multiple clients. For each client that establishes a connection, Open Data Services maintains a separate SRV_PROC structure to contain client-specific information. Open Data Services functions concerned with client requests pass a pointer to this SRV_PROC structure when referring to the client.

Open Data Services can process active client requests using one thread per client connection, or optionally, using multiple threads from a thread pool, where multiple threads can service individual requests from multiple clients as each thread becomes available. The thread pooling option allows Open Data Services to process a large number of client requests with little overhead.

As described later in this chapter, a application-defined event handler need only respond to a well-defined set of requests; Open Data Services creates and manages multiple threads and their access to the application's event handlers. Thread management in Open Data Services includes thread protection provisions, allowing Open Data Services to operate on a Windows NT - based computer that uses multiple processors. For a complete discussion of processing threads, see the description of the srv_config function in Functions and Macros.