mongodb - Meteor Alternative to Aggregate Stats? -


i'm looking $avg (aggregation) on collection, meteor doesn't support it. solution static , not reactive, or use foreach loop. not performance. think way hold on separated collection "stats". how should work, how calculated , stored , used? have experience , great solutions?

interesting question! there packages enable use aggregation pipeline such https://github.com/meteorhacks/meteor-aggregate/ said aren't reactive.

perhaps setup cursor.observechanges on relevant collections, or tracker.autorun, result in lot of code running takes longer finish next change coming in, backlog of events.

i think better way have separate stats collection runs regularly. need realtime updates, or once per minute?

there event queue tools https://github.com/artwells/meteor-queue that.

good luck!


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -