Uploaded image for project: 'MINA'
  1. MINA
  2. DIRMINA-453

Multiple IoServices for one java.nio.Selector

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-M1
    • Fix Version/s: 2.0.8
    • Component/s: Core
    • Labels:
      None
    • Environment:
      All

      Description

      Please see the discussion:

      http://www.nabble.com/multiple-handlers-per-IoService-t4481513s16868.html#a12779214

      Based on discussions with Trustin, this is functionality that will be in the 2.0 release. It seems to be inefficient to create a new selector/thread for each IoService. This means that an application that is listening on 2 ports, would need two java.nio.Selectors, two Selector worker threads and each have a pool of workers.

      Not only does this create much duplication, but more threads will be created than may be necessary.

        Activity

        Hide
        elecharny Emmanuel Lecharny added a comment -

        I think we already have the capacity to use only one single selector for many sockets. No need to create new acceptors, just inject the ServerSocket into this NioAcceptor, and you are done.

        Show
        elecharny Emmanuel Lecharny added a comment - I think we already have the capacity to use only one single selector for many sockets. No need to create new acceptors, just inject the ServerSocket into this NioAcceptor, and you are done.
        Hide
        elecharny Emmanuel Lecharny added a comment -

        It's a long time we can bind more than one socket to a single acceptor, thus to more than one selector. Now, we don't support the association of more than one IoService to a single selector.

        We won't do that in 2.0 anyway. This is opened for discussion in 3.0

        Show
        elecharny Emmanuel Lecharny added a comment - It's a long time we can bind more than one socket to a single acceptor, thus to more than one selector. Now, we don't support the association of more than one IoService to a single selector. We won't do that in 2.0 anyway. This is opened for discussion in 3.0

          People

          • Assignee:
            Unassigned
            Reporter:
            elihusmails Mark Webb
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development