Linked by Hadrien Grasland on Fri 27th May 2011 11:34 UTC
General Development After having an interesting discussion with Brendan on the topic of deadlocks in threaded and asynchronous event handling systems (see the comments on this blog post), I just had something to ask to the developers on OSnews: could you live without blocking API calls? Could you work with APIs where lengthy tasks like writing to a file, sending a signal, doing network I/O, etc is done in a nonblocking fashion, with only callbacks as a mechanism to return results and notify your software when an operation is done?
Permalink for comment 474935
To read all comments associated with this story, please click here.
Comment by voidlogic
by voidlogic on Sun 29th May 2011 15:40 UTC
Member since:

All of this non-blocking IO being mentioned is great in theory; however, I have see countless cases of software re-written be be non-blocking and being slower.

A high profile example is the NIO connector for Apache Tomcat 6. Using the "new IO" libraries in recent JVM releases it promised to be faster than JIO (standard Java IO) and APR (Apache httpd IO). In every production environment I have ever benchmarked (and in the O'Riely Tomcat book) JIO is found to be fastest.

The Tomcat programmers are clearly experienced developers who know what they are doing, yet they failed to make their more complicated non-blocking connector faster...

Most aync implementations imply more syscalls- My thought, if reimplementing software to use async io, benchmark it! Just becuase your model/algorithm is faster in theory does not mean anything.

Can I live without blocking calls? Sure! But often it is simpler to be blocking and does not impact performance.

Reply Score: 3