Serving cached query results based on a query portion
First Claim
1. A method of providing query results, the method comprising:
- obtaining at a distributor server and from a user a beginning portion of a query comprising a number of characters at a beginning of the query;
determining at the distributor server whether the obtained portion of the query matches a predetermined ignore entry corresponding to a portion of the query that is to be ignored, the determining being performed prior to obtaining a succeeding portion of the query from the user;
if the obtained portion of the query matches the predetermined ignore entry corresponding to the portion of the query that is to be ignored, obtaining at the distributor server the succeeding portion of the query from the user, the succeeding portion of the query comprising a succeeding number of characters of the query immediately after the beginning of the query, and assigning at the distributor server the portion of the query comprising the beginning portion of the query followed by the succeeding portion of the query to a front-end server;
if the obtained portion of the query does not match the predetermined ignore entry corresponding to the portion of the query that is to be ignored, assigning at the distributor server the beginning portion of the query to a front-end server;
obtaining at the assigned front-end server and from a data structure a plurality of other queries beginning with the assigned portion of the query, the data structure including a cache of previously submitted queries, at least some of the previously submitted queries in the cache having a corresponding set of results in a results structure;
for each of the plurality of obtained queries beginning with the assigned portion of the query;
obtaining at the front-end server the corresponding set of results from the results structure if present therein;
obtaining at the front-end server the corresponding set of results from another source if the corresponding set of results is not present in the results structure;
for all of the plurality of obtained queries beginning with the assigned portion of the query, combining at the front-end server the obtained corresponding sets of results into a combined set of results; and
returning the combined set of results from the front-end server to the user,wherein the assigned portion of the query is assigned by the distributor server to one of a plurality of front-end servers, the assigning of the assigned portion of the query to one of the plurality of front-end servers comprising;
applying the assigned portion of the query to a hash function to obtain a hash result; and
applying the hash result to a mapping function to obtain a mapping result comprising one of the plurality of front-end servers, the hash function and the mapping function operating to ensure that a particular assigned portion of a query is assigned to a articular one of the plurality of front-end servers.
2 Assignments
0 Petitions
Accused Products
Abstract
The embodiments contemplate a system and method for obtaining related results for a portion of a query and for generating an updated set of queries for a cache of a server. Other queries beginning with the portion of the query may be identified and obtained from a data structure that includes a server cache and a set of common queries. Once the other queries are identified, results for the other queries are obtained from the server cache or from a back-end database. A set of common queries, which may include deleted and additional queries, may be utilized to generate the updated set of queries for the server. Both missing queries and deleted queries that may belong to the server based on an assignment function are inserted into a queue, which is later delivered to the cache of the server. The transfer may occur during a low-activity or idle state.
35 Citations
20 Claims
-
1. A method of providing query results, the method comprising:
-
obtaining at a distributor server and from a user a beginning portion of a query comprising a number of characters at a beginning of the query; determining at the distributor server whether the obtained portion of the query matches a predetermined ignore entry corresponding to a portion of the query that is to be ignored, the determining being performed prior to obtaining a succeeding portion of the query from the user; if the obtained portion of the query matches the predetermined ignore entry corresponding to the portion of the query that is to be ignored, obtaining at the distributor server the succeeding portion of the query from the user, the succeeding portion of the query comprising a succeeding number of characters of the query immediately after the beginning of the query, and assigning at the distributor server the portion of the query comprising the beginning portion of the query followed by the succeeding portion of the query to a front-end server; if the obtained portion of the query does not match the predetermined ignore entry corresponding to the portion of the query that is to be ignored, assigning at the distributor server the beginning portion of the query to a front-end server; obtaining at the assigned front-end server and from a data structure a plurality of other queries beginning with the assigned portion of the query, the data structure including a cache of previously submitted queries, at least some of the previously submitted queries in the cache having a corresponding set of results in a results structure; for each of the plurality of obtained queries beginning with the assigned portion of the query; obtaining at the front-end server the corresponding set of results from the results structure if present therein; obtaining at the front-end server the corresponding set of results from another source if the corresponding set of results is not present in the results structure; for all of the plurality of obtained queries beginning with the assigned portion of the query, combining at the front-end server the obtained corresponding sets of results into a combined set of results; and returning the combined set of results from the front-end server to the user, wherein the assigned portion of the query is assigned by the distributor server to one of a plurality of front-end servers, the assigning of the assigned portion of the query to one of the plurality of front-end servers comprising; applying the assigned portion of the query to a hash function to obtain a hash result; and applying the hash result to a mapping function to obtain a mapping result comprising one of the plurality of front-end servers, the hash function and the mapping function operating to ensure that a particular assigned portion of a query is assigned to a articular one of the plurality of front-end servers. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 14, 15, 16, 17, 18, 19, 20)
-
-
10. A query system comprising:
-
a distributor server that; receives from a user a portion of a query comprising a number of characters at a beginning of the query; determines whether the obtained portion of the query matches a predetermined ignore entry corresponding to a portion of the query that is to be ignored, the determining being performed prior to obtaining a succeeding portion of the query from the user; if the obtained portion of the query matches the predetermined ignore entry corresponding to a portion of the query that is to be ignored, obtains at the distributor server the succeeding portion of the query from the user, the succeeding portion of the query comprising a succeeding number of characters of the query immediately after the beginning of the query, and assigning at the distributor server a portion of the query comprising the beginning portion of the query and the succeeding portion of the query to a front-end server; and if the obtained portion of the query does not match the predetermined ignore entry corresponding to a portion of the query that is to be ignored, assigns the beginning portion of the query to a front-end server; a data structure that stores cache queries and a set of common queries; a results structure that provides results for the cache queries and the set of common queries; and the front-end server that; obtains from the data structure a plurality of other queries beginning with the assigned portion of the query; for each of the plurality of obtained queries beginning with the assigned portion of the query; obtains at the front-end server the corresponding set of results from the results structure if present therein; obtains at the front-end server the corresponding set of results from another source if the corresponding set of results is not present in the results structure; for all of the plurality of obtained queries beginning with the assigned portion of the query, combines at the front-end server the obtained corresponding sets of results into a combined set of results; and returns the combined set of results from the front-end server to the user, the query system further comprising a plurality of the front-end servers, the assigned portion of the query being assigned by the distributor server to one of the plurality of front-end servers by; applying the assigned portion of the query to a hash function to obtain a hash result; and applying the hash result to a mapping function to obtain a mapping result comprising one of the plurality of front-end servers, the hash function and the mapping function operating to ensure that a particular assigned portion of a query is assigned to a particular one of the plurality of front-end servers. - View Dependent Claims (11, 12, 13)
-
Specification