本地开发与云扳手 [英] Local development with cloud-spanner
问题描述
编辑:澄清,我正在寻找一个数据库它与Cloud Spanner具有相同的SQL特性,所以我可以在本地进行开发。确切的性能特征不如API和一致性行为重要。我不认为蟑螂符合这些要求吗?
目前Cloud Spanner没有本地开发选项。您当前的选择是在GCP上启动单个节点实例。
目前没有其他数据库像Cloud Spanner一样运行,但 CockroachDB 的运作原理类似。由于他们无法访问原子钟和GPS单元,因此他们做出了不同的折衷。特别是在读取&写和缺乏陈旧的读。您可以阅读杰普森博客:
如果Spanner在每次写入之后等待以确保线性化,CockroachDB仅阻止有争议的读取。因此,其一致性保证略有减弱。
Is there any way to do local development with cloud spanner? I've taken a look through the docs and the CLI tool and there doesn't seem to be anything there. Alternatively, can someone suggest a SQL database that behaves similarly for reads (not sure what to do about writes)?
EDIT: To clarify, I'm looking for a database which speaks the same flavour of SQL as Cloud Spanner so I can do development locally. The exact performance characteristics are not as important as the API and consistency behaviour. I don't think Cockroach meets these requirements?
There is currently no local development option for Cloud Spanner. Your current option would be to start a single node instance on GCP.
There currently isn't another database that operates like Cloud Spanner, however CockroachDB operates on similar principles. Since they don't have access to atomic clocks and GPS units, they do make different trade-offs. In particular around reads & writes and lacking 'stale reads'. You can read more on the Jepsen blog:
Where Spanner waits after every write to ensure linearizability, CockroachDB blocks only on contested reads. As a consequence, its consistency guarantees are slightly weaker.
这篇关于本地开发与云扳手的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!