有没有理由Cassandra没有地理空间支持? [英] Is there a reason that Cassandra doesn't have Geospatial support?

查看:447
本文介绍了有没有理由Cassandra没有地理空间支持?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于Cassandra是基于Dynamo论文(分布式,自平衡哈希表)+ BigTable,并且有一些空间索引很适合该范式( quadkey geohash )。有地理空间支持没有实现的原因吗?

Since Cassandra is based off of the Dynamo paper (distributed, self-balancing hash table) + BigTable and there are spatial indexes that would fit nicely into that paradigm (quadkey or geohash). Is there a reason that Geospatial support hasn't been implemented?

您可以将GeoPoint数据类型添加为具有内部geohash的元组,并将CF指定为包含地理数据。从那里,您可以选择将地理位置数据作为辅助索引或非标准化SCF的行为。这可以为地理空间发展打下基础工作,你可以开始执行一些低挂的果子,如.nearby(),它可以只返回共享相同geohash的列。 (我知道不会给你最近的,你必须做一个散步的周围地理散列或使用一个形状和一个空间填充曲线,可以在以后实现,但是一般的操作,找到一些附近的列)

You could add a GeoPoint datatype as a tuple with an internal geohash and specify a CF as containing geo data. From there you can choose the behavior as having the geo data being a secondary index, or a denormalized SCF. That could lay the ground work for geospatial development and you could start by implementing some low hanging fruit such as .nearby() which could just return columns that share the same geohash. (I know that wouldn't give you the "nearest", you'd have to do a walk of surrounding geohashes or use a shape and a space filling curve for that which could be implemented later, but is a general operation for finding some nearby columns)

我知道SimpleGeo / Urban Airship在Cassandra中建立了地理支持,但它看起来并不像是开放的。

I know SimpleGeo/Urban Airship built geo support into Cassandra, but it doesn't look like that was ever opened up. Also, let me know if there's a better place to ask this (quora, mailing lists, etc...)

推荐答案

我想知道这是一个更好的地方认为有两个部分的答案。

I think there are two parts to the answer.

为什么它不存在的原因是因为没有人提交代码到Cassandra已经想到这个功能,或者认为这个能力具有足够高的优先级来花费大量时间。 Cassandra的大部分开发工作是由Datastax完成的,他们作为一个商业实体,对用户的要求和建议非常熟悉,并且非常务实地了解什么可以给予他们在新功能方面最大的投资回报。

The reason for why it's not there, is because nobody who commits code into Cassandra has thought of this feature, or thought that this capability is of high enough priority to spend major time on it. Most of the development in Cassandra is done by Datastax, and they, being a commercial entity, are privy to user demands and suggestions and also pretty pragmatic about what can give them the most ROI in terms of new features.

如果有一个足够好的第三方开发者(或团队)有足够的时间在手上,这可以做到,从概念上讲,C *提交者可能没有关于添加主要问题

If there were a good enough third-party developer (or a team) with enough time on their hands, this could be done, and conceptually C* committers would likely have no problems about adding a major feature like this.

第二个方面是Cassandra支持blob(字节数组),这意味着你所描述的内容可以在客户端应用程序/驱动程序中实现相对直接的方式。在这种情况下,驱动器负责将地理调用转换为适当的原始字节操作。我还怀疑这将比在核心存储引擎中支持具有相关集合的运算符的全新数据原语更少的工作。

The second aspect is that Cassandra supports blobs (byte arrays), which means that what you're describing can be implemented in the client app/driver in a relatively straightforward manner. The drive would in that case be responsible for translating geo calls into appropriate raw byte operations. I'm also suspecting this would be less work than supporting a whole new data primitive with relevant set of operators in the core storage engine.

这篇关于有没有理由Cassandra没有地理空间支持?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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