Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 5. Pool > Summary

Summary

This chapter shows how to use an implementation of a common pattern—the use of a pool. Pools typically serve one of two roles—either 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 immediately—for 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.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial