![]() |
Site Archive (Complete) | |||
|
ABOUT US |
CONTACT |
ADVERTISE |
SUBSCRIBE |
SOURCE CODE |
CURRENT PRINT ISSUE |
NEWSLETTERS
|
RESOURCES
|
BLOGS
|
PODCASTS
|
CAREERS
|
||||
April 11, 2006
Managing J2EE and .NET Interoperating ApplicationsMarina Fisher, Ray Lai, Laurence Moroney and Jeremy Barkan
Managing application resources is too important to be an afterthought. We examine strategies for managing applications requiring interoperability between J2EE and .NET resources.
Marina Fisher, Ray Lai and Laurence Moroney are co-authors of .NET/J2EE Interoperability: Integration Strategies, Patterns and Best Practices with Sonu Sharma. Jeremy Barkan is an Enterprise Software Architect and has been writing, designing and architecting software for the past 20 years.
Monitoring quality-of-service across large-scale, distributed enterprises is difficult, especially when troubleshooting systems built from disparate technologies such as J2EE and .NET. Without an effective management infrastructure in place, troubleshooting can consume days or weeks before problems are identified and fixed, leading to system downtime or degraded service levels.
Deploying, configuring, monitoring, detecting, notifying and healing problems are the constituents of system management. The ultimate goal of system management is to ensure that the quality of service and operating requirements of all business applications are satisfied. In the ISO Network Management model (www.iso.org), the key elements of this complex task are fault management, configuration management, accounting, performance management and security management. Achieving these goals in a mixed J2EE and .NET platform environment presents many management challenges. An implementation of the Simple Network Management Protocol (SNMP), designed for network management, is available for Windows and various Unix platforms and can be leveraged to monitor platforms hosting mixed J2EE and .NET applications. SNMP is often used as the lowest common denominator to monitor nodes on IP networks and to provide detailed networking statistics. However, SNMP also produces lots of information that can be filtered.
In this article, we examine strategies for managing applications that require interoperability between J2EE and .NET. The first approachusing Web servicesis well known, involving business processes that are surrounded by functionality exposing a standard interface. As communication occurs across this interface, the underlying technology implementation doesn't matter and interoperability is achieved. The second approachPlatform Unificationinvolves applications written on diverse platforms that interoperate by reducing diversity and having a single platform. Managing Java and J2EE Applications
The Java Management Extensions (JMX) APIs enable instrumentation of Java applications and facilitates management of JMX resources (devices, services or business applications). The JMX component model introduces the notion of a managed bean (MBean) that represents managed resources. Resources instrumented with MBeans represent the key component of the JMX architecture. These MBeans are registered and deployed within an MBean container that is part of a JMX agent. An agent also includes services for controlling MBeans and consolidating information gathered by MBeans into a remote management console. Finally, the JMX Agent is accessible to a remote management console means of protocol adapters or connectors. Figure 1 outlines some of the core JMX components.
Figure 1: Core JMX components
Managing .NET-Based Applications
Microsoft provides the Windows Management Instrumentation (WMI) framework for instrumentation and monitoring the operating system, frameworks and applications. Using WMI in a .NET application can be accomplished through The Interoperability Technology Gap
Managing applications that are mixed modethat is, having both J2EE and .NET-based componentsraises a number of challenges. For example, JMX isn't interoperable with WMI, OSS/J doesn't work with applications built on the .NET platform, and the Microsoft Management Console can't control JMX Agents.
While there are technologies that manage application-level details for both technologies, such as AVICode for .NET (www.avicode.com/content/prod ucts/InterceptStudio.asp) and AutoPilot for J2EE (www.nastel.com/products/ ap_it.shtml)there is no solution that monitors both. Granted, the WS-Management specification exists, but it isn't fully mature. If a system is architected where interoperability is achieved using Web services, then various Web services management solutions, such as those available from Amberpoint (www .amberpoint.com) or Actional (www .actional.com) can be used to manage the full system.
To complement this, an SNMP-based management solution collects and responds to low-level networking information once it has been interpreted into meaningful business messages. ISO Application Management
According to the ISO, the requirements for managing applications that interoperate are:
The two main strategies that can be used to manage infrastructures such as these involve:
Web Services Management Strategy
The nature of Web servicesabstracting the technological implementation of business functionality and allowing for accessibility through a standard interfacelends itself to clean management. Two specifications, Web Services Management (WS-Management) and Web Services Distributed Management (WSDM), make this possible. They share the goal of uniquely identifying managed resources and monitoring their status, and can be leveraged to accomplish management of interoperating J2EE and .NET-based applications.
WS-Management is gaining popularity and support is expected from organizations such as Sun, Microsoft, and Intel. WS-Management identifies a core set of Web service specifications and usage requirements to expose a common set of operations that are central to all systems management. Its goal is to allow interoperability across managed applications and resources and any compliant device, such as a baseboard management controller (BMC). There are five core operations highlighted by the WS-Management specification:
To discover management resources, the WS-Management uses the WS-Management Catalog specification, which defines metadata for managed resources. The WS-Management Catalog contains de- tails on how a managed hardware or software resource is to be accessed via a WS-Addressing endpoint reference that includes a URL of the resource, the resource type iden- tifier and name/ key value pairs identifying a resource. Managed resources are grouped into Systems, one ore more Systems comprise a Service. Management services expose Web Services APIs defined by the specification to the client application that consolidates management information. Event notifications can be delivered to endpoints via multiple delivery modes, including batched and pull. Aside from WS-Addressing, the WS-Management specification also references WS-Eventing, WS-Enumeration, and WS-Transfer.
When implementing services, the interfaces are mapped to the Common Information Model (CIM) schema, which specifies a common definition of management information for systems, networks, applications and services to allow heterogeneous environments to adhere to a consistent management standard. Figure 2 (page 32) shows how WS-Management, using CIM, can be used in a mixed-mode Java/.NET application.
Figure 2: WS-Management of a mixed Java/.NET application.
Co-developers of the WS-Management specification have submitted the specification to the Distributed Management Task Force (DMTF). This is a major step toward developing an interoperable distributed management standard.
On the other hand, WSDM, defined by OASIS, consists of two specifications: Management Using Web Services (MUWS) and Management of Web Services (MOWS). They define a management capability, which is a composable set of operations, events, metadata, properties and other information. A WSDM adaptor that publishes the appropriate Metadata for the service is necessary for each component, so that the component may be managed through a management console, as in Figure 3.
Figure 3: WSDM-based management.
A clear benefit of this solution is that it is already an OASIS standard. Hewlett-Packard has donated code for three Web Services Distributed Management (WSDM) 1.0 specifications to the Apache Foundation (see http://ws.apache.org/ muse/, http://ws.apache.org/pubscribe/ wsn.html and http://ws.apache.org/ wsrf/). At this writing, we're not aware of any solutions for .NET.
Table 1 shows the implications of using the WS-Management and WSDM approach with regards to the ISO Characteristics. The WS-Management specification is designed with system management in mind, and has not been tailored for these characteristics. However, it can still meet some of these characteristics as noted in the table.
Platform Unification Strategy
An alternative methodology is to unify the platforms at design, development and runtime. The clear and easy way to do this, developing the entire system in a single language, be it .NET-based or Java in the typical case, isn't realistic, as many assets may have already been developed, and a mixed-mode architecture is common. However, Visual MainWin for J2EE (VMWJ2EE) from Mainsoft (www.mainsoft.com) lets existing .NET-based assets be recompiled, redeployed and run on J2EE.
For .NET code to execute in the J2EE environment, the code must be executable as compliant Java bytecode that runs in a Java virtual machine. An application written in a .NET language such as C# is compiled into a common language called Microsoft Intermediate Language (MSIL). The Mainsoft binary compiler converts this MSIL code into pure Java bytecode. This bridges the difference in .NET and Java semantics, while producing efficient and compliant code. This process can be seen in Figure 4.
[Click image to view at full size]
Figure 4: Cross-compilation process for platform unification.
Interoperability with Java Code from the .NET code is now handled natively. Because the runtime environment is Java-based throughout, interoperability between the two is simplified. For example, in a scenario where a service is implemented in Java using an EJB component, if a mixed-mode deployment is used, a Web services wrapper or similar interoperability layer would be necessary for a .NET component to communicate with it. This would lead to potential difficulties and performance implications. However, on a unified platform, the .NET components now rehosted on Java would be able to access the EJB directly.
This achieves a cross-language/ cross-environment platform with a uniform J2EE management model. Thus, the challenges posed by the mixed management models previously described are significantly reduced. In this model, the intercomponent communications are based on native protocolssuch as Java method calls or RMI.
The Platform Unification model (Table 2) does not impose an architectural model on the components so they can be tightly (through RMI or the like) or loosely coupled (through Web services) depending on the needs of your application. This architectural flexibility allows a mixed .NET and J2EE system to be designed to meet the organizational structure, rather than be constrained by the interoperability technology. Additionally, .NET semantics are preserved for the developer, but the manager has a coherent J2EE management view of the system.
Conclusion
Effective management of any application platform shouldn't be an afterthought in the design or implementation process. It is a vitaland complicatedpart of the process that becomes exponentially more complex as different technology implementations implement the system components. Ultimately, it is the role of the architect to explore all aspects of the system, including management.
|
|
||||||||||||||||||||||||||||
|
|