views:

15

answers:

1

I have a few specific questions about web services (SOAP over HTTP):

  1. A client calls a web service. If, in the middle of the call, the client terminates it's own connection, is the server aware that the connection was terminated?
  2. This is more of a HTTP question. Is is possible for a client to call a web service and be forced to wait for some amount of time before the processing actually occurs? For example, if I have a web service generated on a server, is it possible for the call to get stuck before it hits my implementation code? Perhaps the thread pool for the servlets are too busy? I equate this to when a website gets slammed from traffic (i.e. the Slashdot effect).

Thanks a lot!

A: 

1) Yes, when thinking of HTTP (which in nearly all cases is over Tcp), a client close() will trigger a close of communication and server connection will be released (see also Tcp protocol).

2) For most server implementations, there is a maximum size of parallel workers (e.g. thread-pool size). That is why long running server execution time can be bad, because it is blocking incoming request if all threads are busy (and clients hitting reload all over again, which makes it even more severe). The way to deal with this is setting timeouts (both on client and server side). Finding the right timeout is not trivial, it highly depends on your use-case.

manuel aldana