Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-1155

Support Netty for I/O

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.0.0
    • Affects Version/s: None
    • Component/s: Async
    • Labels:
      None

      We will still leverage AIO and have no plans currently to remove AsynchronousSocketChannelStream. This is the default implementation that the driver uses for async.
      Furthermore, there is not a hard dependency on Netty. It's opt-in (via a system property, though that may change), and if you don't opt-in, Netty does not need to be on the classpath.

      But Netty gives us some advantages.

      1. AsynchronousSocketChannel was introduced in Java 7, and we would like a solution for our Java 6 users. Netty is supported on Java 6 and up.
      2. Our AsynchronousSocketChannel-based implementation does not support SSL, and adding that support is non-trivial. With Netty, it's just a few lines of code.
      3. For applications that already use Netty for the rest of their I/O needs, a Netty-based driver for MongoDB may integrate better. For example, they could share an instance of an NioEventLoopGroup.

            Assignee:
            ross@mongodb.com Ross Lawley
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: