{"action":"opened","number":46,"pull_request":{"url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/pulls/46","id":101347407,"html_url":"https://github.com/haskell-distributed/network-transport-tcp/pull/46","diff_url":"https://github.com/haskell-distributed/network-transport-tcp/pull/46.diff","patch_url":"https://github.com/haskell-distributed/network-transport-tcp/pull/46.patch","issue_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/issues/46","number":46,"state":"open","locked":false,"title":"Queueing and buffering for an EndPoint","user":{"login":"avieth","id":1420272,"avatar_url":"https://avatars.githubusercontent.com/u/1420272?v=3","gravatar_id":"","url":"https://api.github.com/users/avieth","html_url":"https://github.com/avieth","followers_url":"https://api.github.com/users/avieth/followers","following_url":"https://api.github.com/users/avieth/following{/other_user}","gists_url":"https://api.github.com/users/avieth/gists{/gist_id}","starred_url":"https://api.github.com/users/avieth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avieth/subscriptions","organizations_url":"https://api.github.com/users/avieth/orgs","repos_url":"https://api.github.com/users/avieth/repos","events_url":"https://api.github.com/users/avieth/events{/privacy}","received_events_url":"https://api.github.com/users/avieth/received_events","type":"User","site_admin":false},"body":"This is related to #45 but I think it's a better solution. Instead of explicitly delaying socket reads for a given `RemoteEndPoint`, a queueing policy is given which determines:\r\n\r\n- For each `EndPointPair`, how big should the input buffer be (unbounded, or some positive number)?\r\n- For each `EndPointPair`, what should be its priority (how soon should data be read from its buffer)?\r\n\r\nThe actual buffers and queue are held in a `TVar`. `receive` on some `EndPoint` will read it and try to get the next event according to the priority queue, or `retry` if there's no data. Threads taking input will use `postEvent`, which will block (`retry`) in case the buffer for the given `EndPointAddress` is full.\r\n\r\nThe `roundRobinUnbounded` policy is chosen by default (if the typical `newEndPoint` function is used) and this gives semantics that are consistent with before the change, but with the added guarantee that an `EndPoint` serves its incoming connections in a round-robin.\r\n\r\nThe queue policy can change over time, so it's held in some `STM` and sampled whenever it's needed.","created_at":"2017-01-12T21:49:26Z","updated_at":"2017-01-12T21:49:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/pulls/46/commits","review_comments_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/pulls/46/comments","review_comment_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/issues/46/comments","statuses_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/statuses/46cdc7a7a8840a7d29f62346cf0cfad66fe912f5","head":{"label":"avieth:avieth/queue","ref":"avieth/queue","sha":"46cdc7a7a8840a7d29f62346cf0cfad66fe912f5","user":{"login":"avieth","id":1420272,"avatar_url":"https://avatars.githubusercontent.com/u/1420272?v=3","gravatar_id":"","url":"https://api.github.com/users/avieth","html_url":"https://github.com/avieth","followers_url":"https://api.github.com/users/avieth/followers","following_url":"https://api.github.com/users/avieth/following{/other_user}","gists_url":"https://api.github.com/users/avieth/gists{/gist_id}","starred_url":"https://api.github.com/users/avieth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avieth/subscriptions","organizations_url":"https://api.github.com/users/avieth/orgs","repos_url":"https://api.github.com/users/avieth/repos","events_url":"https://api.github.com/users/avieth/events{/privacy}","received_events_url":"https://api.github.com/users/avieth/received_events","type":"User","site_admin":false},"repo":{"id":77854667,"name":"network-transport-tcp","full_name":"avieth/network-transport-tcp","owner":{"login":"avieth","id":1420272,"avatar_url":"https://avatars.githubusercontent.com/u/1420272?v=3","gravatar_id":"","url":"https://api.github.com/users/avieth","html_url":"https://github.com/avieth","followers_url":"https://api.github.com/users/avieth/followers","following_url":"https://api.github.com/users/avieth/following{/other_user}","gists_url":"https://api.github.com/users/avieth/gists{/gist_id}","starred_url":"https://api.github.com/users/avieth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avieth/subscriptions","organizations_url":"https://api.github.com/users/avieth/orgs","repos_url":"https://api.github.com/users/avieth/repos","events_url":"https://api.github.com/users/avieth/events{/privacy}","received_events_url":"https://api.github.com/users/avieth/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/avieth/network-transport-tcp","description":"TCP Realisation of Network.Transport","fork":true,"url":"https://api.github.com/repos/avieth/network-transport-tcp","forks_url":"https://api.github.com/repos/avieth/network-transport-tcp/forks","keys_url":"https://api.github.com/repos/avieth/network-transport-tcp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/avieth/network-transport-tcp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/avieth/network-transport-tcp/teams","hooks_url":"https://api.github.com/repos/avieth/network-transport-tcp/hooks","issue_events_url":"https://api.github.com/repos/avieth/network-transport-tcp/issues/events{/number}","events_url":"https://api.github.com/repos/avieth/network-transport-tcp/events","assignees_url":"https://api.github.com/repos/avieth/network-transport-tcp/assignees{/user}","branches_url":"https://api.github.com/repos/avieth/network-transport-tcp/branches{/branch}","tags_url":"https://api.github.com/repos/avieth/network-transport-tcp/tags","blobs_url":"https://api.github.com/repos/avieth/network-transport-tcp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/avieth/network-transport-tcp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/avieth/network-transport-tcp/git/refs{/sha}","trees_url":"https://api.github.com/repos/avieth/network-transport-tcp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/avieth/network-transport-tcp/statuses/{sha}","languages_url":"https://api.github.com/repos/avieth/network-transport-tcp/languages","stargazers_url":"https://api.github.com/repos/avieth/network-transport-tcp/stargazers","contributors_url":"https://api.github.com/repos/avieth/network-transport-tcp/contributors","subscribers_url":"https://api.github.com/repos/avieth/network-transport-tcp/subscribers","subscription_url":"https://api.github.com/repos/avieth/network-transport-tcp/subscription","commits_url":"https://api.github.com/repos/avieth/network-transport-tcp/commits{/sha}","git_commits_url":"https://api.github.com/repos/avieth/network-transport-tcp/git/commits{/sha}","comments_url":"https://api.github.com/repos/avieth/network-transport-tcp/comments{/number}","issue_comment_url":"https://api.github.com/repos/avieth/network-transport-tcp/issues/comments{/number}","contents_url":"https://api.github.com/repos/avieth/network-transport-tcp/contents/{+path}","compare_url":"https://api.github.com/repos/avieth/network-transport-tcp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/avieth/network-transport-tcp/merges","archive_url":"https://api.github.com/repos/avieth/network-transport-tcp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/avieth/network-transport-tcp/downloads","issues_url":"https://api.github.com/repos/avieth/network-transport-tcp/issues{/number}","pulls_url":"https://api.github.com/repos/avieth/network-transport-tcp/pulls{/number}","milestones_url":"https://api.github.com/repos/avieth/network-transport-tcp/milestones{/number}","notifications_url":"https://api.github.com/repos/avieth/network-transport-tcp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/avieth/network-transport-tcp/labels{/name}","releases_url":"https://api.github.com/repos/avieth/network-transport-tcp/releases{/id}","deployments_url":"https://api.github.com/repos/avieth/network-transport-tcp/deployments","created_at":"2017-01-02T18:50:24Z","updated_at":"2017-01-02T18:50:27Z","pushed_at":"2017-01-12T20:53:12Z","git_url":"git://github.com/avieth/network-transport-tcp.git","ssh_url":"git@github.com:avieth/network-transport-tcp.git","clone_url":"https://github.com/avieth/network-transport-tcp.git","svn_url":"https://github.com/avieth/network-transport-tcp","homepage":"http://haskell-distributed.github.com","size":270,"stargazers_count":0,"watchers_count":0,"language":"Haskell","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"haskell-distributed:master","ref":"master","sha":"ef88b1627b1ddabb716c5abc91ceb562097891fc","user":{"login":"haskell-distributed","id":1215670,"avatar_url":"https://avatars.githubusercontent.com/u/1215670?v=3","gravatar_id":"","url":"https://api.github.com/users/haskell-distributed","html_url":"https://github.com/haskell-distributed","followers_url":"https://api.github.com/users/haskell-distributed/followers","following_url":"https://api.github.com/users/haskell-distributed/following{/other_user}","gists_url":"https://api.github.com/users/haskell-distributed/gists{/gist_id}","starred_url":"https://api.github.com/users/haskell-distributed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haskell-distributed/subscriptions","organizations_url":"https://api.github.com/users/haskell-distributed/orgs","repos_url":"https://api.github.com/users/haskell-distributed/repos","events_url":"https://api.github.com/users/haskell-distributed/events{/privacy}","received_events_url":"https://api.github.com/users/haskell-distributed/received_events","type":"Organization","site_admin":false},"repo":{"id":7962840,"name":"network-transport-tcp","full_name":"haskell-distributed/network-transport-tcp","owner":{"login":"haskell-distributed","id":1215670,"avatar_url":"https://avatars.githubusercontent.com/u/1215670?v=3","gravatar_id":"","url":"https://api.github.com/users/haskell-distributed","html_url":"https://github.com/haskell-distributed","followers_url":"https://api.github.com/users/haskell-distributed/followers","following_url":"https://api.github.com/users/haskell-distributed/following{/other_user}","gists_url":"https://api.github.com/users/haskell-distributed/gists{/gist_id}","starred_url":"https://api.github.com/users/haskell-distributed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haskell-distributed/subscriptions","organizations_url":"https://api.github.com/users/haskell-distributed/orgs","repos_url":"https://api.github.com/users/haskell-distributed/repos","events_url":"https://api.github.com/users/haskell-distributed/events{/privacy}","received_events_url":"https://api.github.com/users/haskell-distributed/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/haskell-distributed/network-transport-tcp","description":"TCP Realisation of Network.Transport","fork":false,"url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp","forks_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/forks","keys_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/teams","hooks_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/hooks","issue_events_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/issues/events{/number}","events_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/events","assignees_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/assignees{/user}","branches_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/branches{/branch}","tags_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/tags","blobs_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/git/refs{/sha}","trees_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/statuses/{sha}","languages_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/languages","stargazers_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/stargazers","contributors_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/contributors","subscribers_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/subscribers","subscription_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/subscription","commits_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/commits{/sha}","git_commits_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/git/commits{/sha}","comments_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/comments{/number}","issue_comment_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/issues/comments{/number}","contents_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/contents/{+path}","compare_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/merges","archive_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/downloads","issues_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/issues{/number}","pulls_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/pulls{/number}","milestones_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/milestones{/number}","notifications_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/labels{/name}","releases_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/releases{/id}","deployments_url":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/deployments","created_at":"2013-02-01T17:46:35Z","updated_at":"2016-10-24T15:36:31Z","pushed_at":"2017-01-11T04:31:10Z","git_url":"git://github.com/haskell-distributed/network-transport-tcp.git","ssh_url":"git@github.com:haskell-distributed/network-transport-tcp.git","clone_url":"https://github.com/haskell-distributed/network-transport-tcp.git","svn_url":"https://github.com/haskell-distributed/network-transport-tcp","homepage":"http://haskell-distributed.github.com","size":293,"stargazers_count":10,"watchers_count":10,"language":"Haskell","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":13,"forks":12,"open_issues":13,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/pulls/46"},"html":{"href":"https://github.com/haskell-distributed/network-transport-tcp/pull/46"},"issue":{"href":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/issues/46"},"comments":{"href":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/issues/46/comments"},"review_comments":{"href":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/pulls/46/comments"},"review_comment":{"href":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/pulls/46/commits"},"statuses":{"href":"https://api.github.com/repos/haskell-distributed/network-transport-tcp/statuses/46cdc7a7a8840a7d29f62346cf0cfad66fe912f5"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":437,"deletions":143,"changed_files":2}}
{"actor":{"display_login":"avieth"}}