You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by SEGALIS Morgan <ms...@gmail.com> on 2015/01/26 16:47:39 UTC

Using Cassandra for geospacial search

Hi everyone,

I wanted to know if someone has a feedback using geoHash algorithme with
cassandra ?

I will have to create a "nearby" functionnality soon, and I really would
like to do it with cassandra for it's scalability, otherwise the smart
choice would be MongoDB apparently.

Is Cassandra can be used to do geospacial search (with some kind of radius)
while being fast and scalable ?

Thanks.

-- 
Morgan SEGALIS

Re: Using Cassandra for geospacial search

Posted by Alexandre Dutra <al...@datastax.com>.
Hello,

The following session, recorded during the Cassandra Europe Summit 2014,
might also be of interest for you:

http://youtu.be/RQnw-tfVXb4

--
Alexandre Dutra

On Mon, Jan 26, 2015 at 11:07 PM, Jabbar Azam <aj...@gmail.com> wrote:

> There is also a YouTube video http://youtu.be/rqEylNsw2Ns explaining the
> implementation of geohashes in Cassandra.
>
> On Mon, 26 Jan 2015 21:34 DuyHai Doan <do...@gmail.com> wrote:
>
>> Nice slides, the key idea is the
>> http://en.wikipedia.org/wiki/Z-order_curve
>>
>> On Mon, Jan 26, 2015 at 9:28 PM, Jabbar Azam <aj...@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> You'll find this useful
>>> http://www.slideshare.net/mobile/mmalone/working-with-dimensional-data-in-distributed-hash-tables
>>>
>>> Its how simplegeo used geohashing and Cassandra for geolocation.
>>>
>>> On Mon, 26 Jan 2015 15:48 SEGALIS Morgan <ms...@gmail.com> wrote:
>>>
>>>> Hi everyone,
>>>>
>>>> I wanted to know if someone has a feedback using geoHash algorithme
>>>> with cassandra ?
>>>>
>>>> I will have to create a "nearby" functionnality soon, and I really
>>>> would like to do it with cassandra for it's scalability, otherwise the
>>>> smart choice would be MongoDB apparently.
>>>>
>>>> Is Cassandra can be used to do geospacial search (with some kind of
>>>> radius) while being fast and scalable ?
>>>>
>>>> Thanks.
>>>>
>>>> --
>>>> Morgan SEGALIS
>>>>
>>>
>>

Re: Using Cassandra for geospacial search

Posted by Jabbar Azam <aj...@gmail.com>.
There is also a YouTube video http://youtu.be/rqEylNsw2Ns explaining the
implementation of geohashes in Cassandra.

On Mon, 26 Jan 2015 21:34 DuyHai Doan <do...@gmail.com> wrote:

> Nice slides, the key idea is the
> http://en.wikipedia.org/wiki/Z-order_curve
>
> On Mon, Jan 26, 2015 at 9:28 PM, Jabbar Azam <aj...@gmail.com> wrote:
>
>> Hello,
>>
>> You'll find this useful
>> http://www.slideshare.net/mobile/mmalone/working-with-dimensional-data-in-distributed-hash-tables
>>
>> Its how simplegeo used geohashing and Cassandra for geolocation.
>>
>> On Mon, 26 Jan 2015 15:48 SEGALIS Morgan <ms...@gmail.com> wrote:
>>
>>> Hi everyone,
>>>
>>> I wanted to know if someone has a feedback using geoHash algorithme with
>>> cassandra ?
>>>
>>> I will have to create a "nearby" functionnality soon, and I really would
>>> like to do it with cassandra for it's scalability, otherwise the smart
>>> choice would be MongoDB apparently.
>>>
>>> Is Cassandra can be used to do geospacial search (with some kind of
>>> radius) while being fast and scalable ?
>>>
>>> Thanks.
>>>
>>> --
>>> Morgan SEGALIS
>>>
>>
>

Re: Using Cassandra for geospacial search

Posted by DuyHai Doan <do...@gmail.com>.
Nice slides, the key idea is the http://en.wikipedia.org/wiki/Z-order_curve

On Mon, Jan 26, 2015 at 9:28 PM, Jabbar Azam <aj...@gmail.com> wrote:

> Hello,
>
> You'll find this useful
> http://www.slideshare.net/mobile/mmalone/working-with-dimensional-data-in-distributed-hash-tables
>
> Its how simplegeo used geohashing and Cassandra for geolocation.
>
> On Mon, 26 Jan 2015 15:48 SEGALIS Morgan <ms...@gmail.com> wrote:
>
>> Hi everyone,
>>
>> I wanted to know if someone has a feedback using geoHash algorithme with
>> cassandra ?
>>
>> I will have to create a "nearby" functionnality soon, and I really would
>> like to do it with cassandra for it's scalability, otherwise the smart
>> choice would be MongoDB apparently.
>>
>> Is Cassandra can be used to do geospacial search (with some kind of
>> radius) while being fast and scalable ?
>>
>> Thanks.
>>
>> --
>> Morgan SEGALIS
>>
>

Re: Using Cassandra for geospacial search

Posted by Jabbar Azam <aj...@gmail.com>.
Hello,

You'll find this useful
http://www.slideshare.net/mobile/mmalone/working-with-dimensional-data-in-distributed-hash-tables

Its how simplegeo used geohashing and Cassandra for geolocation.

On Mon, 26 Jan 2015 15:48 SEGALIS Morgan <ms...@gmail.com> wrote:

> Hi everyone,
>
> I wanted to know if someone has a feedback using geoHash algorithme with
> cassandra ?
>
> I will have to create a "nearby" functionnality soon, and I really would
> like to do it with cassandra for it's scalability, otherwise the smart
> choice would be MongoDB apparently.
>
> Is Cassandra can be used to do geospacial search (with some kind of
> radius) while being fast and scalable ?
>
> Thanks.
>
> --
> Morgan SEGALIS
>

Re: Using Cassandra for geospacial search

Posted by Eric Stevens <mi...@gmail.com>.
I don't know much about geohash except for very casual conversations, but
from what I know, it seems like you should be able to put a geohash into a
clustering key and do range searches on that - not sure if that meets your
use case or not.

On Mon, Jan 26, 2015 at 10:29 AM, SEGALIS Morgan <ms...@gmail.com> wrote:

> That's actually GREAT news !! + Solr will give a lot of feature to
> Cassandra !
>
> But while waiting for this huge feature (and wanted for a lot of users I
> guess)
> I guess that Prefix search will also be useful for using geohash...
>
> 2015-01-26 18:12 GMT+01:00 Eric Stevens <mi...@gmail.com>:
>
>> We're getting ready for geo-oriented interactions with C*; our plan is to
>> use DSE Solr integration for this purpose.
>>
>> On Mon, Jan 26, 2015 at 8:47 AM, SEGALIS Morgan <ms...@gmail.com>
>> wrote:
>>
>>> Hi everyone,
>>>
>>> I wanted to know if someone has a feedback using geoHash algorithme with
>>> cassandra ?
>>>
>>> I will have to create a "nearby" functionnality soon, and I really would
>>> like to do it with cassandra for it's scalability, otherwise the smart
>>> choice would be MongoDB apparently.
>>>
>>> Is Cassandra can be used to do geospacial search (with some kind of
>>> radius) while being fast and scalable ?
>>>
>>> Thanks.
>>>
>>> --
>>> Morgan SEGALIS
>>>
>>
>>
>
>
> --
> Morgan SEGALIS
>

Re: Using Cassandra for geospacial search

Posted by Brian Sam-Bodden <bs...@integrallis.com>.
Thanks Eric! I just played a bit with the triggers trying to mimic the
concept of a transaction but they do seem to be a pretty poor substitute
and potentially an unnecessary feature if I have my replication scheme
setup correctly.

On Mon, Jan 26, 2015 at 12:02 PM, Eric Stevens <mi...@gmail.com> wrote:

> Using Cassandra triggers is generally a fairly dangerous proposition, and
> generally not recommended.    It's probably a better idea to load your
> search data with a separate process.
>
> On Mon, Jan 26, 2015 at 11:42 AM, Brian Sam-Bodden <
> bsbodden@integrallis.com> wrote:
>
>> I did an little experiment with a Geohash/Geocells
>> https://github.com/integrallis/geomodel (a poor port of a Python Geohash
>> librairy) and using Cassandra in a demo using public schools data here
>> https://github.com/integrallis/geomodel-cassandra-demo
>>
>> My conclusions is that you can use the Geohash natural lexicographic
>> ordering with Cassandra partition keys to do range queries and also
>> simulate radius searches, but to make it work I had to do some goofy amount
>> of data replication. I'll go back to it and refactor when I have time to
>> see if I can improve the whole thing.
>>
>> Adding a regular search engine into the equation might help, I was also
>> thinking of using C* Triggers to do the data replication needed for the
>> searchers.
>>
>> Cheers,
>> Brian
>> http://integrallis.cm
>>
>> On Mon, Jan 26, 2015 at 11:27 AM, SEGALIS Morgan <ms...@gmail.com>
>> wrote:
>>
>>> The news I guess would be to have it for free. I do not use commercial
>>> versions. I wasn't aware of it though.
>>>
>>> Le lundi 26 janvier 2015, Robert Coli <rc...@eventbrite.com> a écrit :
>>>
>>> On Mon, Jan 26, 2015 at 9:29 AM, SEGALIS Morgan <ms...@gmail.com>
>>>> wrote:
>>>>
>>>>> That's actually GREAT news !! + Solr will give a lot of feature to
>>>>> Cassandra !
>>>>>
>>>>> But while waiting for this huge feature (and wanted for a lot of users
>>>>> I guess)
>>>>>
>>>>
>>>> What's the "news" here?
>>>>
>>>> Datastax commercial edition of Cassandra has had support for SOLR
>>>> integration for some time. But only in the commercial version.
>>>>
>>>> =Rob
>>>>
>>>>
>>>
>>>
>>> --
>>> Morgan SEGALIS
>>>
>>>
>>
>

Re: Using Cassandra for geospacial search

Posted by Eric Stevens <mi...@gmail.com>.
Using Cassandra triggers is generally a fairly dangerous proposition, and
generally not recommended.    It's probably a better idea to load your
search data with a separate process.

On Mon, Jan 26, 2015 at 11:42 AM, Brian Sam-Bodden <bsbodden@integrallis.com
> wrote:

> I did an little experiment with a Geohash/Geocells
> https://github.com/integrallis/geomodel (a poor port of a Python Geohash
> librairy) and using Cassandra in a demo using public schools data here
> https://github.com/integrallis/geomodel-cassandra-demo
>
> My conclusions is that you can use the Geohash natural lexicographic
> ordering with Cassandra partition keys to do range queries and also
> simulate radius searches, but to make it work I had to do some goofy amount
> of data replication. I'll go back to it and refactor when I have time to
> see if I can improve the whole thing.
>
> Adding a regular search engine into the equation might help, I was also
> thinking of using C* Triggers to do the data replication needed for the
> searchers.
>
> Cheers,
> Brian
> http://integrallis.cm
>
> On Mon, Jan 26, 2015 at 11:27 AM, SEGALIS Morgan <ms...@gmail.com>
> wrote:
>
>> The news I guess would be to have it for free. I do not use commercial
>> versions. I wasn't aware of it though.
>>
>> Le lundi 26 janvier 2015, Robert Coli <rc...@eventbrite.com> a écrit :
>>
>> On Mon, Jan 26, 2015 at 9:29 AM, SEGALIS Morgan <ms...@gmail.com>
>>> wrote:
>>>
>>>> That's actually GREAT news !! + Solr will give a lot of feature to
>>>> Cassandra !
>>>>
>>>> But while waiting for this huge feature (and wanted for a lot of users
>>>> I guess)
>>>>
>>>
>>> What's the "news" here?
>>>
>>> Datastax commercial edition of Cassandra has had support for SOLR
>>> integration for some time. But only in the commercial version.
>>>
>>> =Rob
>>>
>>>
>>
>>
>> --
>> Morgan SEGALIS
>>
>>
>

Re: Using Cassandra for geospacial search

Posted by Brian Sam-Bodden <bs...@integrallis.com>.
I did an little experiment with a Geohash/Geocells
https://github.com/integrallis/geomodel (a poor port of a Python Geohash
librairy) and using Cassandra in a demo using public schools data here
https://github.com/integrallis/geomodel-cassandra-demo

My conclusions is that you can use the Geohash natural lexicographic
ordering with Cassandra partition keys to do range queries and also
simulate radius searches, but to make it work I had to do some goofy amount
of data replication. I'll go back to it and refactor when I have time to
see if I can improve the whole thing.

Adding a regular search engine into the equation might help, I was also
thinking of using C* Triggers to do the data replication needed for the
searchers.

Cheers,
Brian
http://integrallis.cm

On Mon, Jan 26, 2015 at 11:27 AM, SEGALIS Morgan <ms...@gmail.com> wrote:

> The news I guess would be to have it for free. I do not use commercial
> versions. I wasn't aware of it though.
>
> Le lundi 26 janvier 2015, Robert Coli <rc...@eventbrite.com> a écrit :
>
> On Mon, Jan 26, 2015 at 9:29 AM, SEGALIS Morgan <ms...@gmail.com>
>> wrote:
>>
>>> That's actually GREAT news !! + Solr will give a lot of feature to
>>> Cassandra !
>>>
>>> But while waiting for this huge feature (and wanted for a lot of users I
>>> guess)
>>>
>>
>> What's the "news" here?
>>
>> Datastax commercial edition of Cassandra has had support for SOLR
>> integration for some time. But only in the commercial version.
>>
>> =Rob
>>
>>
>
>
> --
> Morgan SEGALIS
>
>

Re: Using Cassandra for geospacial search

Posted by SEGALIS Morgan <ms...@gmail.com>.
The news I guess would be to have it for free. I do not use commercial
versions. I wasn't aware of it though.

Le lundi 26 janvier 2015, Robert Coli <rc...@eventbrite.com> a écrit :

> On Mon, Jan 26, 2015 at 9:29 AM, SEGALIS Morgan <msegalis@gmail.com
> <javascript:_e(%7B%7D,'cvml','msegalis@gmail.com');>> wrote:
>
>> That's actually GREAT news !! + Solr will give a lot of feature to
>> Cassandra !
>>
>> But while waiting for this huge feature (and wanted for a lot of users I
>> guess)
>>
>
> What's the "news" here?
>
> Datastax commercial edition of Cassandra has had support for SOLR
> integration for some time. But only in the commercial version.
>
> =Rob
>
>


-- 
Morgan SEGALIS

Re: Using Cassandra for geospacial search

Posted by Robert Coli <rc...@eventbrite.com>.
On Mon, Jan 26, 2015 at 9:29 AM, SEGALIS Morgan <ms...@gmail.com> wrote:

> That's actually GREAT news !! + Solr will give a lot of feature to
> Cassandra !
>
> But while waiting for this huge feature (and wanted for a lot of users I
> guess)
>

What's the "news" here?

Datastax commercial edition of Cassandra has had support for SOLR
integration for some time. But only in the commercial version.

=Rob

Re: Using Cassandra for geospacial search

Posted by SEGALIS Morgan <ms...@gmail.com>.
That's actually GREAT news !! + Solr will give a lot of feature to
Cassandra !

But while waiting for this huge feature (and wanted for a lot of users I
guess)
I guess that Prefix search will also be useful for using geohash...

2015-01-26 18:12 GMT+01:00 Eric Stevens <mi...@gmail.com>:

> We're getting ready for geo-oriented interactions with C*; our plan is to
> use DSE Solr integration for this purpose.
>
> On Mon, Jan 26, 2015 at 8:47 AM, SEGALIS Morgan <ms...@gmail.com>
> wrote:
>
>> Hi everyone,
>>
>> I wanted to know if someone has a feedback using geoHash algorithme with
>> cassandra ?
>>
>> I will have to create a "nearby" functionnality soon, and I really would
>> like to do it with cassandra for it's scalability, otherwise the smart
>> choice would be MongoDB apparently.
>>
>> Is Cassandra can be used to do geospacial search (with some kind of
>> radius) while being fast and scalable ?
>>
>> Thanks.
>>
>> --
>> Morgan SEGALIS
>>
>
>


-- 
Morgan SEGALIS

Re: Using Cassandra for geospacial search

Posted by Eric Stevens <mi...@gmail.com>.
We're getting ready for geo-oriented interactions with C*; our plan is to
use DSE Solr integration for this purpose.

On Mon, Jan 26, 2015 at 8:47 AM, SEGALIS Morgan <ms...@gmail.com> wrote:

> Hi everyone,
>
> I wanted to know if someone has a feedback using geoHash algorithme with
> cassandra ?
>
> I will have to create a "nearby" functionnality soon, and I really would
> like to do it with cassandra for it's scalability, otherwise the smart
> choice would be MongoDB apparently.
>
> Is Cassandra can be used to do geospacial search (with some kind of
> radius) while being fast and scalable ?
>
> Thanks.
>
> --
> Morgan SEGALIS
>