David Turner
David Turner

Reputation: 5074

Multiple instances of a java web application sharing a resource

I have a web service, that takes an input xml message, transforms it, and then forwards it to another web service.

The application is deployed to two web logic app servers for performance, and resilience reasons.

I would like a single website monitoring page that allows two things

I was wondering what the best way to implement this was.

My current idea is to have an in memory database (eg Debry or HSQL) replicating data to share the information between the two (or more) instances of my application that are running in different instances of the app server. I imagine I would have to setup some sort of master/ slave configuration.

I would love a link to an article that discusses how to solve this problem.

(Note, this is a simple spring application using spring MVC)

thanks,

David.

Upvotes: 1

Views: 1444

Answers (3)

Ravi
Ravi

Reputation: 131

I think you are looking for a message queue. If you need additional monitoring, using a web service as the end point may not suffice - with regards to stop/start or forwarding of messages; monitoring http requests to web service is more cumbersome than tracking messages to a queue (even though you can do it).

If you are exposing this service to third party, then the web service will sit on top of the message queue and delegate to to it.

In my experience, RabbitMQ is a fine messaging queue service with a relatively simple learning curve.

Upvotes: 0

toolkit
toolkit

Reputation: 50247

This sounds like a good match for Java Management Extensions (JMX)

  • JMX allows you to expose certain operations (eg: start/stop forwarding messages)
  • JMX allows you to monitor certain performance indicators (eg: moving average of messages processed)

Spring has good support for exposing beans as JMX MBeans. See here for more information.

Then you could use an open-source web-based JMX console, such as jManage

Hope this helps.

Upvotes: 5

questzen
questzen

Reputation: 3287

Sounds like you are looking for a Message Queue, some MDBs and a configurable design would let you do all these. Spring has support for JMS Queues if I'm not wrong

Upvotes: 0

Related Questions