← Back to team overview

software-store-developers team mailing list archive

Re: Specification for "Top Rated" sections

 

On 06/24/2011 12:24 PM, Matthew Paul Thomas wrote:
> Aaron Peachey wrote on 23/06/11 12:11:
>> ...
>> We need to make changes to the server for this, and my thoughts about
>> how we approach this have come up with a few options.
> 
>> Option 2: maintain 5 fields against each app on the server, with the
>> total ratings for each step. This would be a much simpler calculation
>> at the time of submit/delete/modify/hide but a performance hit upon
>> retrieval of ratings in a bulk fashion because somewhere we need to do
>> the ELR calc for every app that has changes in ratings
>> This could either be done by calculating the ELR on the server before
>> returning it or just returning the 5 integers* and having the client
>> work out the ELR.
>> ...
>> *We need to keep in mind, that if we go down the path of showing a
>> distribution of ratings for each package, then we will probably need
>> the 5 integers to be returned to the client in order to work out the
>> distribution. With this in mind, I'd suggest we need to go with option
>> 2 and have the server return the 5 integers to the client, who then
>> uses them to calculate the ELR and work out the distribution of
>> ratings for display.
>> ...
> 
> I agree, I'd like to show the distribution of ratings as some sort of
> histogram. (You can see some preliminary sketches for this at
> <https://wiki.ubuntu.com/SoftwareCenter?action=AttachFile&do=view&target=p58-small.png>.)

Just a heads-up, I had been working on a branch that added histogram
data to the ratings api call, it landed yesterday finally, so this info
should be available with our next server deployment.  It keeps the five
integers serialized in a string even on the server (to avoid field
clutter on the model), but is basically option 2 as you descibe it, Aaron.

Cheers,

achuni.


Follow ups

References