Chapter 18: Advanced Request Handlers


Overview

THE ATL SERVER INFRASTRUCTURE is designed so that you can easily choose the level of complexity that s suited to your needs or that you re comfortable working with. In this chapter, we explore ways of increasing this level of complexity and illustrate how doing so can help you develop your application.

The classes that make up ATL Server s infrastructure generally use a combination of template parameters and interfaces to allow you to configure them. By providing a class that follows the archetype of a given template parameter, you as an ATL Server developer can easily extend the functionality of ATL Server. By obtaining pointers to various interfaces that ATL Server exposes, you can obtain information about your application as it s running. The Visual Studio and MSDN documentation for ATL Server does an excellent job of detailing these template parameter archetypes and interfaces.

In this chapter, we focus on an example that illustrates how you can use these archetypes and interfaces to add richer functionality to your ATL Server application. The ATL Server infrastructure processes requests using a thread pool. The default implementation of this thread pool uses a static number of threads that wait on an I/O completion port. The example we present in this chapter follows this model, but the thread pool will increase the number of threads dynamically based on the load of the server.

This example isn t intended to be a comprehensive illustration of the different ways you can extend ATL Server, nor is it intended to meet production-level comprehensiveness and quality. The example dynamic thread pool is just meant to introduce and illustrate some techniques that you can apply to your own ATL Server applications. Let s take a look at how you can implement this example.




ATL Server. High Performance C++ on. NET
Observing the User Experience: A Practitioners Guide to User Research
ISBN: B006Z372QQ
EAN: 2147483647
Year: 2002
Pages: 181

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net