Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #8267

NIO multiplexing + thread pooling

From Giovanni Azua <bravegag@hotmail.com>
Newsgroups comp.lang.java.programmer
Subject NIO multiplexing + thread pooling
Date 2011-09-24 20:32 +0200
Message-ID <CAA3EEF8.78BF%bravegag@hotmail.com> (permalink)

Show all headers | View raw


Hi all,

I need to build a Client-Middleware-Database architecture in the context of
a course in my grad studies. In a nutshell, multiple Client component
instances connect and send random DML statements to multiple Middleware
(server) which in turn execute those DML against a Database server and send
the results back to the Clients.  After carefully studding the description
and requirements I have two choices for the communication between the Client
and Middleware:

- Classic sockets + thread pool.
- NIO multiplexing.

I think I will end implementing both but I am curious in the case of the NIO
multiplexing: in your experience would it increase performance to setup a
Thread Pool and associate one SelectionKey to one specific Thread in the
pool so that all read/write operations for each specific channel go through
one specific Thread from the Pool? From all code examples/tutorials/books I
have reviewed online the "Selector Thread" seems like a bottleneck to me. I
haven't seen this approach anywhere so that's why I am asking.

Thanks in advance,
Best regards,
Giovanni

PS: first time I post from Entourage .. hope the formatting etc is not too
horrible.

Back to comp.lang.java.programmer | Previous | NextNext in thread | Find similar


Thread

NIO multiplexing + thread pooling Giovanni Azua <bravegag@hotmail.com> - 2011-09-24 20:32 +0200
  Re: NIO multiplexing + thread pooling Tom Anderson <twic@urchin.earth.li> - 2011-09-24 20:46 +0100
    Re: NIO multiplexing + thread pooling Giovanni Azua <bravegag@hotmail.com> - 2011-09-24 23:09 +0200
    Re: NIO multiplexing + thread pooling Robert Klemme <shortcutter@googlemail.com> - 2011-09-25 11:33 +0200
      Re: NIO multiplexing + thread pooling Tom Anderson <twic@urchin.earth.li> - 2011-09-27 20:52 +0100
        Re: NIO multiplexing + thread pooling Robert Klemme <shortcutter@googlemail.com> - 2011-09-28 08:21 +0200
          Re: NIO multiplexing + thread pooling markspace <-@.> - 2011-09-28 08:20 -0700
            Re: NIO multiplexing + thread pooling Robert Klemme <shortcutter@googlemail.com> - 2011-09-28 18:56 +0200
              Re: NIO multiplexing + thread pooling markspace <-@.> - 2011-09-28 11:07 -0700
            Re: NIO multiplexing + thread pooling Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2011-09-28 17:39 -0700
              Re: NIO multiplexing + thread pooling markspace <-@.> - 2011-09-29 09:25 -0700
                Re: NIO multiplexing + thread pooling Lew <lewbloch@gmail.com> - 2011-09-30 07:46 -0700
                Re: NIO multiplexing + thread pooling markspace <-@.> - 2011-09-30 08:22 -0700
                Re: NIO multiplexing + thread pooling Lew <lewbloch@gmail.com> - 2011-09-30 08:30 -0700
                Re: NIO multiplexing + thread pooling markspace <-@.> - 2011-09-30 08:49 -0700
                Re: NIO multiplexing + thread pooling Robert Klemme <shortcutter@googlemail.com> - 2011-09-30 20:57 +0200
  Re: NIO multiplexing + thread pooling "John B. Matthews" <nospam@nospam.invalid> - 2011-09-25 00:26 -0400
    Re: NIO multiplexing + thread pooling Giovanni Azua <bravegag@hotmail.com> - 2011-09-25 11:13 +0200

csiph-web