{"action":"created","comment":{"url":"https://api.github.com/repos/dcos/dcos-ui/pulls/comments/169597628","pull_request_review_id":98146603,"id":169597628,"diff_hunk":"@@ -0,0 +1,19 @@\n+import { timer } from \"rxjs/observable/timer\";\n+\n+import \"rxjs/add/operator/delayWhen\";\n+import \"rxjs/add/operator/retryWhen\";\n+import \"rxjs/add/operator/scan\";\n+\n+/* eslint-disable import/prefer-default-export */\n+export function linearBackoff(maxRetries = 5, delay = 1000, scheduler = null) {","path":"src/js/utils/rxjsUtils.js","position":null,"original_position":8,"commit_id":"290b1acc9703a3f463a1750e3a4e4917ca875047","original_commit_id":"245940c31736c56c820822c762404a0b451e523d","user":{"login":"orlandohohmeier","id":647035,"avatar_url":"https://avatars3.githubusercontent.com/u/647035?v=4","gravatar_id":"","url":"https://api.github.com/users/orlandohohmeier","html_url":"https://github.com/orlandohohmeier","followers_url":"https://api.github.com/users/orlandohohmeier/followers","following_url":"https://api.github.com/users/orlandohohmeier/following{/other_user}","gists_url":"https://api.github.com/users/orlandohohmeier/gists{/gist_id}","starred_url":"https://api.github.com/users/orlandohohmeier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orlandohohmeier/subscriptions","organizations_url":"https://api.github.com/users/orlandohohmeier/orgs","repos_url":"https://api.github.com/users/orlandohohmeier/repos","events_url":"https://api.github.com/users/orlandohohmeier/events{/privacy}","received_events_url":"https://api.github.com/users/orlandohohmeier/received_events","type":"User","site_admin":false},"body":"I very much like the idea of using jitter to spread the requests but don't think that we need this kind of backoff strategy in this case. AWS develop this technique to improve the DynamoDB *write* performance (note that writes are blocking) when a huge number of clients tries to do so at the same time. Using a linear or exponential backoff should be sufficient,  as we only read data and don't have a huge number of clients connecting at the same time.","created_at":"2018-02-21T10:49:01Z","updated_at":"2018-02-21T10:49:01Z","html_url":"https://github.com/dcos/dcos-ui/pull/2780#discussion_r169597628","pull_request_url":"https://api.github.com/repos/dcos/dcos-ui/pulls/2780","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/dcos/dcos-ui/pulls/comments/169597628"},"html":{"href":"https://github.com/dcos/dcos-ui/pull/2780#discussion_r169597628"},"pull_request":{"href":"https://api.github.com/repos/dcos/dcos-ui/pulls/2780"}},"in_reply_to_id":169473262},"pull_request":{"url":"https://api.github.com/repos/dcos/dcos-ui/pulls/2780","id":170183981,"html_url":"https://github.com/dcos/dcos-ui/pull/2780","diff_url":"https://github.com/dcos/dcos-ui/pull/2780.diff","patch_url":"https://github.com/dcos/dcos-ui/pull/2780.patch","issue_url":"https://api.github.com/repos/dcos/dcos-ui/issues/2780","number":2780,"state":"open","locked":false,"title":"DCOS-21337: Add linearBackoff retry to the Mesos stream","user":{"login":"nLight","id":186223,"avatar_url":"https://avatars0.githubusercontent.com/u/186223?v=4","gravatar_id":"","url":"https://api.github.com/users/nLight","html_url":"https://github.com/nLight","followers_url":"https://api.github.com/users/nLight/followers","following_url":"https://api.github.com/users/nLight/following{/other_user}","gists_url":"https://api.github.com/users/nLight/gists{/gist_id}","starred_url":"https://api.github.com/users/nLight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nLight/subscriptions","organizations_url":"https://api.github.com/users/nLight/orgs","repos_url":"https://api.github.com/users/nLight/repos","events_url":"https://api.github.com/users/nLight/events{/privacy}","received_events_url":"https://api.github.com/users/nLight/received_events","type":"User","site_admin":false},"body":"We have a retry in the https://github.com/dcos-labs/mesos-client but it will catch only the Network errors and in a very stubborn fashion. This PR addresses all the parsing errors that can happen when processing messages and  consuming the stream.\r\n\r\n`linearBackoff` ensures that we don't bombard the server with retries.\r\n\r\nTo enable easier testing I added `rxjs-marbles` library that provides some helpers.\r\n\r\nTo test this in the browser you could emulate the network split and monitor the Networking tab in the Inspector. You could also add some `throw` and `console.log` if that pleases you.\r\n\r\n**Checklist**\r\n- [x] Did you add a JIRA issue in a commit message or as part of the branch name?\r\n- [x] Did you add new unit tests?\r\n- [ ] Did you add new integration tests?\r\n- [ ] If this is a regression, did you write a test to catch this in the future?\r\n\r\n<!-- More info can be found by clicking the \"guidelines for contributing\" link above. -->\r\n\r\nCloses DCOS-21337","created_at":"2018-02-20T12:53:30Z","updated_at":"2018-02-21T10:49:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a94ff2d95304710b9d178b75229544a5777793dd","assignee":{"login":"Fabs","id":10524,"avatar_url":"https://avatars1.githubusercontent.com/u/10524?v=4","gravatar_id":"","url":"https://api.github.com/users/Fabs","html_url":"https://github.com/Fabs","followers_url":"https://api.github.com/users/Fabs/followers","following_url":"https://api.github.com/users/Fabs/following{/other_user}","gists_url":"https://api.github.com/users/Fabs/gists{/gist_id}","starred_url":"https://api.github.com/users/Fabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fabs/subscriptions","organizations_url":"https://api.github.com/users/Fabs/orgs","repos_url":"https://api.github.com/users/Fabs/repos","events_url":"https://api.github.com/users/Fabs/events{/privacy}","received_events_url":"https://api.github.com/users/Fabs/received_events","type":"User","site_admin":false},"assignees":[{"login":"Fabs","id":10524,"avatar_url":"https://avatars1.githubusercontent.com/u/10524?v=4","gravatar_id":"","url":"https://api.github.com/users/Fabs","html_url":"https://github.com/Fabs","followers_url":"https://api.github.com/users/Fabs/followers","following_url":"https://api.github.com/users/Fabs/following{/other_user}","gists_url":"https://api.github.com/users/Fabs/gists{/gist_id}","starred_url":"https://api.github.com/users/Fabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fabs/subscriptions","organizations_url":"https://api.github.com/users/Fabs/orgs","repos_url":"https://api.github.com/users/Fabs/repos","events_url":"https://api.github.com/users/Fabs/events{/privacy}","received_events_url":"https://api.github.com/users/Fabs/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/dcos/dcos-ui/pulls/2780/commits","review_comments_url":"https://api.github.com/repos/dcos/dcos-ui/pulls/2780/comments","review_comment_url":"https://api.github.com/repos/dcos/dcos-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dcos/dcos-ui/issues/2780/comments","statuses_url":"https://api.github.com/repos/dcos/dcos-ui/statuses/290b1acc9703a3f463a1750e3a4e4917ca875047","head":{"label":"dcos:drozhkov/dcos-21337-retry-mesos-stream","ref":"drozhkov/dcos-21337-retry-mesos-stream","sha":"290b1acc9703a3f463a1750e3a4e4917ca875047","user":{"login":"dcos","id":17648048,"avatar_url":"https://avatars1.githubusercontent.com/u/17648048?v=4","gravatar_id":"","url":"https://api.github.com/users/dcos","html_url":"https://github.com/dcos","followers_url":"https://api.github.com/users/dcos/followers","following_url":"https://api.github.com/users/dcos/following{/other_user}","gists_url":"https://api.github.com/users/dcos/gists{/gist_id}","starred_url":"https://api.github.com/users/dcos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcos/subscriptions","organizations_url":"https://api.github.com/users/dcos/orgs","repos_url":"https://api.github.com/users/dcos/repos","events_url":"https://api.github.com/users/dcos/events{/privacy}","received_events_url":"https://api.github.com/users/dcos/received_events","type":"Organization","site_admin":false},"repo":{"id":56547504,"name":"dcos-ui","full_name":"dcos/dcos-ui","owner":{"login":"dcos","id":17648048,"avatar_url":"https://avatars1.githubusercontent.com/u/17648048?v=4","gravatar_id":"","url":"https://api.github.com/users/dcos","html_url":"https://github.com/dcos","followers_url":"https://api.github.com/users/dcos/followers","following_url":"https://api.github.com/users/dcos/following{/other_user}","gists_url":"https://api.github.com/users/dcos/gists{/gist_id}","starred_url":"https://api.github.com/users/dcos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcos/subscriptions","organizations_url":"https://api.github.com/users/dcos/orgs","repos_url":"https://api.github.com/users/dcos/repos","events_url":"https://api.github.com/users/dcos/events{/privacy}","received_events_url":"https://api.github.com/users/dcos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dcos/dcos-ui","description":"The UI for The Datacenter Operating System","fork":false,"url":"https://api.github.com/repos/dcos/dcos-ui","forks_url":"https://api.github.com/repos/dcos/dcos-ui/forks","keys_url":"https://api.github.com/repos/dcos/dcos-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dcos/dcos-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dcos/dcos-ui/teams","hooks_url":"https://api.github.com/repos/dcos/dcos-ui/hooks","issue_events_url":"https://api.github.com/repos/dcos/dcos-ui/issues/events{/number}","events_url":"https://api.github.com/repos/dcos/dcos-ui/events","assignees_url":"https://api.github.com/repos/dcos/dcos-ui/assignees{/user}","branches_url":"https://api.github.com/repos/dcos/dcos-ui/branches{/branch}","tags_url":"https://api.github.com/repos/dcos/dcos-ui/tags","blobs_url":"https://api.github.com/repos/dcos/dcos-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dcos/dcos-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dcos/dcos-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/dcos/dcos-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dcos/dcos-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/dcos/dcos-ui/languages","stargazers_url":"https://api.github.com/repos/dcos/dcos-ui/stargazers","contributors_url":"https://api.github.com/repos/dcos/dcos-ui/contributors","subscribers_url":"https://api.github.com/repos/dcos/dcos-ui/subscribers","subscription_url":"https://api.github.com/repos/dcos/dcos-ui/subscription","commits_url":"https://api.github.com/repos/dcos/dcos-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/dcos/dcos-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/dcos/dcos-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/dcos/dcos-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/dcos/dcos-ui/contents/{+path}","compare_url":"https://api.github.com/repos/dcos/dcos-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dcos/dcos-ui/merges","archive_url":"https://api.github.com/repos/dcos/dcos-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dcos/dcos-ui/downloads","issues_url":"https://api.github.com/repos/dcos/dcos-ui/issues{/number}","pulls_url":"https://api.github.com/repos/dcos/dcos-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/dcos/dcos-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/dcos/dcos-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dcos/dcos-ui/labels{/name}","releases_url":"https://api.github.com/repos/dcos/dcos-ui/releases{/id}","deployments_url":"https://api.github.com/repos/dcos/dcos-ui/deployments","created_at":"2016-04-18T22:48:06Z","updated_at":"2018-02-16T11:22:24Z","pushed_at":"2018-02-21T10:10:16Z","git_url":"git://github.com/dcos/dcos-ui.git","ssh_url":"git@github.com:dcos/dcos-ui.git","clone_url":"https://github.com/dcos/dcos-ui.git","svn_url":"https://github.com/dcos/dcos-ui","homepage":"https://dcos.io/","size":42456,"stargazers_count":171,"watchers_count":171,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":63,"mirror_url":null,"archived":false,"open_issues_count":13,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":63,"open_issues":13,"watchers":171,"default_branch":"master"}},"base":{"label":"dcos:master","ref":"master","sha":"de428e4eddbca30d866dea0aa55c1f7c9af1a1e5","user":{"login":"dcos","id":17648048,"avatar_url":"https://avatars1.githubusercontent.com/u/17648048?v=4","gravatar_id":"","url":"https://api.github.com/users/dcos","html_url":"https://github.com/dcos","followers_url":"https://api.github.com/users/dcos/followers","following_url":"https://api.github.com/users/dcos/following{/other_user}","gists_url":"https://api.github.com/users/dcos/gists{/gist_id}","starred_url":"https://api.github.com/users/dcos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcos/subscriptions","organizations_url":"https://api.github.com/users/dcos/orgs","repos_url":"https://api.github.com/users/dcos/repos","events_url":"https://api.github.com/users/dcos/events{/privacy}","received_events_url":"https://api.github.com/users/dcos/received_events","type":"Organization","site_admin":false},"repo":{"id":56547504,"name":"dcos-ui","full_name":"dcos/dcos-ui","owner":{"login":"dcos","id":17648048,"avatar_url":"https://avatars1.githubusercontent.com/u/17648048?v=4","gravatar_id":"","url":"https://api.github.com/users/dcos","html_url":"https://github.com/dcos","followers_url":"https://api.github.com/users/dcos/followers","following_url":"https://api.github.com/users/dcos/following{/other_user}","gists_url":"https://api.github.com/users/dcos/gists{/gist_id}","starred_url":"https://api.github.com/users/dcos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcos/subscriptions","organizations_url":"https://api.github.com/users/dcos/orgs","repos_url":"https://api.github.com/users/dcos/repos","events_url":"https://api.github.com/users/dcos/events{/privacy}","received_events_url":"https://api.github.com/users/dcos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dcos/dcos-ui","description":"The UI for The Datacenter Operating System","fork":false,"url":"https://api.github.com/repos/dcos/dcos-ui","forks_url":"https://api.github.com/repos/dcos/dcos-ui/forks","keys_url":"https://api.github.com/repos/dcos/dcos-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dcos/dcos-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dcos/dcos-ui/teams","hooks_url":"https://api.github.com/repos/dcos/dcos-ui/hooks","issue_events_url":"https://api.github.com/repos/dcos/dcos-ui/issues/events{/number}","events_url":"https://api.github.com/repos/dcos/dcos-ui/events","assignees_url":"https://api.github.com/repos/dcos/dcos-ui/assignees{/user}","branches_url":"https://api.github.com/repos/dcos/dcos-ui/branches{/branch}","tags_url":"https://api.github.com/repos/dcos/dcos-ui/tags","blobs_url":"https://api.github.com/repos/dcos/dcos-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dcos/dcos-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dcos/dcos-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/dcos/dcos-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dcos/dcos-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/dcos/dcos-ui/languages","stargazers_url":"https://api.github.com/repos/dcos/dcos-ui/stargazers","contributors_url":"https://api.github.com/repos/dcos/dcos-ui/contributors","subscribers_url":"https://api.github.com/repos/dcos/dcos-ui/subscribers","subscription_url":"https://api.github.com/repos/dcos/dcos-ui/subscription","commits_url":"https://api.github.com/repos/dcos/dcos-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/dcos/dcos-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/dcos/dcos-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/dcos/dcos-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/dcos/dcos-ui/contents/{+path}","compare_url":"https://api.github.com/repos/dcos/dcos-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dcos/dcos-ui/merges","archive_url":"https://api.github.com/repos/dcos/dcos-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dcos/dcos-ui/downloads","issues_url":"https://api.github.com/repos/dcos/dcos-ui/issues{/number}","pulls_url":"https://api.github.com/repos/dcos/dcos-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/dcos/dcos-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/dcos/dcos-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dcos/dcos-ui/labels{/name}","releases_url":"https://api.github.com/repos/dcos/dcos-ui/releases{/id}","deployments_url":"https://api.github.com/repos/dcos/dcos-ui/deployments","created_at":"2016-04-18T22:48:06Z","updated_at":"2018-02-16T11:22:24Z","pushed_at":"2018-02-21T10:10:16Z","git_url":"git://github.com/dcos/dcos-ui.git","ssh_url":"git@github.com:dcos/dcos-ui.git","clone_url":"https://github.com/dcos/dcos-ui.git","svn_url":"https://github.com/dcos/dcos-ui","homepage":"https://dcos.io/","size":42456,"stargazers_count":171,"watchers_count":171,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":63,"mirror_url":null,"archived":false,"open_issues_count":13,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":63,"open_issues":13,"watchers":171,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dcos/dcos-ui/pulls/2780"},"html":{"href":"https://github.com/dcos/dcos-ui/pull/2780"},"issue":{"href":"https://api.github.com/repos/dcos/dcos-ui/issues/2780"},"comments":{"href":"https://api.github.com/repos/dcos/dcos-ui/issues/2780/comments"},"review_comments":{"href":"https://api.github.com/repos/dcos/dcos-ui/pulls/2780/comments"},"review_comment":{"href":"https://api.github.com/repos/dcos/dcos-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dcos/dcos-ui/pulls/2780/commits"},"statuses":{"href":"https://api.github.com/repos/dcos/dcos-ui/statuses/290b1acc9703a3f463a1750e3a4e4917ca875047"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"orlandohohmeier"}}