Designing a "community rating" system

I need to build a rating system for a project.

The idea is that a number of different user actions within the system
will contribute to an individual’s standing. Creating one kind of
thing, reviewing something that someone else has done, participating
in an activity…basically there are a set of disparate actions that
will all add up to rank a user.

I’m thinking that I’d like to accumulate these actions in a table so
that if I need to tweak the ranking algorithm I can do that based on
the existing data.

My question is, what is the best way to mesh this into my application?

Certainly I could add logic in each controller action as appropriate,
but that is messy. I’d like something that has some separation from
the main structure of the app.

Joe

Joe wrote:

I need to build a rating system for a project.

[…]

I think there are plugins to do this; have you looked at them?

Joe

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

Joe wrote:

I haven’t seen any plugins that do this sort of thing.

acts_as_rated?

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

That is something different, for a given type of model users can rate
it. So for a blog system other users could rate each post.

I need something more advanced, ratings (community standing, more
accurately) are driven by how a user behaves in the system.

For example on Yahoo! Answers you get points for signing up, for
answering questions, having your answer selected as the best answer,
etc.

Joe

On Nov 11, 10:42 am, Marnen Laibow-Koser <rails-mailing-l…@andreas-

I haven’t seen any plugins that do this sort of thing. I’m aware of
things like communityengine and insooshi (railsspace) that provide a
larger social networking site, but I need something that I can add to
an existing application.

Something “AOP-like” maybe?

In a Java app I worked on we used JMS for communication across the
tiers and it was convenient to then just persist the appropriate
messages for this sort of thing.

On Nov 11, 6:32 am, Marnen Laibow-Koser <rails-mailing-l…@andreas-
s.net> wrote:

Joe wrote:

I need to build a rating system for a project.

Just riffing here…

I would do this as observers on the models that when created increase
my rating. In that I would save some form of rating event model that
encapsulates the events. Having the models around would allow you to
rerate everyone if you found that your weighting of events needs to be
adjusted.

Something along the lines of: gist:232816 · GitHub

I would work it out first with an observer or two and then refactor
down to a root observer that can be parameterized to do the right
thing.

Mark