views:

259

answers:

3

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?

+2  A: 

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.

Aaron Digulla
Thanks for your anwser (upvoted!). Displaying complex data and trends is a big part of my requirements though.
Brian Clozel
@Aaron I didn't consider the "no memory" disadvantage of JMX. So creating a simple HTML page is a good way to go.
Brian Clozel
+1  A: 

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
evernat
Accepted! JavaMelody looks good. Seems like you're the main contributor on this project.
Brian Clozel
Yes I am the main contributor
evernat
+1  A: 
Pascal Thivent
@Pascal ESBs look great, but I think it's a bit heavy regarding my requirements.
Brian Clozel
@Brian The classic build vs buy decision can be a tough call to make... and I don't know your (future) needs better than you do so you must be right :)
Pascal Thivent