Attachable Database Sessions for Reattachment After Connection Loss
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing database platforms face issues with orphaned server-side sessions due to connection loss or inaccessibility, leading to unstable intermediate states and requiring manual correction, especially in geographically distributed and high-activity scenarios.
Innovation Solution
Implementing attachable-and-detachable (AAD) database sessions that allow clients to detach and reattach seamlessly, enabling session continuity and management without maintaining session state, and supporting multiple clients to resume work from the same session.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If traditional database sessions are maintained on the server side, then session state can be preserved for continuity, but connection loss or inaccessibility leads to orphaned sessions and system instability
Solution Approach 1:
The patent segments the database session into two independent parts: a persistent session object stored in the database catalog and a transient client-side session handle. This segmentation allows the session state to be preserved independently of the client connection, enabling reattachment after connection loss while simplifying management by separating persistent data from transient operations.
Solution Approach 2:
The patent introduces a session object as an intermediary between the client and the database engine. This session object acts as a mediator that persists in the database catalog and can be attached to by multiple clients sequentially. The intermediary absorbs the complexity of session state management and provides a stable interface that decouples client connectivity from session continuity.
2Adaptability or versatility
If database sessions are detached from clients, then clients can resume work after connection restoration, but maintaining session state requires additional storage and management overhead
Solution Approach 1:
The patent creates a copy of the session state in the database catalog as a persistent session object. Instead of maintaining the full session state in memory for each connection, the system copies essential session information to the catalog, allowing clients to attach to the same session object multiple times without duplicating the actual data state. This copying approach enables adaptability while minimizing storage overhead.
3Adaptability or versatility
If multiple clients need to access the same database session, then work can be resumed by different clients, but session state management becomes more complex
Solution Approach 1:
The patent implements dynamic session attachment where the session object in the catalog can be attached to by multiple clients sequentially. The session handle is dynamically assigned to the current client while the underlying session object remains persistent in the catalog. This dynamic approach allows flexible multi-client access while centralizing session state management in the database engine, reducing overall system complexity.
Data Source
AI summary
In an embodiment, a database platform maintains a first account and a second account, where the second account has stored therein an attachable-and-detachable database session. The database platform receives, from a second-account user in the second account, a request to grant, to a first-account user in the first account, access to the attachable-and-detachable database session, and responsively grants the requested access. The database platform receives, from the first-account user, an attachment request requesting that the first-account user attach to the attachable-and-detachable database session, and responsively sets the attachable-and-detachable database session as a current database session for the first-account user. The database platform executes at least one command received from the first-account user with respect to the attachable-and-detachable database session.


