论文标题
GraphQL实时查询使用DynamoDB
GraphQL Live Querying with DynamoDB
论文作者
论文摘要
我们提出了一种在数据库级别实现GraphQl实时查询的方法。我们在GO中的DynamoDB模拟模拟分布式键值商店,并实时查询以暴露可能的陷阱。实现实时查询的两个关键组件是存储在实时查询中选择的字段,并确定每个数据库写入中已更新了哪些对象字段。对系统的流(键,字段)请求包含要在实时查询流中包含的字段,然后在后续PUT(键,对象)操作中,数据库异步确定哪些字段已更新了哪些字段,并将新的查询视图推向流,如果这些字段与流()请求重叠。在讨论了我们的实施之后,我们探索了使用实时查询的动机,例如简化软件通信,最小化数据传输并启用实时数据,并描述使用GraphQL和实时查询来构建软件的体系结构。
We present a method of implementing GraphQL live queries at the database level. Our DynamoDB simulation in Go mimics a distributed key-value store and implements live queries to expose possible pitfalls. Two key components for implementing live queries are storing fields selected in a live query and determining which object fields have been updated in each database write. A stream(key, fields) request to the system contains fields to include in the live query stream and on subsequent put(key, object) operations, the database asynchronously determines which fields were updated and pushes a new query view to the stream if those fields overlap with the stream() request. Following a discussion of our implementation, we explore motivations for using live queries such as simplifying software communication, minimizing data transfer, and enabling real-time data and describe an architecture for building software with GraphQL and live queries.