aspose file tools
The moose likes Web Services and the fly likes Web Service Processing taking too long need help in re-design Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Web Service Processing taking too long need help in re-design" Watch "Web Service Processing taking too long need help in re-design" New topic
Author

Web Service Processing taking too long need help in re-design

Mike Boota
Ranch Hand

Joined: Jul 18, 2002
Posts: 82
Hi,

Need some help on solving the following issue:

I have Web Service that takes arround 2 to 3 minutes to process. When a Consumer invokes a Web Service and then the respons
is reached after 2 or 3 minutes because the processing of the Request takes that long. Now on the consumer side it times
out and is not able to receive the response even though a response is generated on my end.

The database side processing of the request is what it takes time as I have whole bunch of Business Rules in the
PL/SQL procedures. And to the consumer if the request is successful and passes some intial data validation that's all
it needs and don't have to wait on the processing of the Database logic. So I am thinking of splitting the service
where I receive the request and do initial validation and if it passes wants to send the response to consumer as this
step only takes arround 10 seconds.

What is the best soultion to separate this logic. How can I handle a request and send the response and then continues
the remaining processing may be in a different process. Should I use JMS i.e. once the request is validated I queue the message
and right away send the response as the consumer don't have to worry what's goes on the Database side. All it needs is
success if a request is ok and initial validation passes.

Or is there any other faster way to achieve this.

Thanks


MB<br />Sun Certified Programmer for Java2 Platform
Watsh Rajneesh
Ranch Hand

Joined: Apr 17, 2006
Posts: 109
You are thinking on the right lines ie of using the JMS mechanism to refactor your synchronous interaction to asynchronous interaction. Thats a scalable way and also see this section in blueprints to use as checklist during your own implementation.


SCJP 5.0 (90%), SCDJWS 1.4 (88%), SCWCD 1.4 (82%), SCBCD 1.3 (85%)
Ashkrit Sharma
Greenhorn

Joined: Oct 05, 2006
Posts: 7
Asynchronus processing is good option,i feel you need some request id also. User can use this request id to check the status of his request using different WS call.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Web Service Processing taking too long need help in re-design
 
Similar Threads
Axis2 client - HTTP status Response
Multiple response for a request
Web server and application server
what is the difference b/w WebServer and Application Server?
Threads and DB Access