I’ve spent some time looking into IBM’s Common Base Event ideas. The driver for my interest comes from my experience in enabling auditability/operability of integration solutions. I’ve seen a number of logging frameworks for event tracking and they were all inconsistent with the type of data they captured. So I was looking for some “canonical” event model.
Common Base Events are just such a thing. Basically, it’s an XML document that defines an event at either the technical or business level. I’d like to break this discussion up into two different sections, technical events and business events.
Technical Events
Why would you want to use CBE and not just use log4j or something? As we all know, interpreting different system’s log files requires considerable experience with the system. Sometimes, the log file format is defined, other times it’s up to the competence of the system operators to guess what it means. CBE is an attempt to standardise and unify events and situations so that operators have a better chance of resolving a situation. This standardisation doesn’t only help operators, it allows for “self-healing” of an application, as management applications can more easily ascertain problems and therefore solutions.
The team that defined this canonical studied many different logging styles and came up with the model specified. It’s apparently very similar to some work done by the Tivoli group.
In many ways, this canonical event model allows easier problem management. This event model is also part of the WSDM initiative.
Business Events
This is the thing I was really interested in. I want to log when a SalesOrder hits my system, I then want to log the transform&enrichment I do to the canonicalSalesOrder. Lastly I want to log its change to a SAP iDoc and then I wish to log the response I get from SAP. In effect, I wish to log all state changes. This log, I wish to expose to Line Of Business users rather than technical folks. There’s a big section on business events in this best practices document. IBM is using this framework to power their BAM solution. The IBM Business Modeller allows the definition of an Event Model in the Business Process, which is quite like Oracle’s Sensor concept. So, it seems like I can do what I want, though it feels a little like I’m shoehorning a techo solution for a business solution.
Where things can be improved
It would be great if I could download a reference implementation of the CBE unencumbered by IBM products, in particular Websphere and eclipse. This reference implementation would contain all the pieces for me to implement this in my application, including the Common Event Infrastructure and a repository. It would also be great if a simple webapp was also included that served as a front end, as a sort of sample viewer. The reason why this clean-room RI is needed is that it will be easier to convince application stakeholders of the goodness of this approach if it’s all simple, easy and mature. A .Net sample client implementation would also be quite handy to convince those VB programmers that logging is cooler than it sounds.
CBE’s relationship to Non Functional Requirements
CBE affects two Quality Attributes. Operability is affected by the design of the event system. If all components of an application, ie, database, web-server, app-server etc, all emit CBE’s then the ability of operations staff to manage problems is improved. Auditability can also be enhanced if the correct business events are emitted.
CBE’s and their standardisation in the application allow us to start measuring conformance to design. For example, if we design a CBE event model, it will be possible to scan the code base for conformance to this model. Additional to static scanning, it will be possible to append test cases with checks for conformance to expected event emission. This last paragraph on operationalising Quality Attributes is a nascent idea I’ve been thinking through. Expect a more thorough treatment in the near future.
CBE and Legacy
Obviously, you cannot rewrite all your logging code to meet this new format. IBM has provided us with a couple of solutions. Firstly, they’ve built a log file adapter. A tool that parses log files and emits CBE events. It’s a bit like an EIS adapter for log files if you will. The other slightly more invasive method is to slip in a CBE implementation underneath the Commons Logging, or Log4j or java.util.logging frameworks.
CBE Summary
All in all these technologies help put some concrete meat around the concepts of auditability and operability – surely a step in the right direction.
tags:common+base+event, event+driven+architecture, complex+event+processing, non+functional+requirements
Comments