NeverBlock MySQL Support
We are pleased to announce the availability of a MySQL database driver for NeverBlock. This is the second database driver for NeverBlock after the PostgreSQL driver. We hope that with time, this family will grow.
Of course the driver does all that you expect from a decent NeverBlock driver. It can do IO operations concurrently and in a transparent manner, thanks to NeverBlock. An interesting side effect emerged during the development of this driver. We were required to update the current MySQL driver to be able to do async operations. Once those were done, we discovered that the basic foundation for threaded support was there. Hence we went forward and implemented it (with help from Ruby gurus like Aman Gupta and Roger Pack).
What we have now is a new general purpose MySQL driver that supports threaded access and async operations. This means that you can send queries to a MySQL server in a concurrent manner from Ruby applications. This is big news for those waiting for Rails thread safety. Finally there is a MySQL driver that can help them achieve that concurrency.
We have packaged this as mysqlplus, it lives in github now and people are welcome to try it out.
The package comes with a couple test scripts that show case the usage of the new library in a threaded or an evented environment.
Here are the results of running 10 “select sleep(1)” queries in normal, threaded and evented modes
MySQL: Normal vs Threaded vs Evented
These should be good news for MySQL users. With the near release of Rails 2.2 this driver can help exploit threaded servers for Rails.
