GitHub PullRequestReviewCommentEvent at 2014-06-23 20:52:20
Repository: akka
Actor: hajile
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/akka/akka/pulls/comments/14099364","id":14099364,"diff_hunk":"@@ -49,9 +51,31 @@ private[io] class TcpOutgoingConnection(_tcp: TcpExt,\n \n   def receive: Receive = {\n     case registration: ChannelRegistration ⇒\n-      log.debug(\"Attempting connection to [{}]\", remoteAddress)\n       reportConnectFailure {\n-        if (channel.connect(remoteAddress))\n+        if (remoteAddress.isUnresolved) {\n+          log.debug(\"Resolving {} before connecting\", remoteAddress.getHostName)\n+          IO(Dns) ! Dns.Resolve(remoteAddress.getHostName)\n+          context.become(resolving(registration))\n+        } else {\n+          self ! registration","path":"akka-actor/src/main/scala/akka/io/TcpOutgoingConnection.scala","position":28,"original_position":28,"commit_id":"04aff8c382cc9a427215ba464ac749d09de6defc","original_commit_id":"f321e90408ae45e301b97b83d3afd75aa42ad923","user":{"login":"hajile","id":92526,"avatar_url":"https://avatars.githubusercontent.com/u/92526?","gravatar_id":"415511c34ed3bc05a014cc9461b491bd","url":"https://api.github.com/users/hajile","html_url":"https://github.com/hajile","followers_url":"https://api.github.com/users/hajile/followers","following_url":"https://api.github.com/users/hajile/following{/other_user}","gists_url":"https://api.github.com/users/hajile/gists{/gist_id}","starred_url":"https://api.github.com/users/hajile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hajile/subscriptions","organizations_url":"https://api.github.com/users/hajile/orgs","repos_url":"https://api.github.com/users/hajile/repos","events_url":"https://api.github.com/users/hajile/events{/privacy}","received_events_url":"https://api.github.com/users/hajile/received_events","type":"User","site_admin":false},"body":"Guys, what do you think about caching?\r\n\r\nOracle's InetAddress caches by default for 30sec, so no intricate logic is needed. By making this timeout configurable we wouldn't make anything worse for most users.\r\n\r\nBTW, what you'll suggest to use as a cache with TTL? Does Akka have something simple like this? Or should I implement it with a Map and Queue? And if so, would it be better to use j.u.l.ConcurrentHashMap and friends or immutable scala collections? Which of these would be better following Akka code style?","created_at":"2014-06-23T20:52:20Z","updated_at":"2014-06-23T20:52:20Z","html_url":"https://github.com/akka/akka/pull/15417#discussion_r14099364","pull_request_url":"https://api.github.com/repos/akka/akka/pulls/15417","_links":{"self":{"href":"https://api.github.com/repos/akka/akka/pulls/comments/14099364"},"html":{"href":"https://github.com/akka/akka/pull/15417#discussion_r14099364"},"pull_request":{"href":"https://api.github.com/repos/akka/akka/pulls/15417"}}},"pull_request":{"url":"https://api.github.com/repos/akka/akka/pulls/15417","id":17439029,"html_url":"https://github.com/akka/akka/pull/15417","diff_url":"https://github.com/akka/akka/pull/15417.diff","patch_url":"https://github.com/akka/akka/pull/15417.patch","issue_url":"https://api.github.com/repos/akka/akka/issues/15417","number":15417,"state":"open","title":"preparation for asynchronous DNS resolution","user":{"login":"hajile","id":92526,"avatar_url":"https://avatars.githubusercontent.com/u/92526?","gravatar_id":"415511c34ed3bc05a014cc9461b491bd","url":"https://api.github.com/users/hajile","html_url":"https://github.com/hajile","followers_url":"https://api.github.com/users/hajile/followers","following_url":"https://api.github.com/users/hajile/following{/other_user}","gists_url":"https://api.github.com/users/hajile/gists{/gist_id}","starred_url":"https://api.github.com/users/hajile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hajile/subscriptions","organizations_url":"https://api.github.com/users/hajile/orgs","repos_url":"https://api.github.com/users/hajile/repos","events_url":"https://api.github.com/users/hajile/events{/privacy}","received_events_url":"https://api.github.com/users/hajile/received_events","type":"User","site_admin":false},"body":"This is an initial step towards fully asynchronous DNS resolution.\r\nRight now it improves things by loading the resolution off to a separate actor with potentially dedicated dispatcher.\r\nThe code is covered by TcpConnectionSpec \"report failed connection attempt when target cannot be resolved\", although only unsuccessful resolution is tested.\r\n\r\nFully asynchronous DNS client coming soon, it's already working in production, but isn't 100% RFC compliant.    ","created_at":"2014-06-21T12:37:55Z","updated_at":"2014-06-23T20:52:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cfe01fb1911007e3d1933363384dd670c1b87c53","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/akka/akka/pulls/15417/commits","review_comments_url":"https://api.github.com/repos/akka/akka/pulls/15417/comments","review_comment_url":"https://api.github.com/repos/akka/akka/pulls/comments/{number}","comments_url":"https://api.github.com/repos/akka/akka/issues/15417/comments","statuses_url":"https://api.github.com/repos/akka/akka/statuses/04aff8c382cc9a427215ba464ac749d09de6defc","head":{"label":"hajile:master","ref":"master","sha":"04aff8c382cc9a427215ba464ac749d09de6defc","user":{"login":"hajile","id":92526,"avatar_url":"https://avatars.githubusercontent.com/u/92526?","gravatar_id":"415511c34ed3bc05a014cc9461b491bd","url":"https://api.github.com/users/hajile","html_url":"https://github.com/hajile","followers_url":"https://api.github.com/users/hajile/followers","following_url":"https://api.github.com/users/hajile/following{/other_user}","gists_url":"https://api.github.com/users/hajile/gists{/gist_id}","starred_url":"https://api.github.com/users/hajile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hajile/subscriptions","organizations_url":"https://api.github.com/users/hajile/orgs","repos_url":"https://api.github.com/users/hajile/repos","events_url":"https://api.github.com/users/hajile/events{/privacy}","received_events_url":"https://api.github.com/users/hajile/received_events","type":"User","site_admin":false},"repo":{"id":21051754,"name":"akka","full_name":"hajile/akka","owner":{"login":"hajile","id":92526,"avatar_url":"https://avatars.githubusercontent.com/u/92526?","gravatar_id":"415511c34ed3bc05a014cc9461b491bd","url":"https://api.github.com/users/hajile","html_url":"https://github.com/hajile","followers_url":"https://api.github.com/users/hajile/followers","following_url":"https://api.github.com/users/hajile/following{/other_user}","gists_url":"https://api.github.com/users/hajile/gists{/gist_id}","starred_url":"https://api.github.com/users/hajile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hajile/subscriptions","organizations_url":"https://api.github.com/users/hajile/orgs","repos_url":"https://api.github.com/users/hajile/repos","events_url":"https://api.github.com/users/hajile/events{/privacy}","received_events_url":"https://api.github.com/users/hajile/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hajile/akka","description":"Akka Project","fork":true,"url":"https://api.github.com/repos/hajile/akka","forks_url":"https://api.github.com/repos/hajile/akka/forks","keys_url":"https://api.github.com/repos/hajile/akka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hajile/akka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hajile/akka/teams","hooks_url":"https://api.github.com/repos/hajile/akka/hooks","issue_events_url":"https://api.github.com/repos/hajile/akka/issues/events{/number}","events_url":"https://api.github.com/repos/hajile/akka/events","assignees_url":"https://api.github.com/repos/hajile/akka/assignees{/user}","branches_url":"https://api.github.com/repos/hajile/akka/branches{/branch}","tags_url":"https://api.github.com/repos/hajile/akka/tags","blobs_url":"https://api.github.com/repos/hajile/akka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hajile/akka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hajile/akka/git/refs{/sha}","trees_url":"https://api.github.com/repos/hajile/akka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hajile/akka/statuses/{sha}","languages_url":"https://api.github.com/repos/hajile/akka/languages","stargazers_url":"https://api.github.com/repos/hajile/akka/stargazers","contributors_url":"https://api.github.com/repos/hajile/akka/contributors","subscribers_url":"https://api.github.com/repos/hajile/akka/subscribers","subscription_url":"https://api.github.com/repos/hajile/akka/subscription","commits_url":"https://api.github.com/repos/hajile/akka/commits{/sha}","git_commits_url":"https://api.github.com/repos/hajile/akka/git/commits{/sha}","comments_url":"https://api.github.com/repos/hajile/akka/comments{/number}","issue_comment_url":"https://api.github.com/repos/hajile/akka/issues/comments/{number}","contents_url":"https://api.github.com/repos/hajile/akka/contents/{+path}","compare_url":"https://api.github.com/repos/hajile/akka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hajile/akka/merges","archive_url":"https://api.github.com/repos/hajile/akka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hajile/akka/downloads","issues_url":"https://api.github.com/repos/hajile/akka/issues{/number}","pulls_url":"https://api.github.com/repos/hajile/akka/pulls{/number}","milestones_url":"https://api.github.com/repos/hajile/akka/milestones{/number}","notifications_url":"https://api.github.com/repos/hajile/akka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hajile/akka/labels{/name}","releases_url":"https://api.github.com/repos/hajile/akka/releases{/id}","created_at":"2014-06-20T20:40:11Z","updated_at":"2014-06-23T14:34:16Z","pushed_at":"2014-06-23T14:34:16Z","git_url":"git://github.com/hajile/akka.git","ssh_url":"git@github.com:hajile/akka.git","clone_url":"https://github.com/hajile/akka.git","svn_url":"https://github.com/hajile/akka","homepage":"http://akka.io","size":215382,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"akka:master","ref":"master","sha":"e51ccf8c57f54b98c0ea6a9d33613c34f451f558","user":{"login":"akka","id":1496237,"avatar_url":"https://avatars.githubusercontent.com/u/1496237?","gravatar_id":"0ff72320fb1bc5db35ba4fae61614eb0","url":"https://api.github.com/users/akka","html_url":"https://github.com/akka","followers_url":"https://api.github.com/users/akka/followers","following_url":"https://api.github.com/users/akka/following{/other_user}","gists_url":"https://api.github.com/users/akka/gists{/gist_id}","starred_url":"https://api.github.com/users/akka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akka/subscriptions","organizations_url":"https://api.github.com/users/akka/orgs","repos_url":"https://api.github.com/users/akka/repos","events_url":"https://api.github.com/users/akka/events{/privacy}","received_events_url":"https://api.github.com/users/akka/received_events","type":"Organization","site_admin":false},"repo":{"id":130013,"name":"akka","full_name":"akka/akka","owner":{"login":"akka","id":1496237,"avatar_url":"https://avatars.githubusercontent.com/u/1496237?","gravatar_id":"0ff72320fb1bc5db35ba4fae61614eb0","url":"https://api.github.com/users/akka","html_url":"https://github.com/akka","followers_url":"https://api.github.com/users/akka/followers","following_url":"https://api.github.com/users/akka/following{/other_user}","gists_url":"https://api.github.com/users/akka/gists{/gist_id}","starred_url":"https://api.github.com/users/akka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akka/subscriptions","organizations_url":"https://api.github.com/users/akka/orgs","repos_url":"https://api.github.com/users/akka/repos","events_url":"https://api.github.com/users/akka/events{/privacy}","received_events_url":"https://api.github.com/users/akka/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/akka/akka","description":"Akka Project","fork":false,"url":"https://api.github.com/repos/akka/akka","forks_url":"https://api.github.com/repos/akka/akka/forks","keys_url":"https://api.github.com/repos/akka/akka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akka/akka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akka/akka/teams","hooks_url":"https://api.github.com/repos/akka/akka/hooks","issue_events_url":"https://api.github.com/repos/akka/akka/issues/events{/number}","events_url":"https://api.github.com/repos/akka/akka/events","assignees_url":"https://api.github.com/repos/akka/akka/assignees{/user}","branches_url":"https://api.github.com/repos/akka/akka/branches{/branch}","tags_url":"https://api.github.com/repos/akka/akka/tags","blobs_url":"https://api.github.com/repos/akka/akka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akka/akka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akka/akka/git/refs{/sha}","trees_url":"https://api.github.com/repos/akka/akka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akka/akka/statuses/{sha}","languages_url":"https://api.github.com/repos/akka/akka/languages","stargazers_url":"https://api.github.com/repos/akka/akka/stargazers","contributors_url":"https://api.github.com/repos/akka/akka/contributors","subscribers_url":"https://api.github.com/repos/akka/akka/subscribers","subscription_url":"https://api.github.com/repos/akka/akka/subscription","commits_url":"https://api.github.com/repos/akka/akka/commits{/sha}","git_commits_url":"https://api.github.com/repos/akka/akka/git/commits{/sha}","comments_url":"https://api.github.com/repos/akka/akka/comments{/number}","issue_comment_url":"https://api.github.com/repos/akka/akka/issues/comments/{number}","contents_url":"https://api.github.com/repos/akka/akka/contents/{+path}","compare_url":"https://api.github.com/repos/akka/akka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akka/akka/merges","archive_url":"https://api.github.com/repos/akka/akka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akka/akka/downloads","issues_url":"https://api.github.com/repos/akka/akka/issues{/number}","pulls_url":"https://api.github.com/repos/akka/akka/pulls{/number}","milestones_url":"https://api.github.com/repos/akka/akka/milestones{/number}","notifications_url":"https://api.github.com/repos/akka/akka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akka/akka/labels{/name}","releases_url":"https://api.github.com/repos/akka/akka/releases{/id}","created_at":"2009-02-16T12:51:54Z","updated_at":"2014-06-23T13:54:36Z","pushed_at":"2014-06-23T13:03:02Z","git_url":"git://github.com/akka/akka.git","ssh_url":"git@github.com:akka/akka.git","clone_url":"https://github.com/akka/akka.git","svn_url":"https://github.com/akka/akka","homepage":"http://akka.io","size":215382,"stargazers_count":2683,"watchers_count":2683,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"forks_count":728,"mirror_url":null,"open_issues_count":350,"forks":728,"open_issues":350,"watchers":2683,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/akka/akka/pulls/15417"},"html":{"href":"https://github.com/akka/akka/pull/15417"},"issue":{"href":"https://api.github.com/repos/akka/akka/issues/15417"},"comments":{"href":"https://api.github.com/repos/akka/akka/issues/15417/comments"},"review_comments":{"href":"https://api.github.com/repos/akka/akka/pulls/15417/comments"},"review_comment":{"href":"https://api.github.com/repos/akka/akka/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/akka/akka/pulls/15417/commits"},"statuses":{"href":"https://api.github.com/repos/akka/akka/statuses/04aff8c382cc9a427215ba464ac749d09de6defc"}}}}