{"action":"created","issue":{"url":"https://api.github.com/repos/kuzzleio/kuzzle/issues/110","labels_url":"https://api.github.com/repos/kuzzleio/kuzzle/issues/110/labels{/name}","comments_url":"https://api.github.com/repos/kuzzleio/kuzzle/issues/110/comments","events_url":"https://api.github.com/repos/kuzzleio/kuzzle/issues/110/events","html_url":"https://github.com/kuzzleio/kuzzle/pull/110","id":123246479,"number":110,"title":"Worker responses refactor","user":{"login":"scottinet","id":12997967,"avatar_url":"https://avatars.githubusercontent.com/u/12997967?v=3","gravatar_id":"","url":"https://api.github.com/users/scottinet","html_url":"https://github.com/scottinet","followers_url":"https://api.github.com/users/scottinet/followers","following_url":"https://api.github.com/users/scottinet/following{/other_user}","gists_url":"https://api.github.com/users/scottinet/gists{/gist_id}","starred_url":"https://api.github.com/users/scottinet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottinet/subscriptions","organizations_url":"https://api.github.com/users/scottinet/orgs","repos_url":"https://api.github.com/users/scottinet/repos","events_url":"https://api.github.com/users/scottinet/events{/privacy}","received_events_url":"https://api.github.com/users/scottinet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-12-21T10:05:02Z","updated_at":"2015-12-21T12:45:29Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/kuzzleio/kuzzle/pulls/110","html_url":"https://github.com/kuzzleio/kuzzle/pull/110","diff_url":"https://github.com/kuzzleio/kuzzle/pull/110.diff","patch_url":"https://github.com/kuzzleio/kuzzle/pull/110.patch"},"body":"To remove unnecessary Kuzzle dependencies from the router controller and to prepare the incoming protocol plugins, this pull request changes the way the router controller handles worker responses, following @stafyniaksacha suggestion:\r\n\r\n* renamed ``core/responseListener`` to ``core/workerListener`` to make it easier to understand what it does\r\n* removed all references to the ``workerListener`` from the router controller. Also removed empty promises handling. Promises resulting from calls to the funnel controller now always resolve to the according responseObject\r\n* the main Kuzzle object now contains a global ``workerListener`` instance\r\n* controllers behind the funnel controller now always return a promise resolving to the awaited response, either directly, or by returning the result of ``workerListener.add``\r\n* the ``workerListener`` now awaits worker responses using the internal broker, and resolve/reject the stored promises, letting the router controller respond to the requesting client. It doesn't notify directly anymore.\r\n"},"comment":{"url":"https://api.github.com/repos/kuzzleio/kuzzle/issues/comments/166296604","html_url":"https://github.com/kuzzleio/kuzzle/pull/110#issuecomment-166296604","issue_url":"https://api.github.com/repos/kuzzleio/kuzzle/issues/110","id":166296604,"user":{"login":"xbill82","id":5023426,"avatar_url":"https://avatars.githubusercontent.com/u/5023426?v=3","gravatar_id":"","url":"https://api.github.com/users/xbill82","html_url":"https://github.com/xbill82","followers_url":"https://api.github.com/users/xbill82/followers","following_url":"https://api.github.com/users/xbill82/following{/other_user}","gists_url":"https://api.github.com/users/xbill82/gists{/gist_id}","starred_url":"https://api.github.com/users/xbill82/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xbill82/subscriptions","organizations_url":"https://api.github.com/users/xbill82/orgs","repos_url":"https://api.github.com/users/xbill82/repos","events_url":"https://api.github.com/users/xbill82/events{/privacy}","received_events_url":"https://api.github.com/users/xbill82/received_events","type":"User","site_admin":false},"created_at":"2015-12-21T12:45:29Z","updated_at":"2015-12-21T12:45:29Z","body":"Yo! Seems like a great job! As far as I can understand, I say :+1: :+1: :+1: "}}