# US 10,120,897 B2 · Interception of database queries for delegation to an in memory data grid

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 10,120,897 B2
- Document ID: US10120897B2
- Status: Granted
- Kind: B2
- Application number: 13/154,407
- Filed: 2011-06-06
- Published: 2012-12-06
- Granted: 2018-11-06
- Earliest claimed: 2011-06-06
- Assignees: International Business Machines Corporation
- Applicants: Snehal S. Antani; Kulvir S. Bhogal; Nitin Gaur; Christopher D. Johnson
- Inventors: Snehal S. Antani; Kulvir S. Bhogal; Nitin Gaur; Christopher D. Johnson
- Web page: https://patentgrep.com/patent/US10120897B2

## CPC

- G06F 16/24532: {of parallel queries}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Embodiments of the present invention provide a method, system and computer program product for the seamless integration of an application with an in memory data grid. In an embodiment of the invention, a method for intercepting database queries from a computer program for delegation to an in memory data grid is provided. The method includes retrieving database queries from a database driver for a database management system from a requesting computer program and comparing at least a portion of each of the database queries to a listing of database queries. Thereafter, the database queries are selectively routed to a data grid, such as an in memory data grid, in lieu of the database management based upon the comparison.

## Claims

### Claim 1

A method for intercepting database queries from a computer program for delegation to an in memory data grid, the method comprising:
enabling a client database driver for a database management system to delegate database queries from interfacing with a database to interfacing with an in memory data grid;
retrieving database queries from the enabled client database driver from a requesting computer program;
comparing at least a portion of each of the retrieved database queries to a listing of database queries that have been a priori determined for routing onto the in memory data grid; and,
selectively delegating the retrieved database queries to the in memory data grid in lieu of the database management system based upon the comparison and on condition that one of the retrieved database queries is delegated to the in memory data grid in lieu of the database management system, determining a fetch routine from the query routing list from the listing of database queries.

### Claim 2 (depends on 1)

The method of claim 1, wherein the client database driver is a Java Database Connectivity (JDBC) driver.

### Claim 3 (depends on 1)

The method of claim 1, wherein the database driver is included as part of the computer program.

### Claim 4 (depends on 1)

The method of claim 1, wherein selectively routing the database queries to a data grid in lieu of the database management based upon the comparison, comprises routing to the data grid only those of the database queries that are included in the listing of database queries.

### Claim 5 (depends on 1)

The method of claim 1, wherein selectively routing the database queries to a data grid in lieu of the database management based upon the comparison, comprises routing to the database management system only those of the database queries that are included in the listing of database queries.

### Claim 6 (depends on 1)

The method of claim 1, wherein selectively routing the database queries to a data grid in lieu of the database management based upon the comparison, comprises routing to the data grid only those of the database queries that are included in the listing of database queries and only when the data grid is determined not have been contemporaneously utilized above a threshold level.

### Claim 7 (depends on 1)

The method of claim 1, wherein selectively routing the database queries to a data grid in lieu of the database management based upon the comparison, comprises routing to the data grid only those of the database queries that are included in the listing of database queries using a correspondingly specified data grid handler in the listing of the database queries.

### Claim 8

A method for use with a client database driver that selectively forwards incoming database queries to one of the following recipient components:
a database or an in memory data grid, the method comprising:
receiving, by the client database driver, a grid eligible query type data set including information indicative of query types that are eligible to be sent to the in memory data grid instead of to the database;
receiving, by the client database driver, a new database query;
determining, by the client database driver and based upon the grid eligible query type data set, that the new database query is of a query type such that the new database query is a grid-eligible database query that is eligible to be sent to the in memory data grid;
responsive to the determination that the new database query is a grid-eligible query, determining, by the client database driver, a utilization level value of the in memory data grid;
comparing, by the client database driver, the utilization level value of the in memory data grid to a predetermined threshold value to determine that the utilization level value is higher than the predetermined threshold value; and
responsive to the determination that the utilization level value is higher than the threshold value, forwarding, by the client database driver, the grid-eligible database query to the database instead of to the in memory data grid.

### Claim 9 (depends on 8)

The method of claim 8, wherein the grid eligible query type data set includes a grid handler.

### Claim 10 (depends on 8)

The method of claim 8, further comprising:
receiving, by client database driver, over a communication network and from the database, query results; and
forwarding, by client database driver, over a communication network and to a requesting device, the query results.

### Claim 11

A method for use with a client database driver that selectively forwards incoming database queries to one of the following recipient components: a database or an in memory data grid, the method comprising:
receiving, by the client database driver, a grid eligible query type data set including information indicative of query types that are eligible to be sent to the in memory data grid instead of to the database;
receiving, by the client database driver, a new database query;
determining, by the client database driver and based upon the grid eligible query type data set, that the new database query is of a query type such that the new database query is a grid-eligible database query that is eligible to be sent to the in memory data grid;
responsive to the determination that the new database query is a grid-eligible query, determining, by the client database driver, a utilization level value of the in memory data grid;
comparing, by the client database driver, the utilization level value of the in memory data grid to a predetermined threshold value to determine that the utilization level value is lower than the predetermined threshold value; and
responsive to the determination that the utilization level value is lower than the predetermined threshold value, forwarding, by the client database driver, the grid-eligible database query to the in memory data grid instead of to the database.

### Claim 12 (depends on 11)

The method of claim 11, wherein the grid eligible query type data set includes a grid handler.

### Claim 13 (depends on 11)

The method of claim 11, further comprising:
receiving, by client database driver, over a communication network and from the in memory data grid, query results; and
forwarding, by client database driver, over a communication network and to a requesting device, the query results.
