CPC G06F 16/24542 (2019.01) [G06F 9/4881 (2013.01); G06F 16/27 (2019.01); G06F 16/9024 (2019.01)] | 20 Claims |
1. A computer-implemented method of concurrent, asynchronous query execution in a distributed environment, comprising:
receiving a first query;
maintaining a yield flag for each worker of a plurality of workers;
assigning a first subset of workers of the plurality of workers to asynchronously executing the first query on a distributed database,
wherein each worker of the first subset of workers performs a process to complete an associated task in response to the assigning, comprising:
executing a first phase of the task comprising matching a first portion of the first query with data stored in a local portion of the distributed database,
identifying a second portion of the first query to be matched with data that is unavailable in the local portion of the distributed database,
executing a second phase of the task comprising matching the second portion of the first query with data stored in a remote portion of the distributed database,
checking the yield flag for the worker at one or more points within the process, including a point of being unable to further execute the task, and
in response to the checking, returning from executing the first query when the yield flag is set, and repeating the executing and checking steps when the yield flag is unset until execution of the first query is complete;
receiving a second query;
setting the yield flag for a certain worker of the first subset of workers in response to the second query;
receiving performance information from the certain worker that has returned from execution in response to the yield flag being set;
assigning, based on the performance information, a second subset of workers of the plurality of workers to asynchronously executing the second query on the distributed database, the second subset of workers including the certain worker, thereby causing the second subset of workers to execute the second query while one or more workers of the first subset of workers execute the first query.
|