[Swift-devel] coaster io with NIO.

Mihael Hategan hategan at mcs.anl.gov
Mon Apr 9 10:06:56 CDT 2012


So I wrote this NIO version of the coaster send/multiplexer loops. It
uses selectors instead of whatever was there before. 

The multiplexer (i.e. reading) wasn't and issue because there is a way
to test whether a read will block or not, but writing data to a
collection of sockets without NIO suffers from one socket blocking
everything because there is no way to test that a write on a socket will
not block.

The initial implementation was not NIO based because there is no easy
way to convince the jglobus GSI libraries to work with NIO, so my NIO
thing only applies to plain TCP sockets. I should probably deal with
that, although it's not an issue when you have a single coaster service.

I'll commit the changes today so that you guys can test it. Works fine
on localhost so far.

Mihael




More information about the Swift-devel mailing list