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.


翻译:图形QL 是一种对API 的查询语言,也是执行这些查询的准备时间,从现有的微服务、REST API、数据库或其他来源获取所要求的数据。 它的清晰度和灵活性使得它成为许多行业,尤其是通过网络对API提供者的吸引对象。 盲目服务在图形QL 中的客户查询的一大缺点是,查询的成本可能出乎意料地过高,为提供者造成计算和资源超载,以及API 超标和基础设施超载。为了减轻这些缺陷,在进行查询之前必须有效地估计查询费用。估计查询费用具有挑战性,因为“GreagQL”查询有一个嵌套结构,“GreagQL API”查询遵循不同的设计惯例,而基本的数据来源是隐蔽的。基于最坏情况的静态查询分析的估算结果,由于它们往往严重地高估测成本,因此其成功程度有限。我们建议采用机器学习方法,以高效率和准确估计查询费用。我们通过从公开的精确度预测、持续可靠的商业访问框架测试查询数据来显示这一方法的威力。

0
下载
关闭预览

相关内容

最新《联邦学习Federated Learning》报告,Federated Learning
专知会员服务
86+阅读 · 2020年12月2日
【干货书】真实机器学习,264页pdf,Real-World Machine Learning
吴恩达新书《Machine Learning Yearning》完整中文版
专知会员服务
144+阅读 · 2019年10月27日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
57+阅读 · 2019年10月17日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
144+阅读 · 2019年10月12日
机器学习入门的经验与建议
专知会员服务
90+阅读 · 2019年10月10日
【哈佛大学商学院课程Fall 2019】机器学习可解释性
专知会员服务
99+阅读 · 2019年10月9日
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
26+阅读 · 2019年5月18日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
Facebook PyText 在 Github 上开源了
AINLP
7+阅读 · 2018年12月14日
Hierarchical Imitation - Reinforcement Learning
CreateAMind
19+阅读 · 2018年5月25日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
Python机器学习教程资料/代码
机器学习研究会
8+阅读 · 2018年2月22日
【论文】变分推断(Variational inference)的总结
机器学习研究会
39+阅读 · 2017年11月16日
Andrew NG的新书《Machine Learning Yearning》
我爱机器学习
11+阅读 · 2016年12月7日
Arxiv
1+阅读 · 2021年8月21日
Arxiv
11+阅读 · 2021年3月25日
Advances and Open Problems in Federated Learning
Arxiv
18+阅读 · 2019年12月10日
Arxiv
3+阅读 · 2019年6月5日
Deep Learning for Energy Markets
Arxiv
8+阅读 · 2019年4月10日
Arxiv
6+阅读 · 2018年12月10日
Deep Learning
Arxiv
6+阅读 · 2018年8月3日
VIP会员
相关VIP内容
最新《联邦学习Federated Learning》报告,Federated Learning
专知会员服务
86+阅读 · 2020年12月2日
【干货书】真实机器学习,264页pdf,Real-World Machine Learning
吴恩达新书《Machine Learning Yearning》完整中文版
专知会员服务
144+阅读 · 2019年10月27日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
57+阅读 · 2019年10月17日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
144+阅读 · 2019年10月12日
机器学习入门的经验与建议
专知会员服务
90+阅读 · 2019年10月10日
【哈佛大学商学院课程Fall 2019】机器学习可解释性
专知会员服务
99+阅读 · 2019年10月9日
相关资讯
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
26+阅读 · 2019年5月18日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
Facebook PyText 在 Github 上开源了
AINLP
7+阅读 · 2018年12月14日
Hierarchical Imitation - Reinforcement Learning
CreateAMind
19+阅读 · 2018年5月25日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
Python机器学习教程资料/代码
机器学习研究会
8+阅读 · 2018年2月22日
【论文】变分推断(Variational inference)的总结
机器学习研究会
39+阅读 · 2017年11月16日
Andrew NG的新书《Machine Learning Yearning》
我爱机器学习
11+阅读 · 2016年12月7日
相关论文
Arxiv
1+阅读 · 2021年8月21日
Arxiv
11+阅读 · 2021年3月25日
Advances and Open Problems in Federated Learning
Arxiv
18+阅读 · 2019年12月10日
Arxiv
3+阅读 · 2019年6月5日
Deep Learning for Energy Markets
Arxiv
8+阅读 · 2019年4月10日
Arxiv
6+阅读 · 2018年12月10日
Deep Learning
Arxiv
6+阅读 · 2018年8月3日
Top
微信扫码咨询专知VIP会员