Linux AIO Support


Did you planned to support Linux Asynchronous I/O ?

SwiftNIO is committed to using the best low-level APIs the operating system provides. Currently, we use epoll on Linux, kqueue or Network.framework on iOS, macOS, ...

As you've read in the article Linux's AIO API is still being improved and also glibc doesn't actually give you access to it (glibc POSIX AIO vs. Linux AIO). Supporting it right now requires the right kernel (4.18+) and libaio which is burden given that we currently support Ubuntu 14.04+ (until April which will be close to NIO 2's release so we can probably drop support then). Unfortunately, even Ubuntu 16.04 (LTS) is on an older kernel right now...

Said that, if it proves to give better performance and is viable without putting too much burden on our users (Kernel/libaio dependency) it's highly likely that SwiftNIO will support it, the work actually required shouldn't be bad at all. So my recommendation (obviously biased because being on the SwiftNIO team): Use SwiftNIO and it'll handle it for you :slight_smile:.


It’s great to know that Swift NIO will always abstract the best approach for us anyway.