Database Connection Termination via Enforcement Point
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for terminating database connections in case of anomalies often result in uncertain states for both database server and client, leading to potential idle states and reconnections due to termination at the data transportation layer.
Innovation Solution
A system and method that continuously monitors database connections, compares information with predefined rules, and sends a termination packet with an error message to the client, while also resetting the database server to ensure a graceful termination of connections through the application layer, using a processor and memory to implement these operations.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If database connection is terminated at the data transportation layer (TCP level), then the connection is forcefully closed, but the database server and client are left in an uncertain idle state and may require reconnection
Solution Approach 1:
The patent introduces an intermediary termination mechanism that operates at the application layer between the TCP layer and database protocols. This intermediary sends structured termination packets with clear error messages to both the database server and client, mediating the termination process to ensure both parties understand the connection is being closed intentionally rather than due to a communication error, thus preventing unnecessary reconnections
Solution Approach 2:
Before actually closing the TCP connection, the patent sends preliminary termination packets to both the database server and client indicating that a termination is coming. This allows both parties to prepare for the connection closure, clear their buffers, and understand the reason for termination, preventing them from being left in an uncertain idle state
2Productivity
If TCP connection is reset to terminate database connection, then the connection is immediately closed, but it may be detected as a communication error on the client side resulting in database reconnection
Solution Approach 1:
The patent sends termination packets to both the database server and client before closing the TCP connection. These packets contain error messages indicating intentional termination, allowing the client to distinguish between intentional termination and communication errors, thus preventing unnecessary reconnections while maintaining fast termination
Solution Approach 2:
The termination mechanism provides feedback to both the database server and client about the termination reason through structured error messages in the termination packets. This feedback loop ensures both parties understand the connection is being closed intentionally, improving error detection accuracy without sacrificing termination speed
Data Source
AI summary
Embodiments provide a computer implemented method in a data processing comprising a processor and a memory including instructions, which are executed by the processor to cause the processor to implement the method of terminating a connection between a database server and a database client through an enforcement point, the method including: continuously monitoring, by the enforcement point, information related to a connection to a database, and parsing one or more queries; continuously comparing, by the enforcement point, the information with a predefined plurality of rules, and checking whether there is a rule violation; if there is a rule violation, assembling, by the enforcement point, a termination packet including an error message indicative of the rule violation; sending, by the enforcement point, the termination packet to the database client; and terminating, by the enforcement point, a connection between the enforcement point and the database client.


