Chapter 20. Resource Management

Resource Management

Tram depot in Amsterdam © Kevlin Henney

The term resource covers a broad range of programmatic assets and entities, including database sessions, synchronization primitives, security tokens, file handles, network connections, and even distributed services and components. A resource can range from a heavyweight entity, such as an application server component process, to a fine-grained lightweight entity such as a memory buffer. This chapter describes twenty-one patterns that manage the lifecycle and availability of resources to clients. These activities include assuring that resources are created or acquired when needed and that they are deleted or released in a timely manner.

Managing resources is hard, and managing them efficiently in distributed systems is even harder. The quality properties of an application, such as its performance, scalability, flexibility, stability, predictability, reliability, and security, often depend heavily on appropriate resource management policies and mechanisms. What makes resource management particularly hard is balancing the trade-offs among requirements, because addressing one of them often affects the others. For example, flexibility often reduces performance, while robustness can reduce predictability due to the use of checkpointing and restore mechanisms. Similarly, optimizing for specific use cases, such as minimizing ...

Get Pattern-Oriented Software Architecture: A Pattern Language for Distributed Computing, 4th Volume now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.