dmvk commented on pull request #15501:
URL: https://github.com/apache/flink/pull/15501#issuecomment-878890314


   Hi @yittg,
   
   Overall idea and approach looks pretty good 👍 I've only used a watcher 
interface before, informers seems to be simplifying things by a lot! 😎 
   
   From the first pass, my biggest concern is about threading model as number 
of threads grows linearly with number of jobs ("processors"). I'm pretty sure 
that single thread, that you already use for handling events in informer prior 
putting them into queue, should be enough for handling watchers as well.
   
   The idea how to solve this would be completely getting rid of `processors` 
and implementing a custom `ResourceEventHandler`. As long as actions for adding 
and removing "flink watchers" would be executed in the thread we use for 
informer events, there would be no need for additional synchronization.
   
   I've tried to quickly outline the "single threaded" solution in the 
following gist: https://gist.github.com/dmvk/42f2e997104d4da54842684bf2ea96c2
   
   WDYT?
   
   Best,
   D.


-- 
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]


Reply via email to