{"action":"created","issue":{"url":"https://api.github.com/repos/ktorio/ktor/issues/286","repository_url":"https://api.github.com/repos/ktorio/ktor","labels_url":"https://api.github.com/repos/ktorio/ktor/issues/286/labels{/name}","comments_url":"https://api.github.com/repos/ktorio/ktor/issues/286/comments","events_url":"https://api.github.com/repos/ktorio/ktor/issues/286/events","html_url":"https://github.com/ktorio/ktor/issues/286","id":285259708,"node_id":"MDU6SXNzdWUyODUyNTk3MDg=","number":286,"title":"Using existing event-loop group","user":{"login":"dave08","id":813812,"node_id":"MDQ6VXNlcjgxMzgxMg==","avatar_url":"https://avatars1.githubusercontent.com/u/813812?v=4","gravatar_id":"","url":"https://api.github.com/users/dave08","html_url":"https://github.com/dave08","followers_url":"https://api.github.com/users/dave08/followers","following_url":"https://api.github.com/users/dave08/following{/other_user}","gists_url":"https://api.github.com/users/dave08/gists{/gist_id}","starred_url":"https://api.github.com/users/dave08/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dave08/subscriptions","organizations_url":"https://api.github.com/users/dave08/orgs","repos_url":"https://api.github.com/users/dave08/repos","events_url":"https://api.github.com/users/dave08/events{/privacy}","received_events_url":"https://api.github.com/users/dave08/received_events","type":"User","site_admin":false},"labels":[{"id":243686458,"node_id":"MDU6TGFiZWwyNDM2ODY0NTg=","url":"https://api.github.com/repos/ktorio/ktor/labels/problem","name":"problem","color":"cc317c","default":false}],"state":"open","locked":false,"assignee":{"login":"orangy","id":616841,"node_id":"MDQ6VXNlcjYxNjg0MQ==","avatar_url":"https://avatars1.githubusercontent.com/u/616841?v=4","gravatar_id":"","url":"https://api.github.com/users/orangy","html_url":"https://github.com/orangy","followers_url":"https://api.github.com/users/orangy/followers","following_url":"https://api.github.com/users/orangy/following{/other_user}","gists_url":"https://api.github.com/users/orangy/gists{/gist_id}","starred_url":"https://api.github.com/users/orangy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orangy/subscriptions","organizations_url":"https://api.github.com/users/orangy/orgs","repos_url":"https://api.github.com/users/orangy/repos","events_url":"https://api.github.com/users/orangy/events{/privacy}","received_events_url":"https://api.github.com/users/orangy/received_events","type":"User","site_admin":false},"assignees":[{"login":"orangy","id":616841,"node_id":"MDQ6VXNlcjYxNjg0MQ==","avatar_url":"https://avatars1.githubusercontent.com/u/616841?v=4","gravatar_id":"","url":"https://api.github.com/users/orangy","html_url":"https://github.com/orangy","followers_url":"https://api.github.com/users/orangy/followers","following_url":"https://api.github.com/users/orangy/following{/other_user}","gists_url":"https://api.github.com/users/orangy/gists{/gist_id}","starred_url":"https://api.github.com/users/orangy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orangy/subscriptions","organizations_url":"https://api.github.com/users/orangy/orgs","repos_url":"https://api.github.com/users/orangy/repos","events_url":"https://api.github.com/users/orangy/events{/privacy}","received_events_url":"https://api.github.com/users/orangy/received_events","type":"User","site_admin":false}],"milestone":null,"comments":8,"created_at":"2017-12-31T14:17:28Z","updated_at":"2018-12-12T09:02:31Z","closed_at":null,"author_association":"NONE","body":"Using components from libraries that have their own event loop causes the creation of an extra (unecessary) event loop. There are currently two possibilities: the library itself using Ktor's event loop, or providing the means to re-use the library's implemented event loop.\n\nIn the case of Vert.x, its event loop group can be retrieved by using vertx.nettyEventLoopGroup(), if it could be re-used by Ktor. Or for Ktor to pass its own event loop, it should pass a Transport that is responsible for building Vert.x event loop groups (because with native transport the even loop impl is diffrent). \n\nIn vert.x, in 3.5.1 there is a feature planned, for reuse of an existing event loop group and reuse for instance ktor event loop, if ktor exposes its event loop group."},"comment":{"url":"https://api.github.com/repos/ktorio/ktor/issues/comments/446512644","html_url":"https://github.com/ktorio/ktor/issues/286#issuecomment-446512644","issue_url":"https://api.github.com/repos/ktorio/ktor/issues/286","id":446512644,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NjUxMjY0NA==","user":{"login":"caillette","id":4329,"node_id":"MDQ6VXNlcjQzMjk=","avatar_url":"https://avatars0.githubusercontent.com/u/4329?v=4","gravatar_id":"","url":"https://api.github.com/users/caillette","html_url":"https://github.com/caillette","followers_url":"https://api.github.com/users/caillette/followers","following_url":"https://api.github.com/users/caillette/following{/other_user}","gists_url":"https://api.github.com/users/caillette/gists{/gist_id}","starred_url":"https://api.github.com/users/caillette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caillette/subscriptions","organizations_url":"https://api.github.com/users/caillette/orgs","repos_url":"https://api.github.com/users/caillette/repos","events_url":"https://api.github.com/users/caillette/events{/privacy}","received_events_url":"https://api.github.com/users/caillette/received_events","type":"User","site_admin":false},"created_at":"2018-12-12T09:02:31Z","updated_at":"2018-12-12T09:02:31Z","author_association":"NONE","body":"I'm facing a similar situation. I've built my own Netty framework for WebSockets, with some Web features that I would happily replace with Ktor. I want Ktor to reuse the `NioEventLoop` that I already set up for my Netty stuff. For now the only way to go with Ktor-1.0.0 is to subclass `NettyApplicationEngine` to force my `NioEventLoop` in. A better solution would be to take one or more `NioEventLoop` as parameters of `NettyApplicationEngine.Configuration`.\r\n\r\nNetty and Project-reactor can plug themselves into an existing `Executor`, and Netty can even reuse some `NioEventLoop` across servers. So there is no waste of threads in one JVM. Ktor could offer this feature I guess.\r\n"}}
{"actor":{"display_login":"caillette"}}