a simple and theoric question, the answer is probably one, but I would like to listen to some opinions and suggestions. I am in need of realizing a web services (in java) that will launch a time consuming process, which is going to parse some input file and do dome db staff.
What are the best approach to let the user knows that the whole process not only started, but came to an end, with parsing, updating db... ? Because I cannot hang the user waiting for the whole process to finish.
Note: the user is authenticated before starting the process.
EDIT: the web service is accessed not only via web browser, but clients can access it with any client built with the language they want, as long as they refer to the wsdl.
thanks
For your scenario, You should implement asynchronous web services. With asynchronous web services, you have two options.
The first approach is easy to implement and it would work with many WS- libraries. However this comes with a drawback of your server having to waste bandwidth for client's polling requests. After all, it's polling. and most of the times, polling is a bad idea.
The latter one wouldn't be as straightforward as the former one to implement. And you I don't know if every JAX-WS library would support it. To support you, i did a quick google search and found this link.
http://www.developer.com/java/web/article.php/3863416/Using-Axis2-and-Java-for-Asynchronous-Web-Service-Invocation-on-the-Client-Side.htm
That might help you a little.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With