0

The project (jsf web app) that I am working on use 2 web services in order to retrieve some data from the network.

Up until now the request was small so the timeout while waiting for respond from the ws was quite short but now the costumer want to add more data to the request which basically will increase the working time in each ws by 30 minutes.

I was thinking the use jms instead of ws for this scenario

I would like to hear some opinion’s

Does it make sense ?

Thanks

angus
  • 3,210
  • 10
  • 41
  • 71
  • You're right, when a business process is going to take minutes instead of (milli)seconds, it's a good candidate for asynchronous messaging, i.e. JMS. If the actual bottleneck however is not the request processing but message transmission, look into compressing the webservice response. A webservice call that takes 30 mins, I'd look into the design to eliminate inefficiencies if I were you – kolossus Apr 16 '13 at 14:14
  • Sorry I guess I didn’t explained the scenario good enough what I mean is the process in the remote machine could take 30 minutes but the ws call is very fast – angus Apr 16 '13 at 15:13
  • What about asynchronous ws ? – angus Apr 16 '13 at 15:33
  • If it's a processing time constraint, then definitely use JMS. Fire-and-forget semantics where the client simply sends the request and receives an acknowledgement of receipt instantly. I won't recommend an Async WS design because it doesn't room for acknowledgements. In a web app, visual feedback is very important, so the webservice should at least acknowledge validity and receipt of the service invocation – kolossus Apr 16 '13 at 15:55

1 Answers1

0

Moving to asynchronous processing looks suitable in your case. You should also pay attention to transaction semantic if previously the nature of the calls was transactional.

I would highly recommend you to use Apache Camel on top of Apache ActiveMQ. While the latter is replaceable, the former is unique in its features.

For further reading:

http://en.wikipedia.org/wiki/Apache_Camel

What exactly is Apache Camel?

When to use Spring Integration vs. Camel?

Apache Camel > Documentation > Components > Spring Web Services :

http://camel.apache.org/spring-web-services.html

Community
  • 1
  • 1
Vitaly
  • 2,760
  • 2
  • 19
  • 26