Optimizing write operations in object schema-based application programming interfaces (apis)
Abstract
The present disclosure relates to processing write requests across a plurality of data sources. According to one embodiment, an example method includes determining a navigable path of nodes accessed to satisfy a write request in a graph projection of an application programming interface (API). An API service generates a plurality of subqueries, each subqueries being associated with a node in the navigable path. While traversing the navigable path to execute the write request, the API service identifies one or more nodes in the navigable path sharing an association with a data repository associated with the current node and upon which execution of a write operation associated with the current node depends. The API service coalesces a set of subqueries associated with the current node and the identified one or more nodes into a single subquery and executes the single subquery.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1 . A method for processing write requests across a plurality of data repositories, the method comprising:
receiving a write request from a client device identifying a plurality of nodes in a graph projection of an object schema-based application programming interface (API); traversing the graph projection of the object schema-based API to identify a navigable path through the graph projection of the object schema-based API based on an order in which the plurality of nodes are identified in the write request; generating a plurality of subqueries to satisfy the write request, wherein each subquery is generated based on an object schema definition associated with a node in the navigable path through the graph projection of the object schema-based API; and while traversing the navigable path through the graph projection of the object schema-based API to execute the write request, for a current node of the navigable path through the graph projection of the object schema-based API:
identifying one or more nodes of the plurality of nodes in the navigable path through the graph projection of the object schema-based API sharing an association with a data repository associated with the current node and upon which execution of a write operation associated with the current node depends;
coalescing a set of subqueries associated with the current node and the identified one or more nodes into a single subquery directed to the data repository associated with the current node; and
executing the single subquery to perform write operations for the current node and the identified one or more nodes at the data repository associated with the current node.
2 . The method of claim 1 , further comprising:
identifying data repositories associated with one or more peer nodes at a same level of the navigable path through the graph projection of the object schema-based API as the current node; and replacing a set of queries directed to the data repository associated with the current node and one or more peer nodes associated with a first data repository with a single subquery.
3 . The method of claim 1 , wherein the single subquery is generated, at least in part, on an order in which the set of subqueries are to be executed.
4 . The method of claim 3 , wherein the single subquery comprises:
a first group of one or more subqueries coalesced into a first operation to write data associated with the one or more nodes at a lower level of the navigable path through the graph projection of the object schema-based API; and a second operation to write data associated with the current node, the second operation structured to execute upon completion of the first operation.
5 . The method of claim 1 , wherein the navigable path through the graph projection of the object schema-based API represents an order in which the subqueries generated from the write request is to be executed.
6 . The method of claim 5 , wherein subqueries associated with lower level nodes in the navigable path through the graph projection of the object schema-based API are to be executed before subqueries associated with higher level nodes in the navigable path through the graph projection of the object schema-based API.
7 . The method of claim 1 , wherein the write request is part of a batch operation, and wherein a first subquery associated with the current node and generated for the write request is consolidated with a subquery associated with the current node and generated for at least a second write request in the batch operation.
8 . A system, comprising:
a processor; and a memory comprising instructions which, when executed on the processor, performs an operation for processing write requests across a plurality of data repositories, the operation comprising:
receiving a write request from a client device identifying a plurality of nodes in a graph projection of an object schema-based application programming interface (API);
traversing the graph projection of the object schema-based API to identify a navigable path through the graph projection of the object schema-based API based on an order in which the plurality of nodes are identified in the write request;
generating a plurality of subqueries to satisfy the write request, wherein each subquery is generated based on an object schema definition associated with a node in the navigable path through the graph projection of the object schema-based API; and
while traversing the navigable path through the graph projection of the object schema-based API to execute the write request, for a current node of the navigable path through the graph projection of the object schema-based API:
identifying one or more nodes of the plurality of nodes in the navigable path through the graph projection of the object schema-based API sharing an association with a data repository associated with the current node and upon which execution of a write operation associated with the current node depends;
coalescing a set of subqueries associated with the current node and the identified one or more nodes into a single subquery directed to the data repository associated with the current node; and
executing the single subquery to perform write operations for the current node and the identified one or more nodes at the data repository associated with the current node.
9 . The system of claim 8 , wherein the operation further comprise:
identifying data repositories associated with one or more peer nodes at a same level of the navigable path through the graph projection of the object schema-based API as the current node; and replacing a set of queries directed to the data repository associated with the current node and one or more peer nodes associated with a first data repository with a single subquery.
10 . The system of claim 8 , the single subquery is generated, at least in part, on an order in which the set of subqueries are to be executed.
11 . The system of claim 10 , wherein the single subquery comprises:
a first group of one or more subqueries coalesced into a first operation to write data associated with the one or more nodes at a lower level of the navigable path through the graph projection of the object schema-based API; and a second operation to write data associated with the current node, the second operation structured to execute upon completion of the first operation.
12 . The system of claim 8 , wherein the navigable path through the graph projection of the object schema-based API represents an order in which the subqueries generated from the write request is to be executed.
13 . The system of claim 12 , wherein subqueries associated with lower level nodes in the navigable path through the graph projection of the object schema-based API are to be executed before subqueries associated with higher level nodes in the navigable path through the graph projection of the object schema-based API.
14 . The system of claim 8 , wherein the write request is part of a batch operation, and wherein a first subquery associated with the current node and generated for the write request is consolidated with a subquery associated with the current node and generated for at least a second write request in the batch operation.
15 . A non-transitory computer-readable medium comprising instructions which, when executed on a processor, performs an operation for processing write requests across a plurality of data repositories, the operation comprising:
receiving a write request from a client device identifying a plurality of nodes in a graph projection of an object schema-based application programming interface (API); traversing the graph projection of the object schema-based API to identify a navigable path through the graph projection of the object schema-based API based on an order in which the plurality of nodes are identified in the write request; generating a plurality of subqueries to satisfy the write request, wherein each subquery is generated based on an object schema definition associated with a node in the navigable path through the graph projection of the object schema-based API; and while traversing the navigable path through the graph projection of the object schema-based API to execute the write request, for a current node of the navigable path through the graph projection of the object schema-based API:
identifying one or more nodes of the plurality of nodes in the navigable path through the graph projection of the object schema-based API sharing an association with a data repository associated with the current node and upon which execution of a write operation associated with the current node depends;
coalescing a set of subqueries associated with the current node and the identified one or more nodes into a single subquery directed to the data repository associated with the current node; and
executing the single subquery to perform write operations for the current node and the identified one or more nodes at the data repository associated with the current node.
16 . The non-transitory computer-readable medium of claim 15 , wherein the operation further comprises:
identifying data repositories associated with one or more peer nodes at a same level of the navigable path through the graph projection of the object schema-based API as the current node; and replacing a set of queries directed to the data repository associated with the current node and one or more peer nodes associated with a first data repository with a single subquery.
17 . The non-transitory computer-readable medium of claim 15 , the single subquery is generated, at least in part, on an order in which the set of subqueries are to be executed.
18 . The non-transitory computer-readable medium of claim 17 , wherein the single subquery comprises:
a first group of one or more subqueries coalesced into a first operation to write data associated with the one or more nodes at a lower level of the navigable path through the graph projection of the object schema-based API; and a second operation to write data associated with the current node, the second operation structured to execute upon completion of the first operation.
19 . The non-transitory computer-readable medium of claim 15 , wherein the navigable path through the graph projection of the object schema-based API represents an order in which the subqueries generated from the write request is to be executed, and wherein subqueries associated with lower level nodes in the navigable path through the graph projection of the object schema-based API are to be executed before subqueries associated with higher level nodes in the navigable path through the graph projection of the object schema-based API.
20 . The non-transitory computer-readable medium of claim 15 , wherein the write request is part of a batch operation, and wherein a first subquery associated with the current node and generated for the write request is consolidated with a subquery associated with the current node and generated for at least a second write request in the batch operation.Join the waitlist — get patent alerts
Track US2020183932A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.