Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

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

Status
Not open for further replies.
Sep 5, 2006
37
US
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. As I have to see how JMS works so wondering how to achieve this quickly.

Thanks
 
If the client only needs to know about any validation failures, then having the response immediately whilst leaving the db update to happen asynchronously sounds good to me. You'll need to consider what to do when the db update fails for some reason, though. Does the request get re-queued and how does the client become aware of the failure?

How is your business layer and db layer deployed? Are you using EJB's or something else?

Tim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top