Sun Microsystems
Products & Services
 
Support & Training
 
 

Previous Previous     Contents     Index     Next Next

1.1.3 How is a Java Dynamic Management Solution Developed?

The instrumentation level of the JMX specification describes how to represent a resource as a Java object. The JMX agent level describes how resources interact with an agent. The management level defined by the JMX Remote API specification describes how to use standard connectors to access agents remotely, and how to implement the associated security aspects. Using the Java DMK, you can design and develop a distributed management solution relying on all three levels, and compliant with both specifications.

1.1.3.1 Instrument Your Resources as MBeans

A resource can be any entity, physical or virtual, that you want to make available and control through your network. Physical resources can be devices such as network elements or printers. Virtual resources include applications and computational power that are available on some host. A resource is seen through its management interface, that is, the set of attributes, operations, and notifications that a management application can access.

To instrument a resource is to develop the Java object that represents the resource's management interface. The JMX specification defines how to instrument a resource according to a certain design pattern. These patterns resemble those of the JavaBeans™ component model. An attribute has getters and setters, operations are represented by their Java methods, and notifications rely on the Java event model.

A managed bean, or MBean, is the instrumentation of a resource in compliance with the JMX design patterns. If the resource itself is a Java application, it can be its own MBean. Otherwise, an MBean is a Java wrapper for native resources or a Java representation of a device. MBeans can be distant from the managed resource, as long as they accurately represent its attributes and operations. The MBean developer determines what attributes and operations are available through the MBean.

Device manufacturers and application vendors can provide the MBeans that plug into their customer's existing agents. Management solution integrators can develop the MBeans for resources that have not been previously instrumented. Because MBeans follow the JMX specification, they can be instantiated in any agent that is compliant with the JMX specification. This compliance makes the MBeans portable and independent of any proprietary management architecture.

1.1.3.2 Expose Your MBeans in a Smart Agent

A Java dynamic management agent follows the client-server model. The agent responds to the management requests from any number of client applications that want to access the resources that the agent contains. The agent centralizes all requests, dispatches the requests to the target MBeans, and returns any responses. The agent, rather than the MBeans, handles the communication issues involved with receiving and sending data.

The central component of an agent is the MBean server. The MBean server is a registry for MBean instances, that exposes a generic interface through which clients can issue requests on specific MBeans. Clients can ask for the description of an MBean's management interface, to find out what resource is exposed through that MBean. Using this information, the manager can then formulate a request to the MBean server to get or set attributes, invoke operations, or register for notifications.

MBeans are accessible only through requests to the MBean server. Manager applications never have the direct reference of an MBean, only a symbolic object name which identifies the MBean in the agent. This preserves the client-server model and is essential to the implementation of query and security features.

The MBean server also provides the framework that allows agent services to interact with MBeans. Services are themselves implemented as MBeans, which interact with resource MBeans to perform some task. For example, a manager could decide to monitor an MBean attribute. The manager instantiates the monitoring service MBean, configures the threshold, and registers to receive the alarms that might occur. The manager no longer needs to poll the agent, but will automatically be notified whenever the attribute exceeds the threshold.

The library of services contains the logic that is necessary for implementing advanced management policies, such as the following.

  • Scheduling events

  • Monitoring attributes

  • Establishing and enforcing relations

  • Discovering other agents

  • Creating subagent hierarchies

  • Downloading of new MBean objects

You can also develop your own service MBeans to meet your management needs, such as logging and persistence services, which are typically platform-dependent.

1.1.3.3 Access Your Agents Remotely

Finally, the Java DMK enables you to access agents and their resources easily from a remote application. All components for handling the communication are provided, both in the agent and for the client application. The same API that is exposed by the MBean server in the agent is also available remotely to the manager. This symmetry effectively makes the communication layer transparent.

Management applications perform requests by getting or setting attributes or invoking operations on an MBean identified by its symbolic name. Proxy objects provide a further level of abstraction by representing an MBean remotely and handling all communication. The manager can be designed and developed as if all resources were local. The communication components also handle notification forwarding, so that remote managers can register to receive notifications from broadcasting MBeans.

Management applications developed in the Java programming language use connectors to make the communication layer transparent. Connectors for the RMI, RMI/IIOP and JMXMP protocols are provided, as defined by the JMX Remote API, all with the same API for interchangeability. The legacy RMI and HTTP-based connectors from previous versions of Java DMK are retained for reasons of backwards compatibility, but are deprecated in version 5.1. Wherever possible, you should migrate your remote agents to the standard JMX Remote API connectors.

Adaptors provide a view of an agent through other protocols for management applications which are not based on Java technology. For example, the HTML adaptor represents MBeans as web pages that can be viewed in any web browser. The SNMP adaptor can expose special MBeans that represent an SNMP MIB and respond to requests in the SNMP protocols. It is possible to use the SNMP adaptor without registering the MIB in the MBean server.

All connectors and adaptors are implemented as MBeans. Management applications can therefore create, configure and remove communication resources dynamically, according to network conditions or available protocols. Each protocol can have its own built-in security mechanisms, for example SSL, SASL, or SNMPv3 security. Security aspects linked to each protocol are therefore handled at the connector or adaptor layer, making them transparent to the MBean developer.

The flexibility of communicator MBeans and the availability of connectors for multiple protocols make it possible to deploy management solutions in heterogeneous network environments. The adaptors create a bridge between agents that are based on the JMX architecture and existing management systems. You can also create your own connectors and adaptors to accommodate proprietary protocols and future management needs.

1.2 Key Concepts

Figure 1-1 illustrates the key concepts of the Java DMK and shows how the components relate to each other.

In this example, the MBeans for two resources are registered with the agent's MBean server. An agent service such as monitoring is registered as another MBean. The agent contains a connector server for one of either the RMI or JMXMP connector protocols. The agent also contains a protocol adaptor, either for SNMP or HTML. An agent can have any number of communicator components, one for each of the protocols, and one for each of the ports through which it communicates.

Figure 1-1 Key Concepts of the Java DMK

Key concepts of Java DMK

The remote manager is a Java application running on a distant host. The manager contains the connector client for the chosen protocol and proxy MBeans representing the two resources. When the connector client establishes the connection with the agent's connector server, the other components of the application can issue management requests to the agent. For example, the connector client can call the proxy objects to invoke an operation on the first resource and configure the monitoring service to poll the second resource.

With the HTML adaptor, you can view the agent through a web browser, which provides a simple user interface. Each MBean is represented as a separate HTML page, from which you can interact with text fields to set attributes and click buttons to invoke operations. The HTML adaptor also provides an administration page for creating or removing MBeans from the MBean server.

Each of these concepts is further defined in Chapter 2, Architectural Components.

1.3 Benefits of a Java Dynamic Management Solution

To summarize, the benefits of the Java DMK include the following.

  • Simplified design and development of instrumentation, smart agents, and remote managers

  • Deployment flexibility through protocol independence and SNMP compatibility

  • Dynamic extensibility and scalability

  • Secure SNMPv3 access

  • Secure standard communication modules with remote managers

1.3.1 Simplified Design and Development

The JMX architecture standardizes the elements of a management system. All three levels, instrumentation, agent, and manager, are isolated and their interaction is defined through the API. This design makes it possible to have modular development, in which each level is designed and implemented independently. Also, component reuse is possible. Services developed for one JMX agent will work in all JMX agents.

At the instrumentation level:

  • MBeans need only to define their management interface and map the variables and methods of their resource to the attributes and operations of the interface.

  • MBeans can be instantiated into any agent that is compliant with the JMX specification.

  • MBeans do not need to know anything about communication with the outside world.

At the agent level:

  • The MBean server handles the task of registering MBeans and transmitting management requests to the designated MBean.

  • Any MBean compliant with the JMX specification can be registered and be exposed for management.

  • Any of the provided communication components can be used to respond to remote requests, and you can develop new adaptors and new connectors to respond to proprietary requests.

  • The library of agent services provides management intelligence in the agent, such as autonomous operation in the case of a network failure.

At the manager level:

Previous Previous     Contents     Index     Next Next