Re: Migrating a Limit/Offset Pagination and Sorting to Cassandra

2017-10-07 Thread Daniel Hölbling-Inzko
I now finished a implementation where I just save the pagination state to a separate table and retrieve it to get to the next page. So far it seems to work pretty well. But I have to do more thorough testing. Greetings. On Wed 4. Oct 2017 at 19:42, Jon Haddad wrote: > Seems

Re: Migrating a Limit/Offset Pagination and Sorting to Cassandra

2017-10-04 Thread Jon Haddad
Seems pretty overengineered, imo, given you can just save the pagination state as Andy Tolbert pointed out. > On Oct 4, 2017, at 8:38 AM, Daniel Hölbling-Inzko > wrote: > > Thanks for pointing me to Elassandra. > Have you had any experience running this in

Re: Migrating a Limit/Offset Pagination and Sorting to Cassandra

2017-10-04 Thread Greg Saylor
Yes we’re using it in production in a 22 node cluster across 4 Amazon regions in a large production system. We were using DSE but recently migrated to it. There are a few quirks, (copy_to isn’t supported, for example), but so far been pretty pleased with it. - Greg > On Oct 4, 2017, at 8:38

Re: Migrating a Limit/Offset Pagination and Sorting to Cassandra

2017-10-04 Thread Daniel Hölbling-Inzko
Thanks for pointing me to Elassandra. Have you had any experience running this in production at scale? Not sure if I I think ES will enter the picture at some point since some things just don't work efficiently with Cassandra and so it's inevitable in the end. But I'd rather delay that step for

Re: Migrating a Limit/Offset Pagination and Sorting to Cassandra

2017-10-04 Thread Andy Tolbert
Hi Daniel, To answer this question: > How long is the paginationState from the driver current? The paging state itself contains information about the position in data where to proceed from, so you don't need to worry about it becoming stale/invalid. The only exception is if you upgrade your

Re: Migrating a Limit/Offset Pagination and Sorting to Cassandra

2017-10-04 Thread Greg Saylor
Without knowing other details, of course, have you considered using something like Elassandra? That is a pretty tightly integrated Cassandra + Elastic Search solution. You’d insert data into Cassandra like you do normally, then query it with Elastic Search. Of course this would increase the

Re: Migrating a Limit/Offset Pagination and Sorting to Cassandra

2017-10-04 Thread Daniel Hölbling-Inzko
Thanks Kurt, I thought about that but one issue is that we are doing limit/offset not pages. So one customer can choose to page through the list in 10 Item increments, another might want to page through with 100 elements per page. So I can't have a clustering key that represents a page range.

Re: Migrating a Limit/Offset Pagination and Sorting to Cassandra

2017-10-03 Thread kurt greaves
I get the impression that you are paging through a single partition in Cassandra? If so you should probably use bounds on clustering keys to get your "next page". You could use LIMIT as well here but it's mostly unnecessary. Probably just use the pagesize that you intend for the API. Yes you'll

Migrating a Limit/Offset Pagination and Sorting to Cassandra

2017-10-03 Thread Daniel Hölbling-Inzko
Hi, I am currently working on migrating a service that so far was MySQL based to Cassandra. Everything seems to work fine so far, but a few things in the old services API Spec is posing some interesting data modeling challenges: The old service was doing Limit/Offset pagination which is obviously