Montabert, Olivier wrote:
>>
>>true. but if you use keepalives on the TCP link you generate useless
>>traffic; if you dont your client wont ever know that the
>>server at the
>>far end has ceased to exist.
>>
>
>
> Indeed, I don't really know the underlying implementation
> that has been made for Axis...
well, step in the next time your debugger is about to make a call
> My guess of the client call underlying implementation is:
> - AXIS generates a SOAP envelope and body.
> - AXIS opens a socket to the web server (using the
> end-point URL).
> - Sends an HTTP request and waits for the reply on the
> same socket.
> [ ... No further traffic occurs ... ]
> - The reply and the socket close occurs as soon as the
> skeleton sends the reply back through the same socket.
>
> Therefore I also use the getValue operation as keepalive
> operation, as it will receive a network exception when the
> server crashes. Indeed when the server or the servlet crashes
> the socket is closed.
>
> Am I right ?
Only if you have TCP keepalives turned on.
If you dont, then the socket will wait forever until you try and send
some data down it. You will get no information that the server has
crashed, because there is nothing out there to send you a message.
Welcome to the harsh realities of network failure.
Keepalives
consume bandwith, and power on mobile systems, and are off by default.
This means your architecture does not detect server failure, not unless
it has a timeout. Keepalives are implicit health check timeouts.
1. if you go through proxies, keeping the port open will consume
resources on the server
2. keeping the port open means that you cant handle a transient failure
of the server, as the restart will lose the port
>
> Does Axis use some thread wait/notify mechanisms ?
>
> Does Axis use the user thread to perform the operation
> call ?
Olivier, the source is there for you to see, it makes blocking calls on
the socket with the thread doing the read.
liike I said originally, consider probes. At the very least something like
while(no answer) {
-make call that blocks for 60 seconds
-check for cancel event
}
|