Do you know any parallel modified moving average algorithm?
I want quickly calculate moving average but not with sequential algorithms. I want use parallel algorithms but I have still not found solution.
The best algorithm which I found is sequential algorithm modified moving average for measuring computer performance:
new_avg = alfa(new_time, previous_time) * new_value + (1-alfa(new_time, previous_time)) * previous_avg
alfa(new_time, previous_time) = 1- exp(-(new_time - previous_time)/moving_period)
Some other algorithms are good also but I have not found parallel algorithms.
It is hard question and I need some help with it.
Consider that I want count events that will come in random time order - early events can come later that late events - you could assume that early event can be skipped/become obsolete after processing late events (or with some timeout). Not assume sequential time order of events and that event from same time will come with same time.
I do not want use any algorithm which require to remember many samples (especially all) it should only remember time and previous average value maybe some additional value but not all or same samples. Consider that algorithm can make some minor errors not need to be perfect if reason of it is some performance boost.
It will be very nice if it will use sharding but not required.