You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm a bit confused about MongoDB implementation. It is stated in the README that an adapter can support either SlidingTimeWindow or TumblingTimeWindow, however this is not the case for MongoDB adapter as far as I can tell from the implemented interfaces.
I believe MongoDB adapter does not support SlidingTimeWindow the same way Redis Adapter does. It rather resets the stats every whole time window (more like TumblingTimeWindow but without comparing to the previous window). I came to this conclusion after checking the adapter data model and the Rate strategy and I was wondering if that is by design or a bug?
The text was updated successfully, but these errors were encountered:
Oh it's a bug. 💦 You are completely right. The sliding timewindow implementation of MongoDB adapter is similar to TumblingTimeWindow but imperfect as you pointed.
remove the marker interface SlidingTimeWindowInterface from the adapter
add support for expire documents (like memcached) to avoid overflowing
I'll work on this but it may take some time because I'm not familiar with MongoDB.
Thanks for this great package!
I'm a bit confused about MongoDB implementation. It is stated in the README that an adapter can support either SlidingTimeWindow or TumblingTimeWindow, however this is not the case for MongoDB adapter as far as I can tell from the implemented interfaces.
I believe MongoDB adapter does not support
SlidingTimeWindow
the same way Redis Adapter does. It rather resets the stats every whole time window (more like TumblingTimeWindow but without comparing to the previous window). I came to this conclusion after checking the adapter data model and the Rate strategy and I was wondering if that is by design or a bug?The text was updated successfully, but these errors were encountered: