Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
97 tokens/sec
GPT-4o
53 tokens/sec
Gemini 2.5 Pro Pro
43 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
47 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Learning GraphQL Query Costs (Extended Version) (2108.11139v2)

Published 25 Aug 2021 in cs.SE, cs.DB, cs.LG, and cs.PL

Abstract: GraphQL is a query language for APIs and a runtime for executing those queries, fetching the requested data from existing microservices, REST APIs, databases, or other sources. Its expressiveness and its flexibility have made it an attractive candidate for API providers in many industries, especially through the web. A major drawback to blindly servicing a client's query in GraphQL is that the cost of a query can be unexpectedly large, creating computation and resource overload for the provider, and API rate-limit overages and infrastructure overload for the client. To mitigate these drawbacks, it is necessary to efficiently estimate the cost of a query before executing it. Estimating query cost is challenging, because GraphQL queries have a nested structure, GraphQL APIs follow different design conventions, and the underlying data sources are hidden. Estimates based on worst-case static query analysis have had limited success because they tend to grossly overestimate cost. We propose a machine-learning approach to efficiently and accurately estimate the query cost. We also demonstrate the power of this approach by testing it on query-response data from publicly available commercial APIs. Our framework is efficient and predicts query costs with high accuracy, consistently outperforming the static analysis by a large margin.

User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (8)
  1. Georgios Mavroudeas (2 papers)
  2. Guillaume Baudart (18 papers)
  3. Alan Cha (4 papers)
  4. Martin Hirzel (28 papers)
  5. Jim A. Laredo (5 papers)
  6. Malik Magdon-Ismail (54 papers)
  7. Louis Mandel (18 papers)
  8. Erik Wittern (9 papers)
Citations (3)

Summary

We haven't generated a summary for this paper yet.