Heartbeat Channel Disconnection for Data Communication Failure
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In distributed systems, when data channels become disconnected, heartbeat channels remain active, leading to tasks being suspended indefinitely as the master process assumes the worker process is operational, causing system operation disruptions and resource occupation.
Innovation Solution
A method and system that associate heartbeat channels with data channels, detecting disconnections in data channels and disconnecting the heartbeat channel when a data channel is found to be disconnected, thereby ending the current task to maintain state consistency and prevent resource occupation.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the heartbeat channel remains connected independently of data channels, then the heartbeat communication can continue to synchronize states, but the system cannot detect actual data communication failures and tasks remain suspended indefinitely
Solution Approach 1:
The patent merges the state management of heartbeat channels and data channels by making the heartbeat channel's connection state dependent on the data channel's connection state. When the data channel disconnects, the heartbeat channel is automatically closed, ensuring that the system accurately reflects the actual communication status. This resolves the contradiction by combining the reliability of heartbeat communication with accurate disconnection detection.
Solution Approach 2:
The patent implements feedback by continuously monitoring the data channel's connection state and using this information to control the heartbeat channel's state. The system feeds back the data channel's disconnection status to the heartbeat channel, causing it to close when the data channel is disconnected. This feedback mechanism ensures that the heartbeat channel accurately reflects the actual communication status, resolving the contradiction between maintaining heartbeat reliability and detecting data channel failures.
2Stability of the object's composition
If the heartbeat channel stays active while data channels are disconnected, then state synchronization can continue, but system resources are occupied and normal operation is disrupted
Solution Approach 1:
The patent makes the heartbeat channel's state dynamic by linking it to the data channel's connection state. Instead of maintaining a static active state, the heartbeat channel automatically adjusts its state based on data channel conditions. When the data channel disconnects, the heartbeat channel transitions to a closed state, releasing system resources. This dynamic behavior resolves the contradiction between maintaining state synchronization and reducing resource occupation.
3Productivity
If data channels are monitored independently without association to heartbeat channels, then data communication can proceed, but disconnection states are not detected and tasks cannot be ended timely
Solution Approach 1:
The patent implements preliminary action by pre-establishing the association between data channels and heartbeat channels before actual data communication occurs. This association is set up in advance so that when the data channel disconnects, the system can immediately detect the failure through the heartbeat channel's state change and end the suspended task. This preliminary association resolves the contradiction between maintaining task execution and reducing task suspension time.
Data Source
AI summary
There is provided a method and a system for processing a communication channel. Including a heartbeat channel and a data channel between a master process and a worker process. The method includes determining at least one data channel associated with a heartbeat channel, detecting the determined at least one data channel, disconnecting the heartbeat channel when it is detected that any data channel is in a disconnected state to cause a heartbeat to time out, and ending a current task after it is determined that the heartbeat times out.


