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
We´re also in the hundreds of thousands scale. So loading everything is unfortunately not possible.
If anyone has implemented pagination using Ripple or other solutions with Ruby, I´d love to see it!
Cheers,
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:
> My solution:
> 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 -----
> 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
> # Belongs to a SubscriberList
> validates_presence_of :email
> class SubscriberList
> # Has_many Subscribers
> validates_presence_of :user
> --
> _______________________________________________
_______________________________________________
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.
| ||||||||||||||