|
This chapter shows how to use an implementation of a common patternthe use of a pool. Pools typically serve one of two roleseither as a logical representation of a pool, or as a performance enhancement by way of a cache implementation. If a pool represents a logical pool, you should feel free to use the pattern immediatelyfor example, an application for reserving hotel rooms might use a pool to track the available rooms. If a pool represents a cache of some sort, it should be added to an application later rather than sooner to avoid premature optimization. Pools are commonly used as a performance enhancement for managing connections to a database. The next chapter will look at a specific pool designed for managing database-specific resources.
|
|