Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Pagination with Ripple
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Martin Stabenfeldt  
View profile  
 More options Jul 19 2012, 3:15 am
From: Martin Stabenfeldt <mar...@stabenfeldt.net>
Date: Thu, 19 Jul 2012 09:15:25 +0200
Local: Thurs, Jul 19 2012 3:15 am
Subject: Re: Pagination with Ripple

Hi,

We´re also in the hundreds of thousands scale. So loading everything is unfortunately not possible.
Would be nice if one could settle for one database, instead of mixing different types. Nice to only care about scaling and providing redundancy for Riak, instead of Riak and PostgreSQL :-)

If anyone has implemented pagination using Ripple or other solutions with Ruby, I´d love to see it!

Cheers,
Martin Stabenfeldt

On Wednesday, 18 July 2012 at 16:24, Alex Thompson wrote:
> My 2c:

> 1000s of subscribers per list isn't a problem. Just have a data object which represents the subscriber list, store a list of subscriber ids in the subscriber list object. Load the whole list every time, and sort/paginate in your app code.

> Unless you're planning on shuffling the lists a lot, that will be the most direct way to implement it.  

> Caveats:
> Unless you're planning on running into the object size limit with subscriber ids or planning on being able to handle thousands of simultaneous subscriptions to the same list, but don't want to handle conflict resolution.

> My solution:
> I ran into this same problem with my app, but with hundreds of thousands to millions of uuids per list. I tried a couple of Riak based solutions with different data formats, but I wasn't really satisfied with any of them. I ended up just having a uuid to uuid lookup table in a postgres database to handle internal item to item relations using the uuid datatype for efficient indexing.

> I'm not sure if there are any good support libraries for handling polyglot consistency in ruby, or if you could blend database ActiveRecord and ripple models in the same app (I mean, you probably can, right? You'd just have objects inherit from different base classes? There are probably some unhandled relation-chaining edge cases though... although ActiveRecord can be magic sometimes.)

> - Alex  

> ----- Original Message -----
> From: "Martin Stabenfeldt" <mar...@stabenfeldt.net (mailto:mar...@stabenfeldt.net)>
> To: riak-us...@lists.basho.com (mailto:riak-us...@lists.basho.com)
> Sent: Wednesday, July 18, 2012 2:54:35 AM
> Subject: Pagination with Ripple

> Dear List,  

> I´m planning to use Riak as my primary DB for my Rails app.  

> The first issue I´ve encountered is pagination.  

> I got a SubscriberList which may contain 1000´s of Subscribers. Any suggestion on how I can implement pagination? My plan was to use will_paginate .  

> class Subscriber  
> include Ripple :: Document  

> # Belongs to a SubscriberList  
> one :subscriber_list  
> property :subscriber_list_key , String  
> property :email , String  
> property :referer , String  
> timestamps!  

> validates_presence_of :email  
> end  

> class SubscriberList  
> include Ripple :: Document  
> one :user  
> property :user_key , String  

> # Has_many Subscribers  
> many :subscribers , :using => :reference  
> # Used by User to find which SubscriberList he has  
> property :subscriber_key , String  
> property :title , String  
> property :deleted , Boolean  
> timestamps!  

> validates_presence_of :user  
> end  

> --  
> Martin Stabenfeldt  
> Tlf: +47 93441707  

> _______________________________________________
> riak-users mailing list
> riak-us...@lists.basho.com (mailto:riak-us...@lists.basho.com)
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

_______________________________________________
riak-users mailing list
riak-us...@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.