Riak 与 Amazon SimpleDB
我正在寻找一个最终一致的键值数据存储,我决定在 Amazon SimpleDB 和 Riak 之间进行选择,所以任何人都可以分享他们比较这两者的宝贵经验。
提前致谢 费德里克
I am looking for an eventually consistent key value data store and i decided to choose between Amazon SimpleDB and Riak ,so can anyone share their valuable experiences comparing both .
Thanks in advance
Fedrick
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Riak 是一个键值存储。您存储的数据值对数据库来说是不透明的,因此您没有二级索引。但如果您的数据是 JSON(或者我认为是 XML),您确实可以运行 map-reduce。您可以对所有数据或仅一个子集(“种子键”)运行map-reduce。它还具有“链接行走”功能,文档可以引用其他文档,并且可以自动获取。他们目前没有像 CouchDB 那样的增量映射缩减,这意味着任何辅助查询(非键)都非常昂贵。他们有计划解决这个问题。
SimpleDB 实际上介于文档存储和密钥存储之间:每个 key->item 支持多个属性,但它只深入一层。您可以查询您的键或属性值。
在制作中,Riak 应该相当“不干涉”。如果速度很慢或已满,只需启动一个新服务器并告诉它加入集群即可。 (与 CouchDB 或 MongoDB 不同,您必须使用多个配置文件进行操作)。
SimpleDB 可以承受重击(我听说每秒有数万个请求),但您负责数据扩展(即不要违反其域大小限制,否则速度会变慢)。
Riak is a key-value store. The data values you store is opaque to the database, so you have no secondary indexes. But you do have the ability to run map-reduce if your data is JSON (or XML, I think). You can run map-reduce over all data, or just a subset ("seed keys"). It also has a "link walking" feature where documents can refer to other documents, which can be auto-fetched. They don't currently have an incremental map-reduce like CouchDB, which means any secondary queries (non-key) are quite expensive. They have plans to fix this.
SimpleDB is actually halfway between a docstore and a keystore: Each key->item supports multiple attributes, but it only goes one level deep. You can query on your key or your attribute values.
In production, Riak should be pretty "hands-off". If it's slow or getting full, just spin up a new server and tell it to join the cluster. (unlike CouchDB or MongoDB where you have to futz with multiple config files).
SimpleDB can take a pounding (tens of thousands of requests per second I've heard), but you are responsible for data scaling (i.e. don't violate their domain size limits or it will slow down).
我已经使用 SimpleDB 大约 6 个月了。我即将投入生产。它运作良好,但我希望它更快。我执行 %like% 查询进行搜索,但我似乎无法让它每秒深入浏览超过几 MB 的值。但非 %like% 搜索要快得多。我有一种感觉,如果 Amazon 的某个人用古老的 c 而不是 Erlang 编写一些算法,那么速度可能会加快,但话又说回来,我是 ac 程序员。
此外,对最近打开的域的前几个查询将花费更长的时间,因为系统会将其全部读入。
总的来说,它对我有用,但如果我想扩展得更高,我将不得不使用其他东西。
另外,我认为我对它的几乎所有使用都是免费的 - 有大量的空间分配等。
请确保您计划了 SimpleDB 目前没有“只读”访问模式等事实。任何可以的用户使用它可以编辑它。
——汤姆
I have used SimpleDB for about 6 months now. I am going into production with it. It works well, but I wish it were faster. I perform %like% queries for searching, and I can't seem to get it to dive through more than a few MB a second worth of values. But non %like% searches are much faster. I get the feeling that it could be sped up if someone at Amazon wrote a few algorithms in good old c, rather than Erlang, but then again I am a c coder.
Also the first few queries on a recently opened Domain will take longer, as the system gets it all read in.
Overall it worked for me, but if I want to scale higher I will have to go with something else.
Also, I think that almost all my use of it will be free - there is a generous allocation of space, etc.
Make sure you plan on the fact that SimpleDB currently has no 'read only' access modes, etc. Any user that can use it can edit it.
--Tom