使用 mongodb 或 cassandra 的空间数据 [英] Spatial data with mongodb or cassandra

查看:32
本文介绍了使用 mongodb 或 cassandra 的空间数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在考虑处理大量数据的概念证明,例如 > 10 G,这需要每秒至少 200 次以上的写入和每秒大约 50 次以上的空间相关数据读取.这也是一个不断增长的系统.目前,出于性能原因,我正在考虑将这些大容量数据移动到 NoSql 大表类型的数据库中.

I am considering a Proof of concept for handling large volumes of data like > 10 G which requires atleast 200+ writes per second and about 50+ reads per second of spatial related data. This is a growing system as well. Currently I am considering moving this big volume data into a NoSql big table kind of db for performance reasons.

我已经考虑并仔细研究了 MongoDB 和 cassandra.就我的阅读而言,

I have considered and taken some closer look at MongoDB and cassandra. As far as my reading goes,

MongoDB:- 似乎有写锁问题- 如果不需要多台服务器,stackoverflow 中的一个帖子建议使用这个数据库- 索引保存在内存中.所以指数增长越大,据说性能越差- 优点是 Mongodb 直接支持空间数据 &索引以及查找附近位置等功能,- 我看到这篇文章 Cassandra 或 MongoDB 用于我们基于位置的应用程序 建议 mongodb 为最佳选择

Mongodb: - seems to have a writer lock problem - one of the posts in stackoverflow suggested this db if there is no need for multiple servers - indexes kept on memory. So the bigger the index growth, the performance is said to deteriorate - advantage is Mongodb has direct support for spatial data & indexing along with features like finding nearby locations etc., - I see this post Cassandra Or MongoDB For Our Location Based Application suggesting mongodb as the best choice

卡桑德拉:
- 似乎是相关数据库中最好的- 似乎有很好的写入和读取性能- 本身不支持空间索引,但可以通过地理散列进行扩展

Cassandra:
- Seems to be the best of among the related dbs - Seems to have great write as well as read performance - Does not natively support spatial indexing but this can be extended via geohashing

我真的很喜欢 mongodb,因为它有很好的文档和对空间数据的直接支持.有没有人在这么大的系统上使用 mongodb 有不好的经历?我实际上在 mongodb iostat 上看到了很多关于性能的帖子.

My heart actually goes out for mongodb because of its good documentation and direct support for spatial data. Has any body had bad experience using mongodb for such big systems? I actually see lot of posts on mongodb iostat for performance.

如果 mongodb 不适合,有人可以就使用 cassandra 进行 geohashing 提供一些建议吗?我看到了用于创建的链接 http://code.google.com/p/geospatialweb/哈希值.但是有关于如何查询等问题?

If mongodb is not suited, can someone give some pointers on geohashing using cassandra? I saw the link http://code.google.com/p/geospatialweb/ for creating the hashes. But there are questions on how to query etc.?

推荐答案

我意识到这是一个较老的问题,我知道它不能直接回答您的问题,但根据您的查询,Cassandra 可能不是最佳选择, 并且让您的查询与 MongoDB 中的索引一起工作也可能有问题(以我自己的经验).在大量地理数据和查询方面,Mongo 比 Cassandra 略胜一筹.

I realize this is an older question and I know that it doesn't directly answer your question, but depending on your queries, Cassandra may not be the best option, And getting your queries to work with indexing in MongoDB can be problematic as well (in my own experience). Mongo has a slight edge over Cassandra for heavy geo data and queries imho.

我建议还考虑研究 ElasticSearch,这取决于您的数据形状和您将进行的查询类型,这可能是最佳解决方案.不过,当您发布问题时,它的选择可能比今天要少.

I'd suggest also consider looking into ElasticSearch, which depending on your data shape and the types of queries you'll be making is probably the best solution. When you posted your question it was likely less of an option than today though.

这篇关于使用 mongodb 或 cassandra 的空间数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆