{"action":"created","issue":{"url":"https://api.github.com/repos/netty/netty/issues/8680","repository_url":"https://api.github.com/repos/netty/netty","labels_url":"https://api.github.com/repos/netty/netty/issues/8680/labels{/name}","comments_url":"https://api.github.com/repos/netty/netty/issues/8680/comments","events_url":"https://api.github.com/repos/netty/netty/issues/8680/events","html_url":"https://github.com/netty/netty/pull/8680","id":393416532,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQwNDM5OTA1","number":8680,"title":"Decouble EventLoop details from the IO handling for each transport to…","user":{"login":"normanmaurer","id":439362,"node_id":"MDQ6VXNlcjQzOTM2Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/439362?v=4","gravatar_id":"","url":"https://api.github.com/users/normanmaurer","html_url":"https://github.com/normanmaurer","followers_url":"https://api.github.com/users/normanmaurer/followers","following_url":"https://api.github.com/users/normanmaurer/following{/other_user}","gists_url":"https://api.github.com/users/normanmaurer/gists{/gist_id}","starred_url":"https://api.github.com/users/normanmaurer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normanmaurer/subscriptions","organizations_url":"https://api.github.com/users/normanmaurer/orgs","repos_url":"https://api.github.com/users/normanmaurer/repos","events_url":"https://api.github.com/users/normanmaurer/events{/privacy}","received_events_url":"https://api.github.com/users/normanmaurer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-12-21T10:57:11Z","updated_at":"2018-12-21T10:59:48Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/netty/netty/pulls/8680","html_url":"https://github.com/netty/netty/pull/8680","diff_url":"https://github.com/netty/netty/pull/8680.diff","patch_url":"https://github.com/netty/netty/pull/8680.patch"},"body":"… allow easy re-use of code and customization\r\n\r\nMotiviation:\r\n\r\nAs today extending EventLoop implementations to add custom logic / metrics / instrumentations is only possible in a very limited way if at all. This is due the fact that most implementations are final or even package-private. That said even if these would be public there are the ability to do something useful with these is very limited as the IO processing and task processing are very tightly coupled. All of the mentioned things are a big pain point in netty 4.x and need improvement.\r\n\r\nModifications:\r\n\r\nThis changeset decoubled the IO processing logic from the task processing logic for the main transport (NIO, Epoll, KQueue) by introducing the concept of an IoHandler. The IoHandler itself is responsible to wait for IO readiness and process these IO events. The execution of the IoHandler itself is done by the SingleThreadEventLoop as part of its EventLoop processing. This allows to use the same EventLoopGroup (MultiThreadEventLoupGroup) for all the mentioned transports by just specify a different IoHandlerFactory during construction.\r\n\r\nBeside this core API change this changeset also allows to easily extend SingleThreadEventExecutor / SingleThreadEventLoop to add custom logic to it which then can be reused by all the transports. The ideas are very similar to what is provided by ScheduledThreadPoolExecutor (that is part of the JDK). This allows for example things like:\r\n\r\n  * Adding instrumentation / metrics:\r\n    * how many Channels are registered on an SingleThreadEventLoop\r\n    * how many Channels were handled during the IO processing in an EventLoop run\r\n    * how many task were handled during the last EventLoop / EventExecutor run\r\n    * how many outstanding tasks we have\r\n    ...\r\n    ...\r\n  * Implementing custom strategies for choosing the next EventExecutor / EventLoop to use based on these metrics.\r\n  * Use different Promise / Future / ScheduledFuture implementations\r\n  * decorate Runnable / Callables when submitted to the EventExecutor / EventLoop\r\n\r\nAs a lot of functionalities are folded into the MultiThreadEventLoopGroup and SingleThreadEventLoopGroup this changeset also removes:\r\n\r\n  * AbstractEventLoop\r\n  * AbstractEventLoopGroup\r\n  * EventExecutorChooser\r\n  * EventExecutorChooserFactory\r\n\r\nResult:\r\n\r\nFixes https://github.com/netty/netty/issues/8514 .\r\n\r\nMotivation:\r\n\r\nExplain here the context, and why you're making that change.\r\nWhat is the problem you're trying to solve.\r\n\r\nModification:\r\n\r\nDescribe the modifications you've done.\r\n\r\nResult:\r\n\r\nFixes #<GitHub issue number>. \r\n\r\nIf there is no issue then describe the changes introduced by this PR.\r\n"},"comment":{"url":"https://api.github.com/repos/netty/netty/issues/comments/449358226","html_url":"https://github.com/netty/netty/pull/8680#issuecomment-449358226","issue_url":"https://api.github.com/repos/netty/netty/issues/8680","id":449358226,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0OTM1ODIyNg==","user":{"login":"normanmaurer","id":439362,"node_id":"MDQ6VXNlcjQzOTM2Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/439362?v=4","gravatar_id":"","url":"https://api.github.com/users/normanmaurer","html_url":"https://github.com/normanmaurer","followers_url":"https://api.github.com/users/normanmaurer/followers","following_url":"https://api.github.com/users/normanmaurer/following{/other_user}","gists_url":"https://api.github.com/users/normanmaurer/gists{/gist_id}","starred_url":"https://api.github.com/users/normanmaurer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normanmaurer/subscriptions","organizations_url":"https://api.github.com/users/normanmaurer/orgs","repos_url":"https://api.github.com/users/normanmaurer/repos","events_url":"https://api.github.com/users/normanmaurer/events{/privacy}","received_events_url":"https://api.github.com/users/normanmaurer/received_events","type":"User","site_admin":false},"created_at":"2018-12-21T10:59:48Z","updated_at":"2018-12-21T10:59:48Z","author_association":"MEMBER","body":"Also @tjake as I know this might be something you are very interested in as it would allow to instrument things"}}
{"actor":{"display_login":"normanmaurer"}}