Timer service

39 views
Skip to first unread message

Martin Furmanski

unread,
May 16, 2018, 2:19:19 PM5/16/18
to Netty discussions
Hello!

Did you ever consider exposing a pure timer service? I think a timer service would fit neatly in the framework as a general capability. You also already have the basic infrastructure of making it efficient, e.g. native timerfd-support on Linux.

Best Regards,
Martin Furmanski

Norman Maurer

unread,
May 16, 2018, 2:23:37 PM5/16/18
to Netty discussions
I am not sure what exactly you are looking for but we have HashedWheelTimer or EventLoop for this.

What is missing here ?

Bye
Norman

Martin Furmanski

unread,
May 17, 2018, 11:13:27 AM5/17/18
to Netty discussions
Well a timer service is a different type of service. Not sure I can find you a good reference, but read for example the beginning of this article:

"The other subsystem is just called "kernel timers"; it offers less precision but is more efficient in situations where the timer will probably be canceled before it fires."

Something like a Timer#reset() method, which resets the countdown to the event, is not natural with a task scheduler, although you can surely emulate it sort of.
They are related, but different.

You can read about Linux timerfd_settimer or POSIX setitimer to get a better feeling for what a timer service might offer.
Reply all
Reply to author
Forward
0 new messages