Julien Vermillard wrote:
<snip>
The polled is here because it's base classes for transport
implementations using event strategy based on system calls behaving like
poll() (which can be in fact poll, epoll, kqueue or select depending
of the JVM/OS configuration).
Those class aren't "polling" in a loop for checking session status,
it's the law level kernel/system implementation which does it.
That's not really true. These classing are in fact in a loop that
continually checks for network events that need to be processed. The
check for network events is handled efficiently by the OS so that if
there are no events to process the thread will block until there is
something to process. The system level mechanism for handling network
events (epoll, kqueue, /dev/epoll, etc.) doesn't change the fact that
there is still looping being done to capture and process network events
and therefor these classes are indeed polling.
Additionally, in academia, "event-driven" and "polling" are often used
interchangeably when referring to low level network APIs. IIRC, the
Stevens book uses the terms interchangeably as well. So, anyone with
significant experience in network programming will recognize the meaning
of the "polling" nomenclature.
So, I wouldn't say those classes are "badly named". That being said, it
wouldn't bother me if these classes were renamed to use "select" since
that is the NIO nomenclature.
-Mike
<snip>