Error recovery in a client/server application using two independent sockets for communication
First Claim
1. A method for detecting a failure at a first host having a first socket and a second socket, wherein the first host'"'"'s first socket is used for sending requests to a second host'"'"'s first socket, and receiving responses from the second host'"'"'s first socket, and the first host'"'"'s second socket is used for receiving requests from the second host'"'"'s second socket, and sending responses to the second host'"'"'s second socket, comprising:
- detecting when a failure condition occurs at the first host'"'"'s second socket, and, when the failure condition is detected;
attempting to send a communication from the first host'"'"'s first socket to the second host'"'"'s first socket;
if the attempt to send succeeds, closing the first host'"'"'s second socket, then attempting to reconnect the first host'"'"'s second socket; and
if the attempt to reconnect succeeds, setting an internal state to indicate that normal operation is resumed.
1 Assignment
0 Petitions
Accused Products
Abstract
A technique for recovering from a socket error at a computer host. The host opens two sockets for communicating with respective sockets at another host. Failure recovery processes are provided for a client host on its server-initiated receive socket and its client-initiated send socket, and for a server host on its server-initiated receive socket and its client-initiated send socket. A failure may be cause by an operating system error, a lack of communication at the socket, or removal or failure of a communication medium such as a cable. When a failure condition is detected at one socket, the host attempts to use the other socket. If the other socket can be used, an attempt is made to reconnect the failed socket. An internal state is set at the host denoting a normal mode or an attempt to recover mode.
40 Citations
30 Claims
-
1. A method for detecting a failure at a first host having a first socket and a second socket, wherein the first host'"'"'s first socket is used for sending requests to a second host'"'"'s first socket, and receiving responses from the second host'"'"'s first socket, and the first host'"'"'s second socket is used for receiving requests from the second host'"'"'s second socket, and sending responses to the second host'"'"'s second socket, comprising:
-
detecting when a failure condition occurs at the first host'"'"'s second socket, and, when the failure condition is detected;
attempting to send a communication from the first host'"'"'s first socket to the second host'"'"'s first socket;
if the attempt to send succeeds, closing the first host'"'"'s second socket, then attempting to reconnect the first host'"'"'s second socket; and
if the attempt to reconnect succeeds, setting an internal state to indicate that normal operation is resumed. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A first host, comprising:
-
a first socket and a second socket;
wherein the first host'"'"'s first socket is used for sending requests to a second host'"'"'s first socket, and receiving responses from the second host'"'"'s first socket, and the first host'"'"'s second socket is used for receiving requests from the second host'"'"'s second socket, and sending responses to the second host'"'"'s second socket;
a memory for storing software instructions; and
a control associated with the memory for executing the software instructions for;
detecting when a failure condition occurs at the first host'"'"'s second socket, and, when the failure condition is detected;
attempting to send a communication from the first host'"'"'s first socket to the second host'"'"'s first socket;
if the attempt to send succeeds, closing the first host'"'"'s second socket, then attempting to reconnect the first host'"'"'s second socket; and
if the attempt to reconnect succeeds, setting an internal state to indicate that normal operation is resumed.
-
-
8. A program storage device, tangibly embodying a program of instructions executable by a first host to perform a method for detecting a failure, the first host having a first socket and a second socket, wherein the first host'"'"'s first socket is used for sending requests to a second host'"'"'s first socket, and receiving responses from the second host'"'"'s first socket, and the first host'"'"'s second socket is used for receiving requests from the second host'"'"'s second socket, and sending responses to the second host'"'"'s second socket, the method comprising:
-
detecting when a failure condition occurs at the first host'"'"'s second socket, and, when the failure condition is detected;
attempting to send a communication from the first host'"'"'s first socket to the second host'"'"'s first socket;
if the attempt to send succeeds, closing the first host'"'"'s second socket, then attempting to reconnect the first host'"'"'s second socket; and
if the attempt to reconnect succeeds, setting an internal state to indicate that normal operation is resumed.
-
-
9. A method for detecting a failure at a first host having a first socket and a second socket, wherein the first host'"'"'s first socket is used for sending requests to a second host'"'"'s first socket, and receiving responses from the second host'"'"'s first socket, and the first host'"'"'s second socket is used for receiving requests from the second host'"'"'s second socket, and sending responses to the second host'"'"'s second socket, the method comprising:
-
detecting when a failure condition occurs at the first host'"'"'s first socket, and, when the failure condition is detected;
checking an internal state to determine whether the first host is attempting to recover from a failure condition detected at the first host'"'"'s second socket;
if the internal state indicates the first host is attempting to recover, allowing the first host to attempt to recover;
if the internal state indicates the first host is not attempting to recover, attempting to reconnect the first host'"'"'s first socket; and
if the attempt to reconnect succeeds, setting an internal state to indicate that normal operation is resumed. - View Dependent Claims (10, 11, 12, 13)
-
-
14. A first host, comprising:
-
a first socket and a second socket;
wherein the first host'"'"'s first socket is used for sending requests to a second host'"'"'s first socket, and receiving responses from the second host'"'"'s first socket, and the first host'"'"'s second socket is used for receiving requests from the second host'"'"'s second socket, and sending responses to the second host'"'"'s second socket;
a memory for storing software instructions; and
a control associated with the memory for executing the software instructions for;
detecting when a failure condition occurs at the first host'"'"'s first socket, and, when the failure condition is detected;
checking an internal state to determine whether the first host is attempting to recover from a failure condition detected at the first host'"'"'s second socket;
if the internal state indicates the first host is attempting to recover, allowing the first host to attempt to recover;
if the internal state indicates the first host is not attempting to recover, attempting to reconnect the first host'"'"'s first socket; and
if the attempt to reconnect succeeds, setting an internal state to indicate that normal operation is resumed.
-
-
15. A program storage device, tangibly embodying a program of instructions executable by a first host to perform a method for detecting a failure, the first host having a first socket and a second socket, wherein the first host'"'"'s first socket is used for sending requests to a second host'"'"'s first socket, and receiving responses from the second host'"'"'s first socket, and the first host'"'"'s second socket is used for receiving requests from the second host'"'"'s second socket, and sending responses to the second host'"'"'s second socket, the method comprising:
-
detecting when a failure condition occurs at the first host'"'"'s first socket, and, when the failure condition is detected;
checking an internal state to determine whether the first host is attempting to recover from a failure condition detected at the first host'"'"'s second socket;
if the internal state indicates the first host is attempting to recover, allowing the first host to attempt to recover;
if the internal state indicates the first host is not attempting to recover, attempting to reconnect the first host'"'"'s first socket; and
if the attempt to reconnect succeeds, setting an internal state to indicate that normal operation is resumed.
-
-
16. A method for detecting a failure at a first host, the first host having a first socket and a second socket, wherein the first host'"'"'s first socket is used for receiving requests from a second host'"'"'s first socket, and sending responses to the second host'"'"'s first socket, and the first host'"'"'s second socket is used for sending requests to the second host'"'"'s second socket, and receiving responses from the second host'"'"'s second socket, the method comprising:
-
detecting when a failure condition occurs at the first host'"'"'s first socket, and, when the failure condition is detected;
checking an internal state to determine whether the first host is attempting to recover from a failure condition detected at the first host'"'"'s second socket;
if the internal state indicates the first host is attempting to recover, allowing the first host to attempt to recover;
if the internal state indicates the first host is not attempting to recover, closing the first host'"'"'s first socket and waiting for the second host to reconnect the first host'"'"'s first socket; and
if the attempt to reconnect succeeds, setting an internal state to indicate that normal operation is resumed. - View Dependent Claims (17, 18, 19, 20)
-
-
21. A first host, comprising:
-
a first socket and a second socket;
wherein the first host'"'"'s first socket is used for receiving requests from a second host'"'"'s first socket, and sending responses to the second host'"'"'s first socket, and the first host'"'"'s second socket is used for sending requests to the second host'"'"'s second socket, and receiving responses from the second host'"'"'s second socket;
a memory for storing software instructions; and
a control associated with the memory for executing the software instructions for;
detecting when a failure condition occurs at the first host'"'"'s first socket, and, when the failure condition is detected;
checking an internal state to determine whether the first host is attempting to recover from a failure condition detected at the first host'"'"'s second socket;
if the internal state indicates the first host is attempting to recover, allowing the first host to attempt to recover;
if the internal state indicates the first host is not attempting to recover, closing the first host'"'"'s first socket and waiting for the second host to reconnect the first host'"'"'s first socket; and
if the attempt to reconnect succeeds, setting an internal state to indicate that normal operation is resumed.
-
-
22. A program storage device, tangibly embodying a program of instructions executable by a first host to perform a method for detecting a failure, the first host having a first socket and a second socket, wherein the first host'"'"'s first socket is used for receiving requests from a second host'"'"'s first socket, and sending responses to the second host'"'"'s first socket, and the first host'"'"'s second socket is used for sending requests to the second host'"'"'s second socket, and receiving responses from the second host'"'"'s second socket, the method comprising:
-
detecting when a failure condition occurs at the first host'"'"'s first socket, and, when the failure condition is detected;
checking an internal state to determine whether the first host is attempting to recover from a failure condition detected at the first host'"'"'s second socket;
if the internal state indicates the first host is attempting to recover, allowing the first host to attempt to recover;
if the internal state indicates the first host is not attempting to recover, closing the first host'"'"'s first socket and waiting for the second host to reconnect the first host'"'"'s first socket; and
if the attempt to reconnect succeeds, setting an internal state to indicate that normal operation is resumed.
-
-
23. A method for detecting a failure at a first host, the first host having a first socket and a second socket, wherein the first host'"'"'s first socket is used for receiving requests from a second host'"'"'s first socket, and sending responses to the second host'"'"'s first socket, and the first host'"'"'s second socket is used for sending requests to the second host'"'"'s second socket, and receiving responses from the second host'"'"'s second socket, the method comprising:
-
detecting when a failure condition occurs at the first host'"'"'s second socket, and, when the failure condition is detected;
attempting to send a communication from the first host'"'"'s first socket to the second host'"'"'s first socket;
if the attempt to send succeeds, closing the first host'"'"'s second socket and waiting for the second host to reconnect the first host'"'"'s second socket; and
if the attempt to reconnect succeeds, setting an internal state to indicate that normal operation is resumed. - View Dependent Claims (24, 25, 26, 27, 28)
-
-
29. A first host, comprising:
-
a first socket and a second socket;
wherein the first host'"'"'s first socket is used for receiving requests from a second host'"'"'s first socket, and sending responses to the second host'"'"'s first socket, and the first host'"'"'s second socket is used for sending requests to the second host'"'"'s second socket, and receiving responses from the second host'"'"'s second socket;
a memory for storing software instructions; and
a control associated with the memory for executing the software instructions for;
detecting when a failure condition occurs at the first host'"'"'s second socket, and, when the failure condition is detected;
attempting to send a communication from the first host'"'"'s first socket to the second host'"'"'s first socket;
if the attempt to send succeeds, closing the first host'"'"'s second socket and waiting for the second host to reconnect the first host'"'"'s second socket; and
if the attempt to reconnect succeeds, setting an internal state to indicate that normal operation is resumed.
-
-
30. A program storage device, tangibly embodying a program of instructions executable by a first host to perform a method for detecting a failure, the first host having a first socket and a second socket, wherein the first host'"'"'s first socket is used for receiving requests from a second host'"'"'s first socket, and sending responses to the second host'"'"'s first socket, and the first host'"'"'s second socket is used for sending requests to the second host'"'"'s second socket, and receiving responses from the second host'"'"'s second socket, the method comprising:
-
detecting when a failure condition occurs at the first host'"'"'s second socket, and, when the failure condition is detected;
attempting to send a communication from the first host'"'"'s first socket to the second host'"'"'s first socket;
if the attempt to send succeeds, closing the first host'"'"'s second socket and waiting for the second host to reconnect the first host'"'"'s second socket; and
if the attempt to reconnect succeeds, setting an internal state to indicate that normal operation is resumed.
-
Specification