468,553 Members | 1,325 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,553 developers. It's quick & easy.

Sending data over internet using web service

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

Apr 29 '06 #1
2 1911
Hi,

Jonathan Woods wrote:
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
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch
Apr 29 '06 #2
Sorry, one more thing,

Jonathan Woods wrote:
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
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch
Apr 29 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Mark | last post: by
reply views Thread by Jonathan Woods | last post: by
6 posts views Thread by globalrev | last post: by
1 post views Thread by UniDue | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.