Last night I attended the famous Collection Connection BOF hosted by Joshua Bloch. As he was the original author of most of the Java collections framework, it was really interesting to hear him discuss the lineage of the packages. There was a quick overview of new collection features in Tiger (1.5.x) and much more detail on material in Mustang (1.6.x) and even some peeks at Dolphin (1.7.x.). One common trend in collection evolution is with Exceptions. By Mustang, a new set of collection interfaces will be introduced, most of which have 2 sets of accessor method pairs: one set would throw an exception, while the other would return a special return type. Think of it like this:
someMapType.get("foo"); //throws an exception is there's no key "foo"
someMapType.retrieve("foo"); //returns null, 0, etc.
Today is all about JMX. I’ve already attended one session and have 2 more on the subject. Some really new patterns proposed, but these guys are mostly discussing “Dolphin”, which is optimistically 5 years in the future before our appserver vendors will certify against them.
Developing Scalable JMX
Given that we normally think of monitoring when we think of JMX, this session was a refreshing surprise. The discussion was centered around using JMX for actual “management” of an application. This includes deployment, configuration and life cycle control (think of MNAD’s control node).
Here’s the problems that drove this work:
vast componentization, each with config to manage
scaling of components in a distributed topology
separate development and deployment environments (develop on 2 tier, deploy to 5 etc.)
increase dev cycle speed
achieve better code reuse
The solution was to employ open MBeans. Writing these manually is very tedious compared with standard MBeans, as an entire interface must be implemented. Today the most practical approach is to use Xdoclet. In newer JDK versions, annotations are standard that support this.
Some short falls of the current JMX API:
no enforced naming convention
component lifecycle
no index of available MBeans
no error reporting (FooMBean is offline)
no means to invoke a remote JVM
synch or asynch lookup?
startup order or services (TSN, OSN, etc.)
attribute lookup or naming?
By leveraging JMX for compent configuration it was possible to “clone” similar execution environments. Imagine taking an installed system and propogating from DEV to UAT to Production using JMX. Using management hierachries, like or connected components are categorized and updated accordingly. That allows the deployment team to identify similarities at the business level and export those configurations to other environments.
Basically this is a java standards based approached to a problem many teams in our organization have sought to solve. Obviously the huge downside is the need to instrument nearly every single component in our system.
Themes:
Managability is key to scale
self documenting components
automated lookups
variations (environment configuration deltas)
Managability speeds the development cycle
visualize architecture and topology
easily deploy new code
automate testing
I’ll follow up with reviews on the remaining events later.