coralproject / cay

Front-end code for Coral community tools
Other
20 stars 5 forks source link

Use "Live" min / max / other filter values #110

Closed jde closed 8 years ago

jde commented 8 years ago

Challenge: In a live system we will have no way of hardcoding meaningful min / max values for filters. We need a way to fetch them from the db. These values will need to react to changes in dimension filters (for example, if a user chooses Section->Sports, all the values for the filters need to update to reflect sports section only values.)

Simple Solution: Construct a simple min/max query for each of the filters and send them off. Preliminary tests on residential internet in the same region of our sever shows that we can get dozens of small requests like these back in under 2 seconds. This may vary wildly by region.

Robust Solution: Data layer precomputes a "meta stats packet" (https://github.com/coralproject/pillar/issues/64) for each dimensional breakdown. A request for this packet will give min, max, mean, standard deviation and maybe more for each value based in that dimension. This should account for most of the stats, although some defaults may still need more nuanced thought to may meaningful (aka, durations, etc...)

jde commented 8 years ago

I does not make sense to invest in the "Simple" (hacky) solution. Let's go Robust or go home.

Front end implementation is blocked by coralproject/pillar#64

riley commented 8 years ago

https://github.com/coralproject/cay/issues/22 related