{"action":"created","comment":{"url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/pulls/comments/40175400","id":40175400,"diff_hunk":"@@ -72,11 +72,6 @@\n     </dependency>\n \n     <dependency>\n-      <groupId>org.hawkular.inventory</groupId>\n-      <artifactId>hawkular-inventory-json-helper</artifactId>\n-    </dependency>","path":"hawkular-command-gateway-war/pom.xml","position":6,"original_position":6,"commit_id":"c91498d22deb597e0a50c32a680fa69d75e421c6","original_commit_id":"c91498d22deb597e0a50c32a680fa69d75e421c6","user":{"login":"ppalaga","id":1826249,"avatar_url":"https://avatars.githubusercontent.com/u/1826249?v=3","gravatar_id":"","url":"https://api.github.com/users/ppalaga","html_url":"https://github.com/ppalaga","followers_url":"https://api.github.com/users/ppalaga/followers","following_url":"https://api.github.com/users/ppalaga/following{/other_user}","gists_url":"https://api.github.com/users/ppalaga/gists{/gist_id}","starred_url":"https://api.github.com/users/ppalaga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppalaga/subscriptions","organizations_url":"https://api.github.com/users/ppalaga/orgs","repos_url":"https://api.github.com/users/ppalaga/repos","events_url":"https://api.github.com/users/ppalaga/events{/privacy}","received_events_url":"https://api.github.com/users/ppalaga/received_events","type":"User","site_admin":false},"body":"OK, I am accepting that clients will only know the resource identified by `resourcePath` and that they will not know by which feed it is monitored.\r\n\r\nThis will require from the gateway to be able to analyze the internal structure of `resourcePath`s in order to (typically) extract the feedId to send the message to. I can accept this as a part of the general task of routing.\r\n\r\n> This is why I liked the idea of the command implementations on the server being the ones to determine where to forward the messages. Because some commands a client will tell us a single resourcePath (which are then parsed via the inventory API to determine what feed is managing that resource), others may provide a group path (which could then be used to query the inventory to determine which resources are currently in that group, and then from that which feed(s) manage those resources keeping in mind one feed many manage more than one of these resources), others may be an array of resourcePaths.\r\n\r\nYes, you named a couple of (well, exactly three) ways how to compute the routing info out of a UI request. I accept that these and similar ways of computing must be doable with our API. But I strongly vote for keeping these routing computing code as concentrated as possible, much to the opposite of the present practice where every request class has a special gateway command and a special bus listener (all of them doing the same thing). To cover the commands (except for Echo) we have now, only one routing info provider should suffice - namely the one that takes `resourcePath` and extracts `feedId` out of it.","created_at":"2015-09-23T07:03:10Z","updated_at":"2015-09-23T07:03:10Z","html_url":"https://github.com/hawkular/hawkular-command-gateway/pull/14#discussion_r40175400","pull_request_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/hawkular/hawkular-command-gateway/pulls/comments/40175400"},"html":{"href":"https://github.com/hawkular/hawkular-command-gateway/pull/14#discussion_r40175400"},"pull_request":{"href":"https://api.github.com/repos/hawkular/hawkular-command-gateway/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/pulls/14","id":45675873,"html_url":"https://github.com/hawkular/hawkular-command-gateway/pull/14","diff_url":"https://github.com/hawkular/hawkular-command-gateway/pull/14.diff","patch_url":"https://github.com/hawkular/hawkular-command-gateway/pull/14.patch","issue_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/issues/14","number":14,"state":"open","locked":false,"title":"Simplify the API","user":{"login":"ppalaga","id":1826249,"avatar_url":"https://avatars.githubusercontent.com/u/1826249?v=3","gravatar_id":"","url":"https://api.github.com/users/ppalaga","html_url":"https://github.com/ppalaga","followers_url":"https://api.github.com/users/ppalaga/followers","following_url":"https://api.github.com/users/ppalaga/following{/other_user}","gists_url":"https://api.github.com/users/ppalaga/gists{/gist_id}","starred_url":"https://api.github.com/users/ppalaga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppalaga/subscriptions","organizations_url":"https://api.github.com/users/ppalaga/orgs","repos_url":"https://api.github.com/users/ppalaga/repos","events_url":"https://api.github.com/users/ppalaga/events{/privacy}","received_events_url":"https://api.github.com/users/ppalaga/received_events","type":"User","site_admin":false},"body":null,"created_at":"2015-09-22T15:12:55Z","updated_at":"2015-09-23T07:03:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c0a8a541510d0077883b6c9f8cc8fe171c5f5bf9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/pulls/14/commits","review_comments_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/pulls/14/comments","review_comment_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/issues/14/comments","statuses_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/statuses/c91498d22deb597e0a50c32a680fa69d75e421c6","head":{"label":"ppalaga:150922-refactor","ref":"150922-refactor","sha":"c91498d22deb597e0a50c32a680fa69d75e421c6","user":{"login":"ppalaga","id":1826249,"avatar_url":"https://avatars.githubusercontent.com/u/1826249?v=3","gravatar_id":"","url":"https://api.github.com/users/ppalaga","html_url":"https://github.com/ppalaga","followers_url":"https://api.github.com/users/ppalaga/followers","following_url":"https://api.github.com/users/ppalaga/following{/other_user}","gists_url":"https://api.github.com/users/ppalaga/gists{/gist_id}","starred_url":"https://api.github.com/users/ppalaga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppalaga/subscriptions","organizations_url":"https://api.github.com/users/ppalaga/orgs","repos_url":"https://api.github.com/users/ppalaga/repos","events_url":"https://api.github.com/users/ppalaga/events{/privacy}","received_events_url":"https://api.github.com/users/ppalaga/received_events","type":"User","site_admin":false},"repo":{"id":41916926,"name":"hawkular-command-gateway","full_name":"ppalaga/hawkular-command-gateway","owner":{"login":"ppalaga","id":1826249,"avatar_url":"https://avatars.githubusercontent.com/u/1826249?v=3","gravatar_id":"","url":"https://api.github.com/users/ppalaga","html_url":"https://github.com/ppalaga","followers_url":"https://api.github.com/users/ppalaga/followers","following_url":"https://api.github.com/users/ppalaga/following{/other_user}","gists_url":"https://api.github.com/users/ppalaga/gists{/gist_id}","starred_url":"https://api.github.com/users/ppalaga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppalaga/subscriptions","organizations_url":"https://api.github.com/users/ppalaga/orgs","repos_url":"https://api.github.com/users/ppalaga/repos","events_url":"https://api.github.com/users/ppalaga/events{/privacy}","received_events_url":"https://api.github.com/users/ppalaga/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ppalaga/hawkular-command-gateway","description":"A WebSockets Gateway that both Hawkular UI and Hawkular Agent use for bidirectional communication.","fork":true,"url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway","forks_url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway/forks","keys_url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway/teams","hooks_url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway/hooks","issue_events_url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway/issues/events{/number}","events_url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway/events","assignees_url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway/assignees{/user}","branches_url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway/branches{/branch}","tags_url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway/tags","blobs_url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway/git/refs{/sha}","trees_url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway/statuses/{sha}","languages_url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway/languages","stargazers_url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway/stargazers","contributors_url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway/contributors","subscribers_url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway/subscribers","subscription_url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway/subscription","commits_url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway/commits{/sha}","git_commits_url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway/git/commits{/sha}","comments_url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway/comments{/number}","issue_comment_url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway/issues/comments{/number}","contents_url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway/contents/{+path}","compare_url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway/merges","archive_url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway/downloads","issues_url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway/issues{/number}","pulls_url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway/pulls{/number}","milestones_url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway/milestones{/number}","notifications_url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway/labels{/name}","releases_url":"https://api.github.com/repos/ppalaga/hawkular-command-gateway/releases{/id}","created_at":"2015-09-04T13:20:32Z","updated_at":"2015-09-04T14:50:26Z","pushed_at":"2015-09-22T15:12:54Z","git_url":"git://github.com/ppalaga/hawkular-command-gateway.git","ssh_url":"git@github.com:ppalaga/hawkular-command-gateway.git","clone_url":"https://github.com/ppalaga/hawkular-command-gateway.git","svn_url":"https://github.com/ppalaga/hawkular-command-gateway","homepage":null,"size":775,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"hawkular:master","ref":"master","sha":"6f3751da3ac0e3d4e85bdc19f5c93f2b3068f4df","user":{"login":"hawkular","id":10179627,"avatar_url":"https://avatars.githubusercontent.com/u/10179627?v=3","gravatar_id":"","url":"https://api.github.com/users/hawkular","html_url":"https://github.com/hawkular","followers_url":"https://api.github.com/users/hawkular/followers","following_url":"https://api.github.com/users/hawkular/following{/other_user}","gists_url":"https://api.github.com/users/hawkular/gists{/gist_id}","starred_url":"https://api.github.com/users/hawkular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hawkular/subscriptions","organizations_url":"https://api.github.com/users/hawkular/orgs","repos_url":"https://api.github.com/users/hawkular/repos","events_url":"https://api.github.com/users/hawkular/events{/privacy}","received_events_url":"https://api.github.com/users/hawkular/received_events","type":"Organization","site_admin":false},"repo":{"id":41916848,"name":"hawkular-command-gateway","full_name":"hawkular/hawkular-command-gateway","owner":{"login":"hawkular","id":10179627,"avatar_url":"https://avatars.githubusercontent.com/u/10179627?v=3","gravatar_id":"","url":"https://api.github.com/users/hawkular","html_url":"https://github.com/hawkular","followers_url":"https://api.github.com/users/hawkular/followers","following_url":"https://api.github.com/users/hawkular/following{/other_user}","gists_url":"https://api.github.com/users/hawkular/gists{/gist_id}","starred_url":"https://api.github.com/users/hawkular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hawkular/subscriptions","organizations_url":"https://api.github.com/users/hawkular/orgs","repos_url":"https://api.github.com/users/hawkular/repos","events_url":"https://api.github.com/users/hawkular/events{/privacy}","received_events_url":"https://api.github.com/users/hawkular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hawkular/hawkular-command-gateway","description":"A WebSockets Gateway that both Hawkular UI and Hawkular Agent use for bidirectional communication.","fork":false,"url":"https://api.github.com/repos/hawkular/hawkular-command-gateway","forks_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/forks","keys_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/teams","hooks_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/hooks","issue_events_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/issues/events{/number}","events_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/events","assignees_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/assignees{/user}","branches_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/branches{/branch}","tags_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/tags","blobs_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/git/refs{/sha}","trees_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/statuses/{sha}","languages_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/languages","stargazers_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/stargazers","contributors_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/contributors","subscribers_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/subscribers","subscription_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/subscription","commits_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/commits{/sha}","git_commits_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/git/commits{/sha}","comments_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/comments{/number}","issue_comment_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/issues/comments{/number}","contents_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/contents/{+path}","compare_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/merges","archive_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/downloads","issues_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/issues{/number}","pulls_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/pulls{/number}","milestones_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/milestones{/number}","notifications_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/labels{/name}","releases_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/releases{/id}","created_at":"2015-09-04T13:18:56Z","updated_at":"2015-09-04T15:45:58Z","pushed_at":"2015-09-22T15:25:56Z","git_url":"git://github.com/hawkular/hawkular-command-gateway.git","ssh_url":"git@github.com:hawkular/hawkular-command-gateway.git","clone_url":"https://github.com/hawkular/hawkular-command-gateway.git","svn_url":"https://github.com/hawkular/hawkular-command-gateway","homepage":null,"size":931,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hawkular/hawkular-command-gateway/pulls/14"},"html":{"href":"https://github.com/hawkular/hawkular-command-gateway/pull/14"},"issue":{"href":"https://api.github.com/repos/hawkular/hawkular-command-gateway/issues/14"},"comments":{"href":"https://api.github.com/repos/hawkular/hawkular-command-gateway/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/hawkular/hawkular-command-gateway/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/hawkular/hawkular-command-gateway/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hawkular/hawkular-command-gateway/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/hawkular/hawkular-command-gateway/statuses/c91498d22deb597e0a50c32a680fa69d75e421c6"}}}}