[infinispan-dev] Time measurement and expiry

Elias Ross genman at noderunner.net
Tue Oct 25 13:02:58 EDT 2011


Rather than a heap, I recall Netty had a hash wheel timer[1]. Which should
be better performing than a heap. You could get clever by having
multiple heaps, segmented by orders of magnitude. For example wheel 1
could have < 1 minute, 2 < 1 hour etc. Netty uses a lot of short lived
timers and performs well.

[1] http://docs.jboss.org/netty/3.1/api/org/jboss/netty/util/HashedWheelTimer.html

Obviously this uses some memory, but you could probably optimize it
somewhat to only work with Node instances.


More information about the infinispan-dev mailing list