[ANN] nio4r 2.0.0: cross-platform asynchronous I/O primitives for Ruby

nio4r is a set of low-level asynchronous I/O primitives with multiple
cross-platform native code backends including a C extension based on libev,
a java.nio backend for JRuby, and a pure Ruby version based on
Kernel.select:

ActionCable, a web socket framework included with Rails 5, uses nio4r for
monitoring multiple WebSockets for I/O readiness.

···

--

nio4r 2.0.0 primarily includes new features and bugfixes, with few breaking
changes. The primary reason for bumping the major version is dropping
support for all Ruby versions prior to 2.2.2.

The main new feature announcement is NIO::ByteBuffer: a StringIO-like type
backed by native code implementations which can be used for
high-performance non-blocking I/O. The implementation was contributed to
nio4r as a Google Summer of Code project by Upekshe Jayasekera:

nio4r is now located under the GitHub "socketry" project. Expect more
socketry-related announcements soon!

Full change log:

   -

   #53 <https://github.com/socketry/nio4r/pull/53> Limit lock scope to
   prevent recursive locking. (@johnnyt <https://github.com/johnnyt>)
   -

   #95 <https://github.com/socketry/nio4r/pull/95> NIO::ByteBuffer Google
   Summer of Code project. (@UpeksheJay <https://github.com/UpeksheJay>,
   @tarcieri <https://github.com/tarcieri>)
   -

   #111 <https://github.com/socketry/nio4r/pull/111> NIO::Selector#backend
   introspection support. (@tarcieri <https://github.com/tarcieri>)
   -

   #112 <https://github.com/socketry/nio4r/pull/112> Upgrade to libev 4.23.
   (@tarcieri <https://github.com/tarcieri>)
   -

   #119 <https://github.com/socketry/nio4r/pull/119> Disambiguate wakeup vs
   timeout (fixes #63, #66). (@tarcieri <https://github.com/tarcieri>)
   -

   #124 <https://github.com/socketry/nio4r/pull/124> Monitor interests API
   improvements. (@tarcieri <https://github.com/tarcieri>)
   -

   Drop Ruby 2.0 and 2.1 support, require Ruby 2.2.2+. (@tarcieri
   <https://github.com/tarcieri>)

--
Tony Arcieri

* Are bytebuffers to be integrated in celluloid-io?

I've been planning on doing another release of Celluloid soon. I might look
at doing integration work then.

They certainly seem to be a candidate, specially the tcp socket buffer
operations, but since nio4r moved organization, and celluloid-io being in
maintenance mode/not receiving contributions at all for quite some time,
this might be unclear.

Right now I've been playing with making an async/await framework for Ruby
which is much simpler than Celluloid::IO. But yes, Celluloid::IO is a
candidate for such buffers.

* I've checked the signatures for read_from and write_to from io's,and one
can't set read/write timeouts.

read_from / write_to are non-blocking, so timeouts are irrelevant.

···

On Thu, Dec 29, 2016 at 7:01 AM, Tiago Cardoso <honeyryderchuck@gmail.com> wrote:

--
Tony Arcieri