In one of my previous posts (Adding Registry Listener in PEtALS), I spoke about adding a registry listener in PEtALS ESB. In the current article, I want to introduce how I used this feature to implement a live monitoring Web application.
Here are the different modules which are used in this Live Monitoring Tool :
- PEtALS ESB. The standard behaviour has been customized by adding a registry listener and a routing module (to be detailled below).
- Monitoring layer. This layer is an independant process which embeds a WS-Notification engine.
- A WS-notification subscriber. This is the module which will receive the notifications from the monitoring layer.
- GWT based Web application used to display monitoring data.
PEtALS ESB Extensions
The role of the registry listener is to register a new monitoring endpoint into the monitoring layer when a new endpoint is available within PEtALS.
Since modules can be added dynamically inside the PEtALS message router, we have created a module which timestamp the messages. Once the message exchange is complete, a message exchange report is sent to the monitoring layer.
The monitoring is in charge of creating monitoring endpoints through a management API. Once a monitoring endpoint is created, it is also exposed as a Web service. This newly created Web service exposes a WS-notification subscribe operation.
Another role of the monitoring layer is to receive raw reports from the PEtALS ESB, to process the report in order to generate a WSDM payload which will be send to subscribers.
The subscriber subscribes, receives and stores notifications from the Monitoring layer. That’s all for that module ;o)
GWT Based Web application
The GWT Web application uses comet in order to display live service response time. The data used to display response time is the one received and stored into the database and of course the server part of the Web application have access to this database.
As a result, we have a really nice live Web application (live means that the chart gives real time result and is updated automatically when messages are exchanged within PEtALS Service Bus). Here are some screenshots :