I have a web service deployed and ready to use. The client application is going to use this service synchronously and extremely frequent. The amount of data returned from the web service is also considerable.
The web service client is a web application (liferay portlet). I have generated the client part with axis inside eclipse.
In my first tests, in each request I am instantiating a new ServiceProxy and calling its methods. I am not sure about robustness and reliability of this structure (making a new proxy object every single time).
I changed it to static classes with singleton proxy, but I am not sure what will happen during simultaneous calls of web application client (concurrency issues).
I want the design to decouple my web application from web service client and have something like client proxy cache (not data cache as my application is real time) or some thing similar.
I think there should be a design pattern or a best practice for web service client parts.
Looks like your web service uses HTTP protocol, so no reason to have some proxy cache or something, the connection is created on each call, so you can call your once initialized WS client instance concurrently.
But anyhow you will pay 200ms for each call (from my practice), and it is mostly XML processing if network is super.
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