franz1981 commented on pull request #44:
URL: https://github.com/apache/qpid-jms/pull/44#issuecomment-953921514


   @gemmellr I'm going to send a separate commit that handle this same issue in 
a different way, similar to what https://github.com/apache/qpid-jms/pull/45 has 
done 
   ie completions are handled by a shared fork join pool (capable of work 
stealing) that will be shutdown deterministically when no JmsSession(s) are 
opened anymore (and reopened on demand).
   
   Using a ForkJoin executor:
   
   - enable work-stealing (and better load balancing)
   - better handle contention while submitting from multiple threads
   
   A different way to handle this should be to create a shared (reference 
counted) event loop group and assign a different event loop executor in 
round-robin to each session (that need completion processing), with some good 
points:
   - each session would have a single threaded executor (no need to have a 
separate concurrent queue to handle completions)
   - completion thread won't change during the session lifecycle
   
   And an important drawback:
   - no runtime load balancing: if an executor is shared by many busy sessions 
(processing many completions), an unlucky session won't have any other Thread 
helping to process its completions, despite the other event loops are idle


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to