Client-Side Command Routing in Distributed Databases
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional systems face inefficiencies in directing queries or commands from client applications to the appropriate nodes in a distributed database, leading to suboptimal performance, manageability, and availability, especially in rapid transaction processing systems with large data stores.
Innovation Solution
A client-side approach is implemented where a node-partition table is cached by the client library to dynamically direct commands to the correct node in the data grid, reducing the need for unnecessary server connections and overhead, and incorporating a dynamic mechanism to handle data reconfiguration and node updates.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If server-side partition mechanism is used to direct queries to appropriate nodes, then query routing capability is provided, but overhead and extra cost increase due to extra hops required
Solution Approach 1:
The patent inverts the conventional server-side query routing approach by implementing client-side routing. Instead of the server directing queries to nodes, the client application directly determines and routes queries to the appropriate database nodes using locally cached metadata. This inversion eliminates the extra communication hops between client-server-node, reducing overhead and latency while maintaining routing capability.
Solution Approach 2:
The system performs preliminary action by caching metadata (node-partition tables, routing information) in the client application before queries are executed. This pre-cached information enables the client to immediately determine the appropriate destination node without real-time server consultation, eliminating the need for preliminary server-side routing decisions and reducing query latency.
2Speed
If client calculates the key to identify appropriate nodes, then direct node identification is achieved, but data movement or reorganization problems occur in the database
Solution Approach 1:
The patent introduces metadata (node-partition tables, routing information) as an intermediary between the client's key calculation and the actual data location. Instead of the client directly calculating keys and potentially causing data movement issues, the client uses pre-cached metadata that maps keys to current node locations. This intermediary layer decouples key calculation from physical data location, allowing the system to handle data reorganization without affecting client operations.
3Adaptability or versatility
If partition mechanism is implemented on server side, then logical database is divided into independent parts, but overhead increases due to extra hops required
Solution Approach 1:
The patent segments the query routing function from the data storage function. The client application is segmented to include both application logic and routing logic, while the database server is segmented to handle only data operations. This segmentation allows the logical database to be partitioned across multiple nodes without requiring the server to participate in routing decisions, thereby maintaining partitioning benefits while eliminating the overhead of server-mediated routing.
Data Source
AI summary
Dynamically directing a command to a node in a distributed database is described. An example method includes receiving the command from a client application to access data in the distributed database, where the command contains a set of parameters. A primary key is constructed from at least some of the parameters. The client further generates routing information from a node-partition table based on a comparison of the primary key with an entry in the node-partition table, where the node-partition table maps the primary key to a node in the distributed database. Accordingly, the command is directed to the node in the distributed database based on the routing information.


