[Abacus] Differentiating accumulate rating and aggregate rating


KRuelY <kevinyudhiswara@...>
 

Hi,

With the new implementation of resource-instance level rating, there is a
need to differentiate the accumulation(resource instance) rating and
aggregation(resource) rating.

For example, in the case of average accumulation:

accumulate function will result in an object *{ sum: w, count: x, avg: y }
*
aggregation function will result in a number *z*(summing up all resource
instance's avg), because adding up sum, count, and avg is not making any
sense.

If we are keeping one rating function for both, we would need to
differentiate whether it is accumulate or aggregate.

There are 3 ways(?) to do this:
1. have 2 rating function for each accumulate and aggregate.
2. have one function, but passed in context/scope.
3. no changes. Have the rating function differentiate the two by looking at
the object being passed or find a work around to make both accumulate and
aggregate keep the same structure.

Should we keep 3?







--
View this message in context: http://cf-dev.70369.x6.nabble.com/Abacus-Differentiating-accumulate-rating-and-aggregate-rating-tp3120.html
Sent from the CF Dev mailing list archive at Nabble.com.

Join {cf-dev@lists.cloudfoundry.org to automatically receive all group messages.