{"action":"created","comment":{"url":"https://api.github.com/repos/basho/riak_core/pulls/comments/103312528","pull_request_review_id":24095337,"id":103312528,"diff_hunk":"@@ -0,0 +1,104 @@\n+%% -------------------------------------------------------------------\n+%%\n+%% Copyright (c) 2017 Basho Technologies, Inc.  All Rights Reserved.\n+%%\n+%% This file is provided to you under the Apache License,\n+%% Version 2.0 (the \"License\"); you may not use this file\n+%% except in compliance with the License.  You may obtain\n+%% a copy of the License at\n+%%\n+%%   http://www.apache.org/licenses/LICENSE-2.0\n+%%\n+%% Unless required by applicable law or agreed to in writing,\n+%% software distributed under the License is distributed on an\n+%% \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n+%% KIND, either express or implied.  See the License for the\n+%% specific language governing permissions and limitations\n+%% under the License.\n+%%\n+%% -------------------------------------------------------------------\n+\n+%%% @doc\n+%%%      The `riak_core_info_service' is a way for dependencies of\n+%%%      `riak_core' to be registered to receive messages from\n+%%%      `riak_core' without a cyclic dependency graph.\n+%%%\n+%%%      == Callbacks ==\n+%%%      The dependency needs to know to which pid it should send\n+%%%      requests for `riak_core' data. The pid will be sent to the\n+%%%      `Registration' callback.\n+%%%\n+%%%      The `Provider' callback is a function inside `riak_core' that returns\n+%%%      information that the dependency needs.\n+%%%\n+%%%      The `Handler' callback is a function in the dependency that\n+%%%      expects the reply from the `Provider'.\n+%%%\n+%%%      === Handler Parameters ===\n+%%%      The arguments to `Handler' will be, in order:\n+%%%      <ol><li>Each item, if any, provided in the list in the 3rd element of the registration tuple</li>\n+%%%      <li>The result from `Provider' wrapped in a 3-tuple:\n+%%%        <ol><li>The result</li>\n+%%%            <li>The list of parameters passed to `Provider'</li>\n+%%%            <li>The opaque `HandlerContext' (see {@section Request Message})</li>\n+%%%        </ol></li></ol>\n+%%%\n+%%%","path":"src/riak_core_info_service.erl","position":46,"original_position":46,"commit_id":"024beadf5048f2710a5840ede4b300d217e5a50e","original_commit_id":"024beadf5048f2710a5840ede4b300d217e5a50e","user":{"login":"macintux","id":2141278,"avatar_url":"https://avatars.githubusercontent.com/u/2141278?v=3","gravatar_id":"","url":"https://api.github.com/users/macintux","html_url":"https://github.com/macintux","followers_url":"https://api.github.com/users/macintux/followers","following_url":"https://api.github.com/users/macintux/following{/other_user}","gists_url":"https://api.github.com/users/macintux/gists{/gist_id}","starred_url":"https://api.github.com/users/macintux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/macintux/subscriptions","organizations_url":"https://api.github.com/users/macintux/orgs","repos_url":"https://api.github.com/users/macintux/repos","events_url":"https://api.github.com/users/macintux/events{/privacy}","received_events_url":"https://api.github.com/users/macintux/received_events","type":"User","site_admin":false},"body":"Reworking this per discussions with Ted.\r\n\r\nNotable change to behavior: `undefined` will no longer be an acceptable callback.","created_at":"2017-02-27T21:09:18Z","updated_at":"2017-02-27T21:09:18Z","html_url":"https://github.com/basho/riak_core/pull/898#discussion_r103312528","pull_request_url":"https://api.github.com/repos/basho/riak_core/pulls/898","_links":{"self":{"href":"https://api.github.com/repos/basho/riak_core/pulls/comments/103312528"},"html":{"href":"https://github.com/basho/riak_core/pull/898#discussion_r103312528"},"pull_request":{"href":"https://api.github.com/repos/basho/riak_core/pulls/898"}}},"pull_request":{"url":"https://api.github.com/repos/basho/riak_core/pulls/898","id":106131481,"html_url":"https://github.com/basho/riak_core/pull/898","diff_url":"https://github.com/basho/riak_core/pull/898.diff","patch_url":"https://github.com/basho/riak_core/pull/898.patch","issue_url":"https://api.github.com/repos/basho/riak_core/issues/898","number":898,"state":"open","locked":false,"title":"riak_core_info_service","user":{"login":"JeetKunDoug","id":682821,"avatar_url":"https://avatars.githubusercontent.com/u/682821?v=3","gravatar_id":"","url":"https://api.github.com/users/JeetKunDoug","html_url":"https://github.com/JeetKunDoug","followers_url":"https://api.github.com/users/JeetKunDoug/followers","following_url":"https://api.github.com/users/JeetKunDoug/following{/other_user}","gists_url":"https://api.github.com/users/JeetKunDoug/gists{/gist_id}","starred_url":"https://api.github.com/users/JeetKunDoug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeetKunDoug/subscriptions","organizations_url":"https://api.github.com/users/JeetKunDoug/orgs","repos_url":"https://api.github.com/users/JeetKunDoug/repos","events_url":"https://api.github.com/users/JeetKunDoug/events{/privacy}","received_events_url":"https://api.github.com/users/JeetKunDoug/received_events","type":"User","site_admin":false},"body":"This PR implements the `riak_core_info_service` set of processes - a supervisor and one or more children that are created to support NIFs that need to call in to Riak to get information.\r\n- `riak_core_info_service` - API\r\n- `riak_core_info_service_sup` - supervisor for `riak_core_info_service_process` processes.\r\n- `riak_core_info_service_process` - a lightweight process that can respond to a specified request by invoking a function and calling a callback to return the results.\r\n\r\nSee `riak_core_app.erl` for an example of registering and starting a service.\r\n\r\nTODO:\r\n- [x] Decide if hard-coding the `eleveldb` service registration is acceptable, or if we want to use a more indirect method of registering the callbacks in this case (cuttlefish schema perhaps? Do we have other ways of doing this that don't require `eleveldb` to directly call in to `riak_core`?)\r\n- [x] Perhaps make the `riak_core_info_service_process` a `gen_server` at this point.\r\n- [x] Add copyright banners","created_at":"2017-02-14T15:46:30Z","updated_at":"2017-02-27T21:09:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cfa6f3943df7346a6f887659f5fd6b8293dc5bef","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/basho/riak_core/pulls/898/commits","review_comments_url":"https://api.github.com/repos/basho/riak_core/pulls/898/comments","review_comment_url":"https://api.github.com/repos/basho/riak_core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/basho/riak_core/issues/898/comments","statuses_url":"https://api.github.com/repos/basho/riak_core/statuses/024beadf5048f2710a5840ede4b300d217e5a50e","head":{"label":"basho:dr-th/service-poc","ref":"dr-th/service-poc","sha":"024beadf5048f2710a5840ede4b300d217e5a50e","user":{"login":"basho","id":176293,"avatar_url":"https://avatars.githubusercontent.com/u/176293?v=3","gravatar_id":"","url":"https://api.github.com/users/basho","html_url":"https://github.com/basho","followers_url":"https://api.github.com/users/basho/followers","following_url":"https://api.github.com/users/basho/following{/other_user}","gists_url":"https://api.github.com/users/basho/gists{/gist_id}","starred_url":"https://api.github.com/users/basho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basho/subscriptions","organizations_url":"https://api.github.com/users/basho/orgs","repos_url":"https://api.github.com/users/basho/repos","events_url":"https://api.github.com/users/basho/events{/privacy}","received_events_url":"https://api.github.com/users/basho/received_events","type":"Organization","site_admin":false},"repo":{"id":790938,"name":"riak_core","full_name":"basho/riak_core","owner":{"login":"basho","id":176293,"avatar_url":"https://avatars.githubusercontent.com/u/176293?v=3","gravatar_id":"","url":"https://api.github.com/users/basho","html_url":"https://github.com/basho","followers_url":"https://api.github.com/users/basho/followers","following_url":"https://api.github.com/users/basho/following{/other_user}","gists_url":"https://api.github.com/users/basho/gists{/gist_id}","starred_url":"https://api.github.com/users/basho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basho/subscriptions","organizations_url":"https://api.github.com/users/basho/orgs","repos_url":"https://api.github.com/users/basho/repos","events_url":"https://api.github.com/users/basho/events{/privacy}","received_events_url":"https://api.github.com/users/basho/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/basho/riak_core","description":"Distributed systems infrastructure used by Riak.","fork":false,"url":"https://api.github.com/repos/basho/riak_core","forks_url":"https://api.github.com/repos/basho/riak_core/forks","keys_url":"https://api.github.com/repos/basho/riak_core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/basho/riak_core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/basho/riak_core/teams","hooks_url":"https://api.github.com/repos/basho/riak_core/hooks","issue_events_url":"https://api.github.com/repos/basho/riak_core/issues/events{/number}","events_url":"https://api.github.com/repos/basho/riak_core/events","assignees_url":"https://api.github.com/repos/basho/riak_core/assignees{/user}","branches_url":"https://api.github.com/repos/basho/riak_core/branches{/branch}","tags_url":"https://api.github.com/repos/basho/riak_core/tags","blobs_url":"https://api.github.com/repos/basho/riak_core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/basho/riak_core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/basho/riak_core/git/refs{/sha}","trees_url":"https://api.github.com/repos/basho/riak_core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/basho/riak_core/statuses/{sha}","languages_url":"https://api.github.com/repos/basho/riak_core/languages","stargazers_url":"https://api.github.com/repos/basho/riak_core/stargazers","contributors_url":"https://api.github.com/repos/basho/riak_core/contributors","subscribers_url":"https://api.github.com/repos/basho/riak_core/subscribers","subscription_url":"https://api.github.com/repos/basho/riak_core/subscription","commits_url":"https://api.github.com/repos/basho/riak_core/commits{/sha}","git_commits_url":"https://api.github.com/repos/basho/riak_core/git/commits{/sha}","comments_url":"https://api.github.com/repos/basho/riak_core/comments{/number}","issue_comment_url":"https://api.github.com/repos/basho/riak_core/issues/comments{/number}","contents_url":"https://api.github.com/repos/basho/riak_core/contents/{+path}","compare_url":"https://api.github.com/repos/basho/riak_core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/basho/riak_core/merges","archive_url":"https://api.github.com/repos/basho/riak_core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/basho/riak_core/downloads","issues_url":"https://api.github.com/repos/basho/riak_core/issues{/number}","pulls_url":"https://api.github.com/repos/basho/riak_core/pulls{/number}","milestones_url":"https://api.github.com/repos/basho/riak_core/milestones{/number}","notifications_url":"https://api.github.com/repos/basho/riak_core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/basho/riak_core/labels{/name}","releases_url":"https://api.github.com/repos/basho/riak_core/releases{/id}","deployments_url":"https://api.github.com/repos/basho/riak_core/deployments","created_at":"2010-07-22T14:11:49Z","updated_at":"2017-02-27T20:23:24Z","pushed_at":"2017-02-27T13:21:42Z","git_url":"git://github.com/basho/riak_core.git","ssh_url":"git@github.com:basho/riak_core.git","clone_url":"https://github.com/basho/riak_core.git","svn_url":"https://github.com/basho/riak_core","homepage":"","size":10886,"stargazers_count":781,"watchers_count":781,"language":"Erlang","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":259,"mirror_url":null,"open_issues_count":116,"forks":259,"open_issues":116,"watchers":781,"default_branch":"develop"}},"base":{"label":"basho:develop","ref":"develop","sha":"8e4cf9581058e69da2d8f6e8fc1416f2f30368ab","user":{"login":"basho","id":176293,"avatar_url":"https://avatars.githubusercontent.com/u/176293?v=3","gravatar_id":"","url":"https://api.github.com/users/basho","html_url":"https://github.com/basho","followers_url":"https://api.github.com/users/basho/followers","following_url":"https://api.github.com/users/basho/following{/other_user}","gists_url":"https://api.github.com/users/basho/gists{/gist_id}","starred_url":"https://api.github.com/users/basho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basho/subscriptions","organizations_url":"https://api.github.com/users/basho/orgs","repos_url":"https://api.github.com/users/basho/repos","events_url":"https://api.github.com/users/basho/events{/privacy}","received_events_url":"https://api.github.com/users/basho/received_events","type":"Organization","site_admin":false},"repo":{"id":790938,"name":"riak_core","full_name":"basho/riak_core","owner":{"login":"basho","id":176293,"avatar_url":"https://avatars.githubusercontent.com/u/176293?v=3","gravatar_id":"","url":"https://api.github.com/users/basho","html_url":"https://github.com/basho","followers_url":"https://api.github.com/users/basho/followers","following_url":"https://api.github.com/users/basho/following{/other_user}","gists_url":"https://api.github.com/users/basho/gists{/gist_id}","starred_url":"https://api.github.com/users/basho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basho/subscriptions","organizations_url":"https://api.github.com/users/basho/orgs","repos_url":"https://api.github.com/users/basho/repos","events_url":"https://api.github.com/users/basho/events{/privacy}","received_events_url":"https://api.github.com/users/basho/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/basho/riak_core","description":"Distributed systems infrastructure used by Riak.","fork":false,"url":"https://api.github.com/repos/basho/riak_core","forks_url":"https://api.github.com/repos/basho/riak_core/forks","keys_url":"https://api.github.com/repos/basho/riak_core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/basho/riak_core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/basho/riak_core/teams","hooks_url":"https://api.github.com/repos/basho/riak_core/hooks","issue_events_url":"https://api.github.com/repos/basho/riak_core/issues/events{/number}","events_url":"https://api.github.com/repos/basho/riak_core/events","assignees_url":"https://api.github.com/repos/basho/riak_core/assignees{/user}","branches_url":"https://api.github.com/repos/basho/riak_core/branches{/branch}","tags_url":"https://api.github.com/repos/basho/riak_core/tags","blobs_url":"https://api.github.com/repos/basho/riak_core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/basho/riak_core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/basho/riak_core/git/refs{/sha}","trees_url":"https://api.github.com/repos/basho/riak_core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/basho/riak_core/statuses/{sha}","languages_url":"https://api.github.com/repos/basho/riak_core/languages","stargazers_url":"https://api.github.com/repos/basho/riak_core/stargazers","contributors_url":"https://api.github.com/repos/basho/riak_core/contributors","subscribers_url":"https://api.github.com/repos/basho/riak_core/subscribers","subscription_url":"https://api.github.com/repos/basho/riak_core/subscription","commits_url":"https://api.github.com/repos/basho/riak_core/commits{/sha}","git_commits_url":"https://api.github.com/repos/basho/riak_core/git/commits{/sha}","comments_url":"https://api.github.com/repos/basho/riak_core/comments{/number}","issue_comment_url":"https://api.github.com/repos/basho/riak_core/issues/comments{/number}","contents_url":"https://api.github.com/repos/basho/riak_core/contents/{+path}","compare_url":"https://api.github.com/repos/basho/riak_core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/basho/riak_core/merges","archive_url":"https://api.github.com/repos/basho/riak_core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/basho/riak_core/downloads","issues_url":"https://api.github.com/repos/basho/riak_core/issues{/number}","pulls_url":"https://api.github.com/repos/basho/riak_core/pulls{/number}","milestones_url":"https://api.github.com/repos/basho/riak_core/milestones{/number}","notifications_url":"https://api.github.com/repos/basho/riak_core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/basho/riak_core/labels{/name}","releases_url":"https://api.github.com/repos/basho/riak_core/releases{/id}","deployments_url":"https://api.github.com/repos/basho/riak_core/deployments","created_at":"2010-07-22T14:11:49Z","updated_at":"2017-02-27T20:23:24Z","pushed_at":"2017-02-27T13:21:42Z","git_url":"git://github.com/basho/riak_core.git","ssh_url":"git@github.com:basho/riak_core.git","clone_url":"https://github.com/basho/riak_core.git","svn_url":"https://github.com/basho/riak_core","homepage":"","size":10886,"stargazers_count":781,"watchers_count":781,"language":"Erlang","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":259,"mirror_url":null,"open_issues_count":116,"forks":259,"open_issues":116,"watchers":781,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/basho/riak_core/pulls/898"},"html":{"href":"https://github.com/basho/riak_core/pull/898"},"issue":{"href":"https://api.github.com/repos/basho/riak_core/issues/898"},"comments":{"href":"https://api.github.com/repos/basho/riak_core/issues/898/comments"},"review_comments":{"href":"https://api.github.com/repos/basho/riak_core/pulls/898/comments"},"review_comment":{"href":"https://api.github.com/repos/basho/riak_core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/basho/riak_core/pulls/898/commits"},"statuses":{"href":"https://api.github.com/repos/basho/riak_core/statuses/024beadf5048f2710a5840ede4b300d217e5a50e"}}}}
{"actor":{"display_login":"macintux"}}