The present invention relates to data caching database queries and more particularly to query processing in an in memory data grid (IMDG).
Database query processing refers to the receipt and execution of data queries against a database. Flat file databases generally process queries in accordance with a key used to locate matching records and to return the matching records to the requestor. To the extent that data is to be culled from different related records, a series of queries are required to located different keys in different database tables so as to ultimately return the desired set of data. Relational databases improve upon flat file databases by permitting the logical joining together of different tables so as to execute a single query against the joined set of tables in order to produce a desired set of data.
An in memory data grid (IMDG) is a highly distributable form of a database that permits parallel processing across a set of disparately located computing devices. The use of an IMDG permits substantial parallelization of database operations and, in consequence, efficient utilization of unused processing resources in each host computing device supporting the IMDG. To the extent that data in the IMDG is highly distributed, relational database concepts cannot be effectively applied. Thus, though highly scalable, database operations in an IMDG are substantially granular and numerous in comparison to that of a traditional relational database.
Traditional database technologies, including flat file and relational database technologies make extensive use of caching to enhance the performance of database queries. As it is well-known, caching is a predictive concept in which previously retrieved data resulting from one or more queries can be stored in local memory and returned, when applicable, to a requestor without requiring the re-execution of the queries against the database. Typical algorithms for determining when data is to be cached (and also evicted from the cache) includes the most frequently used algorithm and the most recently used algorithm, to name two examples.
The IMDG, however, does not make use of traditional caching, principally because of the unpredictable number of nodes in the grid supporting the IMDG and the fragmented nature of data queries across the different nodes of the IMDG. Further, to the extent that numerous small queries can be required to achieve a single relational query in the IMDG, the process of caching and cache retrieval can become unwieldy. Finally, unlike the circumstance in a relational database where the ultimate data retrieved and returned to the requestor can be readily related to the underlying query, the cascade of requisite small queries to achieve a single query results in an IMDG can cloud the connection between individual, small query results and the ultimate desired query.
Embodiments of the present invention address deficiencies of the art in respect to caching database queries and provide a novel and non-obvious method, system and computer program product for autonomic caching in an IMDG. In an embodiment of the invention, a method for autonomic caching in an IMDG has been provided. The method includes receiving from a client of the IMDG a request for a primary query in the IMDG. The method also includes associating the primary query with a previously requested sub-query related to the primary query. Finally, the method includes directing the sub-query concurrently with a directing of the primary query without waiting to receive a request for the sub-query from the client. In this way, the method can proactively predict a receipt of the request for a sub-query following a request for a primary query prior the actual receipt of the request for the sub-query.
In another embodiment of the invention, an IMDG data processing system can be provided. The system can include a host computing system that includes one or more computers each with at least one processor and memory. The system also includes an IMDG disposed in the host computing system. Finally, the system includes a proxy cache module. The module includes program code that has been enabled upon execution in the memory of the host computing system to receive from a client of the IMDG a request for a primary query in the IMDG, to associate the primary query with a previously requested sub-query related to the primary query, and to direct the sub-query concurrently with a directing of the primary query without waiting to receive a request for the sub-query from the client.
Additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The aspects of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the appended claims. It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
The accompanying drawings, which are incorporated in and constitute part of this specification, illustrate embodiments of the invention and together with the description, serve to explain the principles of the invention. The embodiments illustrated herein are presently preferred, it being understood, however, that the invention is not limited to the precise arrangements and instrumentalities shown, wherein:
Embodiments of the invention provide for autonomic caching in an IMDG. In accordance with an embodiment of the invention, different primary queries individually can be mapped to one or more respectively different sub-queries related to the primary queries in association with an IMDG. For example, whenever a sub-query is requested in an IMDG using a portion of a result set from a previously requested primary query, the sub-query can be determined to relate to the primary query. Subsequently, when a primary query is received in the IMDG that maps to a related sub-query, concurrent with the processing of the primary query and prior to the request of the related sub-query, the mapped sub-query can be directed and results cached for use subsequent to the completion of the primary query. In this way, the related sub-query can be predictively directed without waiting for the completion of the primary query thus providing substantial temporal performance advantages.
In further illustration,
The process described in connection with
An IMDG proxy 210 can execute in the memory of the host computing system 220. The IMDG proxy 210 can be configured to receive queries directed by the client 230 to the IMDG and to process the same on behalf of the client 230. Further, the IMDG proxy 210 can access a cache (not shown) in which query results from the IMDG can be stored prior to providing the query results to the requesting client 230. Of note, a proxy query cache module 290 can be coupled to the IMDG proxy 210 and can execute in the memory of the host computing system 220. In particular, the proxy query cache module 290 can include program code that when executed in the memory of the host computing system 220 can locate within a query/sub-query table 280 an association between an initial query received from the client 230 and one or more sub-queries. To the extent that one or more sub-queries can be located in association with a received initial query, the program code of the proxy query cache module can direct the one or more sub-queries to the IMDG concurrent with the directing of the initial query to the IMDG. Finally, the program code of the proxy query cache module 290 can cache results received from the initial query and one or more sub-queries for return to the client 230.
Of import, the association between one or more sub-queries and a received initial query can be stored in the query/sub-query table 280 either manually or through an autonomic process 200 in which the association is determined programmatically. In this regard, to identify associations between sub-queries and initial queries, sub-queries directed in the IMDG can be associated through the autonomic process 200 with a corresponding initial query when the sub-queries act upon values in fields of a result produced by the initial query. Thus, over time the query/sub-query table 280 can be constructed dynamically as initial queries and follow-on sub-queries are directed in the IMDG.
In even yet further illustration of the operation of the proxy query cache module 290,
If it is determined that the IMDG has sufficiently available processing resources to handle additional query processing, in block 340 it can be determined whether or not one or more sub-queries can be identified as having been previously associated with the primary query. In decision block 350, one or more sub-queries can be located that have been previously associated with the primary query, in block 360 each located sub-query can be directed for processing in the IMDG and in block 370 any results of the query can be cached as can any results received from the primary query in block 380. Finally, in block 390 the process can complete.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or computer program product. Accordingly, aspects of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, micro-code, etc.) or an embodiment combining software and hardware aspects that may all generally be referred to herein as a “circuit,” “module” or “system.” Furthermore, aspects of the present invention may take the form of a computer program product embodied in one or more computer readable medium(s) having computer readable program code embodied thereon.
Any combination of one or more computer readable medium(s) may be utilized. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, radiofrequency, and the like, or any suitable combination of the foregoing. Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language and conventional procedural programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider).
Aspects of the present invention have been described above with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. In this regard, the flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. For instance, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
It also will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer readable medium that can direct a computer, other programmable data processing apparatus, or other devices to function in a particular manner, such that the instructions stored in the computer readable medium produce an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks. The computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
Finally, the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the singular forms “a”, “an” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms “comprises” and/or “comprising,” when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
The corresponding structures, materials, acts, and equivalents of all means or step plus function elements in the claims below are intended to include any structure, material, or act for performing the function in combination with other claimed elements as specifically claimed. The description of the present invention has been presented for purposes of illustration and description, but is not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the invention. The embodiment was chosen and described in order to best explain the principles of the invention and the practical application, and to enable others of ordinary skill in the art to understand the invention for various embodiments with various modifications as are suited to the particular use contemplated.
Having thus described the invention of the present application in detail and by reference to embodiments thereof, it will be apparent that modifications and variations are possible without departing from the scope of the invention defined in the appended claims as follows.
This application is a Continuation of U.S. patent application Ser. No. 14/990,764, filed Jan. 7, 2016, which is a Continuation of U.S. patent application Ser. No. 13/421,764, filed Mar. 15, 2012, the entirety of each which is incorporated herein by reference.
Number | Name | Date | Kind |
---|---|---|---|
5668987 | Schneider | Sep 1997 | A |
6466931 | Attaluri | Oct 2002 | B1 |
6519592 | Getchius | Feb 2003 | B1 |
6601062 | Deshpande | Jul 2003 | B1 |
6901410 | Marrón | May 2005 | B2 |
7089228 | Arnold | Aug 2006 | B2 |
7228300 | Lei | Jun 2007 | B2 |
7299221 | Alpha | Nov 2007 | B2 |
7302425 | Bernstein | Nov 2007 | B1 |
7467131 | Gharachorloo | Dec 2008 | B1 |
7548908 | Fu | Jun 2009 | B2 |
7640230 | Hanson | Dec 2009 | B2 |
7676453 | Ozbutun | Mar 2010 | B2 |
7743053 | Al-Omari | Jun 2010 | B2 |
7793308 | Gusler | Sep 2010 | B2 |
7984043 | Waas | Jul 2011 | B1 |
8027854 | Baggett | Sep 2011 | B2 |
8156109 | Kamvar | Apr 2012 | B2 |
8271537 | Schabenberger | Sep 2012 | B2 |
8386508 | Krishnamoorthy | Feb 2013 | B2 |
8825805 | Gollapudi | Sep 2014 | B2 |
9245004 | Kamvar | Jan 2016 | B1 |
9251209 | Bhogal | Feb 2016 | B2 |
10540353 | Bhogal | Jan 2020 | B2 |
20040254947 | Dombroski | Dec 2004 | A1 |
20060122976 | Baluja | Jun 2006 | A1 |
20060161541 | Cencini | Jul 2006 | A1 |
20060271557 | Harward | Nov 2006 | A1 |
20070055650 | Duncan | Mar 2007 | A1 |
20080077557 | Schneider | Mar 2008 | A1 |
20080098041 | Chidambaran | Apr 2008 | A1 |
20090037382 | Ansari | Feb 2009 | A1 |
20100100556 | Correll, Jr. | Apr 2010 | A1 |
20110041006 | Fowler | Feb 2011 | A1 |
20110055202 | Heimendinger | Mar 2011 | A1 |
20110072017 | Pragada | Mar 2011 | A1 |
20110072217 | Hoang | Mar 2011 | A1 |
20110113031 | Oliver | May 2011 | A1 |
20120084315 | Schneider | Apr 2012 | A1 |
20120158723 | Wu | Jun 2012 | A1 |
20120246190 | Surtani | Sep 2012 | A1 |
20130019000 | Markus | Jan 2013 | A1 |
20130073538 | Beerbower | Mar 2013 | A1 |
20130262443 | Leida | Oct 2013 | A1 |
Entry |
---|
Ahn et al., “SEOF: An Adaptable Object Prefetch Policy For Object-Oriented Database Systems”, Published in: Proceedings 13th International Conference on Data Engineering, Apr. 7-11, 1997, IEEE, Birmingham, UK, DOI: 10.1109/ICDE.1997.581734, 10 pages, <https://ieeexplore.ieee.org/document/581734>. |
Lempel et al., “Predictive Caching and Prefetching of Query Results in Search Engines”, Copyright is held by the author/owner(s), WWW2003, May 20-24, 2003, Budapest, Hungary, ACM 1-58113-680-3/03/0005, 18 pages, <http://www2003.org/cdrom/papers/refereed/p017/p17-lempel.html>. |
Palmer et al., “Predictive Caching”, Department of Computer Science, Brown University, Providence, RI, Technical Report No. CS-90-29, Nov. 1990, 31 pages, <ftp://ftp.cs.brown.edu/pub/techreports/90/cs90-29.pdf>. |
Smith, Alan Jay, “Sequentiality and prefetching in database systems”, ACM Digital Library, ACM Transactions on Database Systems, vol. 3, No. 3, Sep. 1978, pp. 223-247, <http://portal.acm.org/citation.cfm?d=320276&dI=ACM&coll=DL&CFID=26291824&CFTOKEN=59794525>. |
Yang et al., “Model Based Predictive Prefetching”, DEXA '01: Proceedings of the 12th International Workshop on Database and Expert Systems Applications, Sep. 2001, pp. 291-295, <http://portal.acm.org/citation.cfm?d=679003>. |
“NoSQL”, Wikipedia, last edited on Jul. 12, 2021,12 pages, <https://en.wikipedia.org/wiki/NoSQL>. |
Number | Date | Country | |
---|---|---|---|
20200089678 A1 | Mar 2020 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 14990764 | Jan 2016 | US |
Child | 16689066 | US | |
Parent | 13421764 | Mar 2012 | US |
Child | 14990764 | US |