Question

I'm working on a "facade webservice" and I need to rethink part of it.

The context - my webservice (let's call it "FacadeWebservice") is an internal webservice developed to hide other webservices complexity from my system:

  • My FacadeWebservice calls ExternalWebserviceA, ExternalWebserviceB and will soon need to call ExternalWebserviceC.
  • ExternalWebserviceA, ExternalWebserviceB and ExternalWebserviceC are external webservices; they're subject to change and downtime.

Complexity is getting higher and higher, and I need to rethink the way I'm monitoring my FacadeWebservice and the external webservices. I need:

  • a complete view of my application status (number of calls, error codes sent)
  • a good idea of what's going on with external webservices (external webservices downtime, reponse codes received by my webservice - for example, one of them often go "technical error / readonly" for some time)
  • basically, a simple view/tool that shows the overall status.
  • service availability is pretty much covered (so I don't need apps like Nagios), I want to know what's going on at application level.

I was thinking about using JMX within my FacadeWebservice - this could provide me some ineresting graphs and statisics.

Is it the way to go? Or a good logging strategy is plenty enough for this task (even if external changes is a big part of my problem)?

Any advice or experience on the subject?

Was it helpful?

Solution

It is quite a complex requirement but you can try JavaMelody, http://javamelody.googlecode.com

  • "application status (number of calls, error codes sent)" : yes, via number of http calls and http errors
  • "external webservices" statistics: yes, it can be done with JavaMelody via interceptors if you use EJB3 or Spring
  • JavaMelody does monitoring at application level and it has "graphs and statistics": see screenshots

OTHER TIPS

The advantage of JMX is that you can run commands and query complex data.

The disadvantage is that the standard console (which you get along with your Java version) is pretty limited. It can do anything but nothing really well.

My solution was to create a simple HTML page which shows that data. It has these advantages:

  1. I can easily format the data I want to see the way most useful for me.

  2. I can use any web browser to have a look (at home, internet cafe, mobile phone)

The main disadvantage is that it's not so easy to display complex data (like graphs and trends).

[EDIT] That said, JMX has support for displaying graphs and trends but it has no memory. So you get what's happening since you started your JMX console. If you need to be able to look into the past, you must run a JMX console somewhere all the time.

In this case, it might be more simple to add a graphics rendering module to your "simple HTML page" where you can draw what you need.

I don't know if this is an option but it looks like you need some features that are offered by ESB component:

  • Aggregation, composition and orchestration of web services
  • Monitoring (number of calls, health of proxyed web services, etc)
  • Management console
  • etc etc

Maybe you should check out something like ServiceMix that can be monitored through JMX (see Using a JMX Console with ServiceMix):

alt text
(source: apache.org)

Or other commercial tools (Mule ESB Enterprise, ALSBOracle Service Bus...).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top