{"action":"created","comment":{"url":"https://api.github.com/repos/twitter/summingbird/pulls/comments/78412806","id":78412806,"diff_hunk":"@@ -74,92 +35,21 @@ abstract class AsyncBase[I, O, S, D, RC](maxWaitingFutures: MaxWaitingFutures, m\n   def apply(state: S, in: I): Future[TraversableOnce[(Seq[S], Future[TraversableOnce[O]])]]\n   def tick: Future[TraversableOnce[(Seq[S], Future[TraversableOnce[O]])]] = Future.value(Nil)\n \n-  private lazy val outstandingFutures = Queue.linkedNonBlocking[Future[Unit]]\n-  private lazy val numPendingOutstandingFutures = new AtomicInteger(0)\n-  private lazy val responses = Queue.linkedNonBlocking[(Seq[S], Try[TraversableOnce[O]])]\n-\n-  // For testing only\n-  private[executor] def outstandingFuturesQueue = outstandingFutures\n+  private[executor] lazy val futureQueue = new FutureQueue[Seq[S], TraversableOnce[O]](maxWaitingFutures, maxWaitingTime, maxEmitPerExec)\n \n   override def executeTick =\n-    finishExecute(tick.onFailure { thr => responses.put(((Seq(), Failure(thr)))) })\n+    finishExecute(Nil, tick)\n \n   override def execute(state: S, data: I) =\n-    finishExecute(apply(state, data).onFailure { thr => responses.put(((List(state), Failure(thr)))) })\n+    finishExecute(List(state), apply(state, data))\n \n-  private def finishExecute(fIn: Future[TraversableOnce[(Seq[S], Future[TraversableOnce[O]])]]) = {\n-    addOutstandingFuture(handleSuccess(fIn).unit)\n+  private def finishExecute(states: Seq[S], fIn: Future[TraversableOnce[(Seq[S], Future[TraversableOnce[O]])]]) = {","path":"summingbird-online/src/main/scala/com/twitter/summingbird/online/executor/AsyncBase.scala","position":73,"original_position":73,"commit_id":"32afb827bfca6ae7760456b64a0d1229e64df3b9","original_commit_id":"32afb827bfca6ae7760456b64a0d1229e64df3b9","user":{"login":"jnievelt","id":4684038,"avatar_url":"https://avatars.githubusercontent.com/u/4684038?v=3","gravatar_id":"","url":"https://api.github.com/users/jnievelt","html_url":"https://github.com/jnievelt","followers_url":"https://api.github.com/users/jnievelt/followers","following_url":"https://api.github.com/users/jnievelt/following{/other_user}","gists_url":"https://api.github.com/users/jnievelt/gists{/gist_id}","starred_url":"https://api.github.com/users/jnievelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnievelt/subscriptions","organizations_url":"https://api.github.com/users/jnievelt/orgs","repos_url":"https://api.github.com/users/jnievelt/repos","events_url":"https://api.github.com/users/jnievelt/events{/privacy}","received_events_url":"https://api.github.com/users/jnievelt/received_events","type":"User","site_admin":false},"body":"Sure, I like that approach too.","created_at":"2016-09-12T17:09:12Z","updated_at":"2016-09-12T17:09:12Z","html_url":"https://github.com/twitter/summingbird/pull/685#discussion_r78412806","pull_request_url":"https://api.github.com/repos/twitter/summingbird/pulls/685","_links":{"self":{"href":"https://api.github.com/repos/twitter/summingbird/pulls/comments/78412806"},"html":{"href":"https://github.com/twitter/summingbird/pull/685#discussion_r78412806"},"pull_request":{"href":"https://api.github.com/repos/twitter/summingbird/pulls/685"}}},"pull_request":{"url":"https://api.github.com/repos/twitter/summingbird/pulls/685","id":83747922,"html_url":"https://github.com/twitter/summingbird/pull/685","diff_url":"https://github.com/twitter/summingbird/pull/685.diff","patch_url":"https://github.com/twitter/summingbird/pull/685.patch","issue_url":"https://api.github.com/repos/twitter/summingbird/issues/685","number":685,"state":"open","locked":false,"title":"Extracting Future queuing logic from AsyncBase","user":{"login":"jnievelt","id":4684038,"avatar_url":"https://avatars.githubusercontent.com/u/4684038?v=3","gravatar_id":"","url":"https://api.github.com/users/jnievelt","html_url":"https://github.com/jnievelt","followers_url":"https://api.github.com/users/jnievelt/followers","following_url":"https://api.github.com/users/jnievelt/following{/other_user}","gists_url":"https://api.github.com/users/jnievelt/gists{/gist_id}","starred_url":"https://api.github.com/users/jnievelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnievelt/subscriptions","organizations_url":"https://api.github.com/users/jnievelt/orgs","repos_url":"https://api.github.com/users/jnievelt/repos","events_url":"https://api.github.com/users/jnievelt/events{/privacy}","received_events_url":"https://api.github.com/users/jnievelt/received_events","type":"User","site_admin":false},"body":"Adding `FutureQueue`, a structure that essentially takes in `(S, Future[T])` and gives back `(S, Try[T])`.\r\n\r\nI didn't mean to totally gut `AsyncBase`, but it's mostly become a shim integrating its own interface (`apply`, `tick`), the `OperationContainer` interface (`execute`, `executeTick`), and its `FutureQueue`.\r\n\r\nMaking this private for now; ultimately we may want to move it to algebird.\r\n\r\nAdding a few more tests while I'm at it.  Cleaning up Node.scala style since it does that automatically.\r\n\r\nThe next step would be to integrate this with `AggregatingOutputCollector`.","created_at":"2016-09-02T05:39:29Z","updated_at":"2016-09-12T17:09:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dbd265599a6f7d30c0f7558c57b0eea57127f75d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/twitter/summingbird/pulls/685/commits","review_comments_url":"https://api.github.com/repos/twitter/summingbird/pulls/685/comments","review_comment_url":"https://api.github.com/repos/twitter/summingbird/pulls/comments{/number}","comments_url":"https://api.github.com/repos/twitter/summingbird/issues/685/comments","statuses_url":"https://api.github.com/repos/twitter/summingbird/statuses/32afb827bfca6ae7760456b64a0d1229e64df3b9","head":{"label":"twitter:jnievelt/future-queue","ref":"jnievelt/future-queue","sha":"32afb827bfca6ae7760456b64a0d1229e64df3b9","user":{"login":"twitter","id":50278,"avatar_url":"https://avatars.githubusercontent.com/u/50278?v=3","gravatar_id":"","url":"https://api.github.com/users/twitter","html_url":"https://github.com/twitter","followers_url":"https://api.github.com/users/twitter/followers","following_url":"https://api.github.com/users/twitter/following{/other_user}","gists_url":"https://api.github.com/users/twitter/gists{/gist_id}","starred_url":"https://api.github.com/users/twitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twitter/subscriptions","organizations_url":"https://api.github.com/users/twitter/orgs","repos_url":"https://api.github.com/users/twitter/repos","events_url":"https://api.github.com/users/twitter/events{/privacy}","received_events_url":"https://api.github.com/users/twitter/received_events","type":"Organization","site_admin":false},"repo":{"id":5957708,"name":"summingbird","full_name":"twitter/summingbird","owner":{"login":"twitter","id":50278,"avatar_url":"https://avatars.githubusercontent.com/u/50278?v=3","gravatar_id":"","url":"https://api.github.com/users/twitter","html_url":"https://github.com/twitter","followers_url":"https://api.github.com/users/twitter/followers","following_url":"https://api.github.com/users/twitter/following{/other_user}","gists_url":"https://api.github.com/users/twitter/gists{/gist_id}","starred_url":"https://api.github.com/users/twitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twitter/subscriptions","organizations_url":"https://api.github.com/users/twitter/orgs","repos_url":"https://api.github.com/users/twitter/repos","events_url":"https://api.github.com/users/twitter/events{/privacy}","received_events_url":"https://api.github.com/users/twitter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/twitter/summingbird","description":"Streaming MapReduce with Scalding and Storm","fork":false,"url":"https://api.github.com/repos/twitter/summingbird","forks_url":"https://api.github.com/repos/twitter/summingbird/forks","keys_url":"https://api.github.com/repos/twitter/summingbird/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twitter/summingbird/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twitter/summingbird/teams","hooks_url":"https://api.github.com/repos/twitter/summingbird/hooks","issue_events_url":"https://api.github.com/repos/twitter/summingbird/issues/events{/number}","events_url":"https://api.github.com/repos/twitter/summingbird/events","assignees_url":"https://api.github.com/repos/twitter/summingbird/assignees{/user}","branches_url":"https://api.github.com/repos/twitter/summingbird/branches{/branch}","tags_url":"https://api.github.com/repos/twitter/summingbird/tags","blobs_url":"https://api.github.com/repos/twitter/summingbird/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twitter/summingbird/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twitter/summingbird/git/refs{/sha}","trees_url":"https://api.github.com/repos/twitter/summingbird/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twitter/summingbird/statuses/{sha}","languages_url":"https://api.github.com/repos/twitter/summingbird/languages","stargazers_url":"https://api.github.com/repos/twitter/summingbird/stargazers","contributors_url":"https://api.github.com/repos/twitter/summingbird/contributors","subscribers_url":"https://api.github.com/repos/twitter/summingbird/subscribers","subscription_url":"https://api.github.com/repos/twitter/summingbird/subscription","commits_url":"https://api.github.com/repos/twitter/summingbird/commits{/sha}","git_commits_url":"https://api.github.com/repos/twitter/summingbird/git/commits{/sha}","comments_url":"https://api.github.com/repos/twitter/summingbird/comments{/number}","issue_comment_url":"https://api.github.com/repos/twitter/summingbird/issues/comments{/number}","contents_url":"https://api.github.com/repos/twitter/summingbird/contents/{+path}","compare_url":"https://api.github.com/repos/twitter/summingbird/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twitter/summingbird/merges","archive_url":"https://api.github.com/repos/twitter/summingbird/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twitter/summingbird/downloads","issues_url":"https://api.github.com/repos/twitter/summingbird/issues{/number}","pulls_url":"https://api.github.com/repos/twitter/summingbird/pulls{/number}","milestones_url":"https://api.github.com/repos/twitter/summingbird/milestones{/number}","notifications_url":"https://api.github.com/repos/twitter/summingbird/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twitter/summingbird/labels{/name}","releases_url":"https://api.github.com/repos/twitter/summingbird/releases{/id}","deployments_url":"https://api.github.com/repos/twitter/summingbird/deployments","created_at":"2012-09-25T22:38:35Z","updated_at":"2016-09-06T11:14:44Z","pushed_at":"2016-09-10T01:51:22Z","git_url":"git://github.com/twitter/summingbird.git","ssh_url":"git@github.com:twitter/summingbird.git","clone_url":"https://github.com/twitter/summingbird.git","svn_url":"https://github.com/twitter/summingbird","homepage":"https://twitter.com/summingbird","size":8610,"stargazers_count":1776,"watchers_count":1776,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":229,"mirror_url":null,"open_issues_count":135,"forks":229,"open_issues":135,"watchers":1776,"default_branch":"develop"}},"base":{"label":"twitter:develop","ref":"develop","sha":"fc3851ee8e008f1f8059b70ebe6b7d448f10ee57","user":{"login":"twitter","id":50278,"avatar_url":"https://avatars.githubusercontent.com/u/50278?v=3","gravatar_id":"","url":"https://api.github.com/users/twitter","html_url":"https://github.com/twitter","followers_url":"https://api.github.com/users/twitter/followers","following_url":"https://api.github.com/users/twitter/following{/other_user}","gists_url":"https://api.github.com/users/twitter/gists{/gist_id}","starred_url":"https://api.github.com/users/twitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twitter/subscriptions","organizations_url":"https://api.github.com/users/twitter/orgs","repos_url":"https://api.github.com/users/twitter/repos","events_url":"https://api.github.com/users/twitter/events{/privacy}","received_events_url":"https://api.github.com/users/twitter/received_events","type":"Organization","site_admin":false},"repo":{"id":5957708,"name":"summingbird","full_name":"twitter/summingbird","owner":{"login":"twitter","id":50278,"avatar_url":"https://avatars.githubusercontent.com/u/50278?v=3","gravatar_id":"","url":"https://api.github.com/users/twitter","html_url":"https://github.com/twitter","followers_url":"https://api.github.com/users/twitter/followers","following_url":"https://api.github.com/users/twitter/following{/other_user}","gists_url":"https://api.github.com/users/twitter/gists{/gist_id}","starred_url":"https://api.github.com/users/twitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twitter/subscriptions","organizations_url":"https://api.github.com/users/twitter/orgs","repos_url":"https://api.github.com/users/twitter/repos","events_url":"https://api.github.com/users/twitter/events{/privacy}","received_events_url":"https://api.github.com/users/twitter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/twitter/summingbird","description":"Streaming MapReduce with Scalding and Storm","fork":false,"url":"https://api.github.com/repos/twitter/summingbird","forks_url":"https://api.github.com/repos/twitter/summingbird/forks","keys_url":"https://api.github.com/repos/twitter/summingbird/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twitter/summingbird/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twitter/summingbird/teams","hooks_url":"https://api.github.com/repos/twitter/summingbird/hooks","issue_events_url":"https://api.github.com/repos/twitter/summingbird/issues/events{/number}","events_url":"https://api.github.com/repos/twitter/summingbird/events","assignees_url":"https://api.github.com/repos/twitter/summingbird/assignees{/user}","branches_url":"https://api.github.com/repos/twitter/summingbird/branches{/branch}","tags_url":"https://api.github.com/repos/twitter/summingbird/tags","blobs_url":"https://api.github.com/repos/twitter/summingbird/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twitter/summingbird/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twitter/summingbird/git/refs{/sha}","trees_url":"https://api.github.com/repos/twitter/summingbird/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twitter/summingbird/statuses/{sha}","languages_url":"https://api.github.com/repos/twitter/summingbird/languages","stargazers_url":"https://api.github.com/repos/twitter/summingbird/stargazers","contributors_url":"https://api.github.com/repos/twitter/summingbird/contributors","subscribers_url":"https://api.github.com/repos/twitter/summingbird/subscribers","subscription_url":"https://api.github.com/repos/twitter/summingbird/subscription","commits_url":"https://api.github.com/repos/twitter/summingbird/commits{/sha}","git_commits_url":"https://api.github.com/repos/twitter/summingbird/git/commits{/sha}","comments_url":"https://api.github.com/repos/twitter/summingbird/comments{/number}","issue_comment_url":"https://api.github.com/repos/twitter/summingbird/issues/comments{/number}","contents_url":"https://api.github.com/repos/twitter/summingbird/contents/{+path}","compare_url":"https://api.github.com/repos/twitter/summingbird/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twitter/summingbird/merges","archive_url":"https://api.github.com/repos/twitter/summingbird/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twitter/summingbird/downloads","issues_url":"https://api.github.com/repos/twitter/summingbird/issues{/number}","pulls_url":"https://api.github.com/repos/twitter/summingbird/pulls{/number}","milestones_url":"https://api.github.com/repos/twitter/summingbird/milestones{/number}","notifications_url":"https://api.github.com/repos/twitter/summingbird/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twitter/summingbird/labels{/name}","releases_url":"https://api.github.com/repos/twitter/summingbird/releases{/id}","deployments_url":"https://api.github.com/repos/twitter/summingbird/deployments","created_at":"2012-09-25T22:38:35Z","updated_at":"2016-09-06T11:14:44Z","pushed_at":"2016-09-10T01:51:22Z","git_url":"git://github.com/twitter/summingbird.git","ssh_url":"git@github.com:twitter/summingbird.git","clone_url":"https://github.com/twitter/summingbird.git","svn_url":"https://github.com/twitter/summingbird","homepage":"https://twitter.com/summingbird","size":8610,"stargazers_count":1776,"watchers_count":1776,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":229,"mirror_url":null,"open_issues_count":135,"forks":229,"open_issues":135,"watchers":1776,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/twitter/summingbird/pulls/685"},"html":{"href":"https://github.com/twitter/summingbird/pull/685"},"issue":{"href":"https://api.github.com/repos/twitter/summingbird/issues/685"},"comments":{"href":"https://api.github.com/repos/twitter/summingbird/issues/685/comments"},"review_comments":{"href":"https://api.github.com/repos/twitter/summingbird/pulls/685/comments"},"review_comment":{"href":"https://api.github.com/repos/twitter/summingbird/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/twitter/summingbird/pulls/685/commits"},"statuses":{"href":"https://api.github.com/repos/twitter/summingbird/statuses/32afb827bfca6ae7760456b64a0d1229e64df3b9"}}}}
{"actor":{"display_login":"jnievelt"}}