IN THE ATL SERVER architecture, the ISAPI extension module acts as an invariant from the moment the Web application is initialized until it s unloaded or the server is shut down. That is, the ISAPI extension doesn t get unloaded or reloaded for each request. It is, therefore, the appropriate place to store state information and reusable objects.
ATL Server features such as the cache engines and the pools (the database connection pool and the thread pool) are stored inside the ISAPI module because they rely on this invariance property. Packages of functions that contain reusable code or allow access to persistent information are grouped in COM-like interfaces and exposed as services by the ISAPI module.
In this chapter we discuss dealing with such ISAPI services. Based on how the actual service implementation is stored, we distinguish three categories of such services and then discuss their properties, together with examples of ATL Server features implemented in this manner and sample code.