Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. The AcceptingThreads remains largely the same
    1. Accepts incoming connections from socket.
    2. Creates the connection
    3. Makes the SocketChannel available to a SelectingThread  (add to map? and bump the selector??)
  2. A SelectingThread owns the selector
    1. on each iteration it registers the selector for all socket channels except those who are already scheduled.
      1. OP_READ flag raised for all.  OP_WRITE needs to be raised if the connection was unable to complete its last write
    2. calls the blocking Selector#select() passing the shortest idle timeout of any connection as the timeout argument
    3. when it returns
      1. create/schedule connection tasks on the io worker pool for each ready channel
      2. if the ready set didn't include our connection we identified with the shortest idle time then we need to schedule it anyway
      3. if the worker pool still now has no free executors then we should block until task(s) finish to stop us spinning
  3. NonBlockingSenderReceiver
    1. No longer a thread.
    2. Submittable job that write/read/write for a given number of iterations(?).
  4. IoWorkerTheadPool
    1. How big am I?
    2. Who owns me?
    3. How do I get shutdown?

 

...

    1. ?

Phase 3 - Change Broker to use have virtual host scope IO thread pools