Sending data over internet using web service

J

Jonathan Woods

Hi there,

I have encountered problem of losing data sending over internet using
web service. I consume web service that connected Oracle Database. I
submit 687 SOAP Messages to 1 Web Method concurrently. (With
synchronize method)


[WebMethod]
public bool SubmitDPSuccessResult(string dpNo,string tkNo,string
plNo,string siteNo,int tid )


Only 253 Message can send successfully. 434 Message are lost in the
middle of sending over internet.
My question is how to reduce risk of losing data? Any factors do I need

to take into consideration? For example, internet bandwidth, firewall
settings etc.


Any suggestion and recommendation would be truly appreciated.


Regards,
Jonathan
 
L

Laurent Bugnion

Hi,

Jonathan said:
Hi there,

I have encountered problem of losing data sending over internet using
web service. I consume web service that connected Oracle Database. I
submit 687 SOAP Messages to 1 Web Method concurrently. (With
synchronize method)


[WebMethod]
public bool SubmitDPSuccessResult(string dpNo,string tkNo,string
plNo,string siteNo,int tid )


Only 253 Message can send successfully. 434 Message are lost in the
middle of sending over internet.
My question is how to reduce risk of losing data? Any factors do I need

to take into consideration? For example, internet bandwidth, firewall
settings etc.


Any suggestion and recommendation would be truly appreciated.


Regards,
Jonathan

In my experience, Web Service calls are mostly pretty safe. We tested
our web application extensively and under severe stress conditions, both
by overloading the server's CPU, by oveloading the line, by bombing the
server with reqests. our application is certified for XP and Win2003, so
we tested in both environments. Note that additionally to the web
service communication, the web server itself communicates with a remote
server using remoting over TCP or HTTP, so you can say that the whole
stuff is very intensive for communication.

To handle the few cases where communication was lost, I implemented an
error check mechanism which re-send the same request 3 times before
giving up. This is simple (the callback method of the XmlHttpObject
receives a "result" object, which has an "error" property. The error
property is true if the server didn't answer, or if it didn't understand
the request). By inspecting the result object, you can also find more
information about the error, there is a errorDetail object (only if an
error occured).

I also have a ServerError property in all the result objects I use,
which is set to true by the server for example if an exception occurs
when treating the request. Of course I also send a ServerErrorDetail,
which gives the user more information when needed.

Using this mechanism, and resending the request a few times if error or
ServerError are true, we reached a situation where our web application
runs without crashing (and without memory leaks, but that's a whole
other story ;-) during weeks, literally, with web service calls as often
as every 30 seconds, and no failure.

HTH,
Laurent
 
L

Laurent Bugnion

Sorry, one more thing,

Jonathan said:
My question is how to reduce risk of losing data? Any factors do I need

to take into consideration? For example, internet bandwidth, firewall
settings etc.

Firewall shouldn't be an issue, because all the calls are text only and
go through the port 80.

Bandwidth might be an issue, so my advice with web services is always:
keep it simple. Send short requests and short replies. Split your web
method if needed, and make more frequent but shorter calls. This should
reduce the failure rate.

BTW, using a HTTP analyzer, you can check what is sent and what is
received, and this will help you to determine the cause of the error.

HTH,
Laurent
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top