{"action":"created","issue":{"url":"https://api.github.com/repos/uber/tchannel/issues/1150","labels_url":"https://api.github.com/repos/uber/tchannel/issues/1150/labels{/name}","comments_url":"https://api.github.com/repos/uber/tchannel/issues/1150/comments","events_url":"https://api.github.com/repos/uber/tchannel/issues/1150/events","html_url":"https://github.com/uber/tchannel/pull/1150","id":100597878,"number":1150,"title":"[tchannel-go] - Allow subchannel handler registrations","user":{"login":"aravindvs","id":13004672,"avatar_url":"https://avatars.githubusercontent.com/u/13004672?v=3","gravatar_id":"","url":"https://api.github.com/users/aravindvs","html_url":"https://github.com/aravindvs","followers_url":"https://api.github.com/users/aravindvs/followers","following_url":"https://api.github.com/users/aravindvs/following{/other_user}","gists_url":"https://api.github.com/users/aravindvs/gists{/gist_id}","starred_url":"https://api.github.com/users/aravindvs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aravindvs/subscriptions","organizations_url":"https://api.github.com/users/aravindvs/orgs","repos_url":"https://api.github.com/users/aravindvs/repos","events_url":"https://api.github.com/users/aravindvs/events{/privacy}","received_events_url":"https://api.github.com/users/aravindvs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-12T17:51:10Z","updated_at":"2015-08-12T19:53:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/uber/tchannel/pulls/1150","html_url":"https://github.com/uber/tchannel/pull/1150","diff_url":"https://github.com/uber/tchannel/pull/1150.diff","patch_url":"https://github.com/uber/tchannel/pull/1150.patch"},"body":"@prashantv \r\n\r\nThis patch allows the subchannels to register their own set of handlers\r\nindependent of the topchannel. They will still be using the topchannel's\r\nhost/port for all the traffic.\r\n\r\nThe connection management involves maintaining a pointer to the\r\nsubchannel map (similar to handler map). When a request comes in, we\r\nfirst look in the handler map to find the handler, if it fails, we try\r\nthe subchannel map to see if we can get one.\r\n(In case of a non-existant handler, we will effectively be doing 3 O(1)\r\nlookups. If all the traffic comes through subchannel servicename/op map we will\r\nhave one unnecessary lookup on the topchannel)\r\n\r\nThis shouldn't break any existing APIs. The ping test uses this new feature to register its\r\nown handler on a subchannel.\r\nTODO:\r\n----\r\n* Add peer support for subchannels - right now they are using the same\r\n  peer list as the topchannel"},"comment":{"url":"https://api.github.com/repos/uber/tchannel/issues/comments/130426115","html_url":"https://github.com/uber/tchannel/pull/1150#issuecomment-130426115","issue_url":"https://api.github.com/repos/uber/tchannel/issues/1150","id":130426115,"user":{"login":"prashantv","id":140159,"avatar_url":"https://avatars.githubusercontent.com/u/140159?v=3","gravatar_id":"","url":"https://api.github.com/users/prashantv","html_url":"https://github.com/prashantv","followers_url":"https://api.github.com/users/prashantv/followers","following_url":"https://api.github.com/users/prashantv/following{/other_user}","gists_url":"https://api.github.com/users/prashantv/gists{/gist_id}","starred_url":"https://api.github.com/users/prashantv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prashantv/subscriptions","organizations_url":"https://api.github.com/users/prashantv/orgs","repos_url":"https://api.github.com/users/prashantv/repos","events_url":"https://api.github.com/users/prashantv/events{/privacy}","received_events_url":"https://api.github.com/users/prashantv/received_events","type":"User","site_admin":false},"created_at":"2015-08-12T19:53:51Z","updated_at":"2015-08-12T19:53:51Z","body":"Thanks for starting this @aravindvs"}}