US-20260127176-A1 - QUERY MANAGEMENT SYSTEM FOR APPLICATION SERVICE PLATFORM
Abstract
In examples, a query management system maintains a query schema for a structured data source. The query schema includes a collection of query templates, where each query template specifies at least one condition. When a mutation in an underling data source is detected, the query management system generates an invalidation command for a corresponding set of cached keys. Based on attributes of the mutated data set, the query template can enable the use of wildcard designations to for purpose of identifying cache keys that are to be invalidated as a result of the mutated data set.
Inventors
- Braden Walker
- Lin Xu
- Matthew Rosencrantz
Assignees
- Figma, Inc.
Dates
- Publication Date
- 20260507
- Application Date
- 20251219
Claims (1)
- 1 . A network system comprising: one or more processors; a memory to store a set of instructions; wherein the one or more processors execute the set of instructions to perform operations that include: maintaining a structured data source for use with an application service provided to a set of user computers; maintaining a query schema for a structured data source, the query schema including a plurality of query templates, each query template specifying at least one condition, including a condition field and an operator, each query template of the plurality of query templates being associated with one or more types of data sets of the structured data source; maintaining a set of cache resources for the structured data source; detecting a mutation to a data set of the structured data source; based on the data set of the mutation, generating a command to invalidate a set of cache keys, the command being based on a query template of the query schema that is associated with the mutated data set, the command populating the query using one or more attributes of the data set; and wherein generating the command includes designating a wildcard as a value of the query template based on a condition of the query template.
Description
CROSS-REFERENCE TO RELATED APPLICATIONS This application is a continuation of the co-pending U.S. patent application titled “QUERY MANAGEMENT SYSTEM FOR APPLICATION SERVICE PLATFORM”, Ser. No. 18/979,009, filed Dec. 12, 2024, which claims priority benefit of U.S. Provisional Application titled “QUERY MANAGEMENT SYSTEM FOR APPLICATION SERVICE PLATFORM,” filed Dec. 13, 2023, and having Ser. No. 63/609,866. The subject matter of these related applications is hereby incorporated herein by reference. TECHNICAL FIELD Examples relate to a query management system for an application service platform. BACKGROUND Many application service platforms exist that enable end users to share, view and/or collaborate on different types of data, such as user-generated content. For example, an application service platform can enable design users to operate client computers to collaborate on the creation of graphic designs. An application service platform can utilize different types of data and data sources. An application service platform can use structured data sets to enable client computers to retrieve and render metadata, overlay and/or supplementary data. For example, in the context of an application service platform for enabling collaboration on graphic designs, an application service platform can utilize databases, including database shards, to provide data sets representing comments (e.g., comments that overlay or appear to the side of a collaboration project), and overlays. As another example, an instance of an application service implemented through the platform can reference, link or otherwise utilize file and folder names of resources used by the application service, as well as user name or profile information. Data such as for comments (which can utilize, for example, user information and filenames), file and folder names, can be retrieved from structured data sources, such as database shards. FIG. 7A illustrates a conventional network system for implementing an application service platform that enables client retrieval of data sets from structured data sources. A system 700 can utilize, for example, a query language for exposing application program interfaces (API), and more generally structured language queries. By way of example, a system can utilize a data fetching layer (e.g., LIVEGRAPH, provided by FIGMA INC.) between frontend components and back end databases, where data objects have predefined relationships with one another. A client computer generates queries for data sets that it utilizes. The queries generated by a client can result in the return of a view, which can include, for example, a portion of a graph data structure maintained by one or multiple database shards. The data sets can themselves be structured to identify relationships with other data sets, as well as data that indicates how related data sets are to be traversed to provide the subscription view. In order for a network system to effectively implement a real-time environment, the system 700 typically caches queries and query results, to enable faster data retrieval. Further, as the number of clients increase, the system 700 enables classes subscribe to queries, where data of interest is provided automatically and in response to updates to the structured data source. Changes to the database can be identified as mutations. When such mutations occur, processes associated or implemented with the database identify relevant queries which may be affected by the mutation. Through identification of mutations, the system can invalidate cache keys for relevant queries, in order for the cache resources to maintain consistent views of the database. An application service can scale to, for example, accommodate a greater number of users and data sets. For example, the volume of data sets which are used by the client computers can increase with a greater number of clients, greater use by individual clients, and also the progression of time where users maintain previously generated data and add new data. Additionally, the application service platform can increase the services and types of data which are in use. FIG. 7B illustrates a conventional network system where an application service platform is scaled to enable client retrieval of data sets from structured data sources. Under conventional approaches, the network system is scaled by increasing the number of servers used to enable client retrieval of data sets. However, scaling under conventional approaches raises numerous problems. Among these problems, notifications of mutations must be fanned out to each server/cache. Further, to accommodate database shards, every server must fan-in mutations as they arise. Fanning-in and out creates bottlenecks and efficiencies which reduce the responsiveness of the system, which can be particularly problematic when real-time environments are desired. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 illustrates a querying management system (“QMS”) for use with an applicat