Java Dynamic Management Kit 5.1 Getting Started Guide

3.2 Designing an Agent Application

Given the set of resources you want to manage, you need only to register their corresponding MBeans in an agent, and they become manageable. However, designing an effective agent is more complex.

When designing your agents, you must keep in mind the nature of the management application that will access them. You must strike a balance between services that unburden your clients and making of your agent application too complex.

The simplest agent is one that contains an MBean server and a connector or protocol adaptor. The class for this agent can be written in 10 lines of code, yet this agent is fully manageable. Through the one communication component, a manager can instantiate agent services and dynamically load new resources. The minimalist agent can grow to contain as many MBeans as its memory can hold.

At the other extreme, your entire management solution could be located in the agent. All the policies and all resources you need could be managed locally. This application can become overburdened with its management tasks and does not take advantage of distributed management logic. You need to decide between how much management logic can be performed locally and how much is distributed across your whole management solution.

The functionality of your agents is most often determined by their environment. Some agents might be limited by their host machine. When memory or processing power is limited, an agent can be expected only to expose its MBeans and perhaps run a monitoring service.

An agent in a more powerful machine has the liberty to run more services and handle more MBeans. For example, the agent at the top of a cascading hierarchy might establish relations between MBeans in all the subagents. Desktop machines and workstations can easily handle agents with thousands of MBeans.

The hierarchical model is very appropriate, because management logic and power are concentrated toward the top of the hierarchy. The information from many small devices becomes concentrated on a few large servers where the management consoles are located. In between are medium-sized agents that perform some management tasks, such as filtering errors and computing averages across their subagents.