{"action":"created","comment":{"url":"https://api.github.com/repos/taskrabbit/makara/pulls/comments/170429452","pull_request_review_id":99119492,"id":170429452,"diff_hunk":"@@ -275,16 +282,7 @@ def handle_request_after_third_party_record_creation\n end\n ```\n \n-Similarly, if you have a third party service which will conduct a generic request against your Rack app, you can force master via a query param:\n-\n-```ruby\n-def send_url_to_third_party\n-  context = Makara::Context.get_current\n-  ThirdParty.read_from_here!(\"http://mysite.com/path/to/resource?_mkra_ctxt=#{context}\")\n-end\n-```\n-\n ## Todo\n \n-* Cookie based cache store?\n+* Support for providing context as query param","path":"README.md","position":92,"original_position":92,"commit_id":"5ef0bb806c6911c9ed3947f9a02ac5a122ec88d4","original_commit_id":"5ef0bb806c6911c9ed3947f9a02ac5a122ec88d4","user":{"login":"bleonard","id":36106,"avatar_url":"https://avatars0.githubusercontent.com/u/36106?v=4","gravatar_id":"","url":"https://api.github.com/users/bleonard","html_url":"https://github.com/bleonard","followers_url":"https://api.github.com/users/bleonard/followers","following_url":"https://api.github.com/users/bleonard/following{/other_user}","gists_url":"https://api.github.com/users/bleonard/gists{/gist_id}","starred_url":"https://api.github.com/users/bleonard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bleonard/subscriptions","organizations_url":"https://api.github.com/users/bleonard/orgs","repos_url":"https://api.github.com/users/bleonard/repos","events_url":"https://api.github.com/users/bleonard/events{/privacy}","received_events_url":"https://api.github.com/users/bleonard/received_events","type":"User","site_admin":false},"body":"Maybe `path/here?makara_stick=proxy_one|proxy_two`\r\nNot sure if need timestamps. In that case could just be the whole cookie string.","created_at":"2018-02-24T19:02:09Z","updated_at":"2018-02-24T19:05:04Z","html_url":"https://github.com/taskrabbit/makara/pull/194#discussion_r170429452","pull_request_url":"https://api.github.com/repos/taskrabbit/makara/pulls/194","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/taskrabbit/makara/pulls/comments/170429452"},"html":{"href":"https://github.com/taskrabbit/makara/pull/194#discussion_r170429452"},"pull_request":{"href":"https://api.github.com/repos/taskrabbit/makara/pulls/194"}},"in_reply_to_id":170428376},"pull_request":{"url":"https://api.github.com/repos/taskrabbit/makara/pulls/194","id":168629377,"html_url":"https://github.com/taskrabbit/makara/pull/194","diff_url":"https://github.com/taskrabbit/makara/pull/194.diff","patch_url":"https://github.com/taskrabbit/makara/pull/194.patch","issue_url":"https://api.github.com/repos/taskrabbit/makara/issues/194","number":194,"state":"open","locked":false,"title":"Implement stickiness for the duration of `master_ttl` via cookies","user":{"login":"rosa","id":813033,"avatar_url":"https://avatars1.githubusercontent.com/u/813033?v=4","gravatar_id":"","url":"https://api.github.com/users/rosa","html_url":"https://github.com/rosa","followers_url":"https://api.github.com/users/rosa/followers","following_url":"https://api.github.com/users/rosa/following{/other_user}","gists_url":"https://api.github.com/users/rosa/gists{/gist_id}","starred_url":"https://api.github.com/users/rosa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rosa/subscriptions","organizations_url":"https://api.github.com/users/rosa/orgs","repos_url":"https://api.github.com/users/rosa/repos","events_url":"https://api.github.com/users/rosa/events{/privacy}","received_events_url":"https://api.github.com/users/rosa/received_events","type":"User","site_admin":false},"body":"This pull request significantly changes how Makara's context and stickiness behaves. It implements what is described in [this comment](https://github.com/taskrabbit/makara/issues/162#issuecomment-363008007), and can be summarised as:\r\n* Stickiness is not maintained only for the subsequent request after using `master`, is maintained for the whole duration of `master_ttl`, as many as request that be. I noticed [another old comment](https://github.com/taskrabbit/makara/pull/100#issuecomment-163882651) in which this behaviour was assumed by another person, as a more intuitive way of mitigating replication lag.\r\n* Makara no longer keeps track of any context identifier or hash. It only keeps track of which configurations are stuck to `master` and when that stickiness expires. This is what is considered _context_ now: a map of configuration ids and their stickiness expiration times.\r\n* Context is maintained between requests stored in a cookie. We don't store a hash anymore, we store the whole context (the map of config ids and timestamps). \r\n* It's still possible to skip stickiness, force stickiness, and release all stuck connections at once.\r\n\r\nTodo:\r\n- [ ] Support passing stickiness information via query args, as it's currently possible with `http://mysite.com/path/to/resource?_mkra_ctxt=#{context}`.\r\n\r\n----\r\n\r\nThis is a very big change in code and in behaviour, so I totally understand any reluctance to merge it 😅 If this is too radical, I'm happy to get to an intermediate solution, although I do believe that the change is behaviour makes more sense as the idea of replication lag mitigation goes.","created_at":"2018-02-12T16:42:29Z","updated_at":"2018-02-24T19:05:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"91294ff01d131a34bd7becd88ae588aa1b0eb877","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/taskrabbit/makara/pulls/194/commits","review_comments_url":"https://api.github.com/repos/taskrabbit/makara/pulls/194/comments","review_comment_url":"https://api.github.com/repos/taskrabbit/makara/pulls/comments{/number}","comments_url":"https://api.github.com/repos/taskrabbit/makara/issues/194/comments","statuses_url":"https://api.github.com/repos/taskrabbit/makara/statuses/5ef0bb806c6911c9ed3947f9a02ac5a122ec88d4","head":{"label":"rosa:stickiness-without-context","ref":"stickiness-without-context","sha":"5ef0bb806c6911c9ed3947f9a02ac5a122ec88d4","user":{"login":"rosa","id":813033,"avatar_url":"https://avatars1.githubusercontent.com/u/813033?v=4","gravatar_id":"","url":"https://api.github.com/users/rosa","html_url":"https://github.com/rosa","followers_url":"https://api.github.com/users/rosa/followers","following_url":"https://api.github.com/users/rosa/following{/other_user}","gists_url":"https://api.github.com/users/rosa/gists{/gist_id}","starred_url":"https://api.github.com/users/rosa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rosa/subscriptions","organizations_url":"https://api.github.com/users/rosa/orgs","repos_url":"https://api.github.com/users/rosa/repos","events_url":"https://api.github.com/users/rosa/events{/privacy}","received_events_url":"https://api.github.com/users/rosa/received_events","type":"User","site_admin":false},"repo":{"id":120012169,"name":"makara","full_name":"rosa/makara","owner":{"login":"rosa","id":813033,"avatar_url":"https://avatars1.githubusercontent.com/u/813033?v=4","gravatar_id":"","url":"https://api.github.com/users/rosa","html_url":"https://github.com/rosa","followers_url":"https://api.github.com/users/rosa/followers","following_url":"https://api.github.com/users/rosa/following{/other_user}","gists_url":"https://api.github.com/users/rosa/gists{/gist_id}","starred_url":"https://api.github.com/users/rosa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rosa/subscriptions","organizations_url":"https://api.github.com/users/rosa/orgs","repos_url":"https://api.github.com/users/rosa/repos","events_url":"https://api.github.com/users/rosa/events{/privacy}","received_events_url":"https://api.github.com/users/rosa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rosa/makara","description":"A Read-Write Proxy for Connections; Also provides an ActiveRecord adapter.","fork":true,"url":"https://api.github.com/repos/rosa/makara","forks_url":"https://api.github.com/repos/rosa/makara/forks","keys_url":"https://api.github.com/repos/rosa/makara/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rosa/makara/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rosa/makara/teams","hooks_url":"https://api.github.com/repos/rosa/makara/hooks","issue_events_url":"https://api.github.com/repos/rosa/makara/issues/events{/number}","events_url":"https://api.github.com/repos/rosa/makara/events","assignees_url":"https://api.github.com/repos/rosa/makara/assignees{/user}","branches_url":"https://api.github.com/repos/rosa/makara/branches{/branch}","tags_url":"https://api.github.com/repos/rosa/makara/tags","blobs_url":"https://api.github.com/repos/rosa/makara/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rosa/makara/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rosa/makara/git/refs{/sha}","trees_url":"https://api.github.com/repos/rosa/makara/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rosa/makara/statuses/{sha}","languages_url":"https://api.github.com/repos/rosa/makara/languages","stargazers_url":"https://api.github.com/repos/rosa/makara/stargazers","contributors_url":"https://api.github.com/repos/rosa/makara/contributors","subscribers_url":"https://api.github.com/repos/rosa/makara/subscribers","subscription_url":"https://api.github.com/repos/rosa/makara/subscription","commits_url":"https://api.github.com/repos/rosa/makara/commits{/sha}","git_commits_url":"https://api.github.com/repos/rosa/makara/git/commits{/sha}","comments_url":"https://api.github.com/repos/rosa/makara/comments{/number}","issue_comment_url":"https://api.github.com/repos/rosa/makara/issues/comments{/number}","contents_url":"https://api.github.com/repos/rosa/makara/contents/{+path}","compare_url":"https://api.github.com/repos/rosa/makara/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rosa/makara/merges","archive_url":"https://api.github.com/repos/rosa/makara/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rosa/makara/downloads","issues_url":"https://api.github.com/repos/rosa/makara/issues{/number}","pulls_url":"https://api.github.com/repos/rosa/makara/pulls{/number}","milestones_url":"https://api.github.com/repos/rosa/makara/milestones{/number}","notifications_url":"https://api.github.com/repos/rosa/makara/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rosa/makara/labels{/name}","releases_url":"https://api.github.com/repos/rosa/makara/releases{/id}","deployments_url":"https://api.github.com/repos/rosa/makara/deployments","created_at":"2018-02-02T17:44:09Z","updated_at":"2018-02-02T17:44:11Z","pushed_at":"2018-02-22T16:03:00Z","git_url":"git://github.com/rosa/makara.git","ssh_url":"git@github.com:rosa/makara.git","clone_url":"https://github.com/rosa/makara.git","svn_url":"https://github.com/rosa/makara","homepage":"http://tech.taskrabbit.com/","size":566,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"taskrabbit:master","ref":"master","sha":"c6b158e847468379da8cc2eb69aee455bef386fb","user":{"login":"taskrabbit","id":666590,"avatar_url":"https://avatars2.githubusercontent.com/u/666590?v=4","gravatar_id":"","url":"https://api.github.com/users/taskrabbit","html_url":"https://github.com/taskrabbit","followers_url":"https://api.github.com/users/taskrabbit/followers","following_url":"https://api.github.com/users/taskrabbit/following{/other_user}","gists_url":"https://api.github.com/users/taskrabbit/gists{/gist_id}","starred_url":"https://api.github.com/users/taskrabbit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taskrabbit/subscriptions","organizations_url":"https://api.github.com/users/taskrabbit/orgs","repos_url":"https://api.github.com/users/taskrabbit/repos","events_url":"https://api.github.com/users/taskrabbit/events{/privacy}","received_events_url":"https://api.github.com/users/taskrabbit/received_events","type":"Organization","site_admin":false},"repo":{"id":5708822,"name":"makara","full_name":"taskrabbit/makara","owner":{"login":"taskrabbit","id":666590,"avatar_url":"https://avatars2.githubusercontent.com/u/666590?v=4","gravatar_id":"","url":"https://api.github.com/users/taskrabbit","html_url":"https://github.com/taskrabbit","followers_url":"https://api.github.com/users/taskrabbit/followers","following_url":"https://api.github.com/users/taskrabbit/following{/other_user}","gists_url":"https://api.github.com/users/taskrabbit/gists{/gist_id}","starred_url":"https://api.github.com/users/taskrabbit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taskrabbit/subscriptions","organizations_url":"https://api.github.com/users/taskrabbit/orgs","repos_url":"https://api.github.com/users/taskrabbit/repos","events_url":"https://api.github.com/users/taskrabbit/events{/privacy}","received_events_url":"https://api.github.com/users/taskrabbit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/taskrabbit/makara","description":"A Read-Write Proxy for Connections; Also provides an ActiveRecord adapter.","fork":false,"url":"https://api.github.com/repos/taskrabbit/makara","forks_url":"https://api.github.com/repos/taskrabbit/makara/forks","keys_url":"https://api.github.com/repos/taskrabbit/makara/keys{/key_id}","collaborators_url":"https://api.github.com/repos/taskrabbit/makara/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/taskrabbit/makara/teams","hooks_url":"https://api.github.com/repos/taskrabbit/makara/hooks","issue_events_url":"https://api.github.com/repos/taskrabbit/makara/issues/events{/number}","events_url":"https://api.github.com/repos/taskrabbit/makara/events","assignees_url":"https://api.github.com/repos/taskrabbit/makara/assignees{/user}","branches_url":"https://api.github.com/repos/taskrabbit/makara/branches{/branch}","tags_url":"https://api.github.com/repos/taskrabbit/makara/tags","blobs_url":"https://api.github.com/repos/taskrabbit/makara/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/taskrabbit/makara/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/taskrabbit/makara/git/refs{/sha}","trees_url":"https://api.github.com/repos/taskrabbit/makara/git/trees{/sha}","statuses_url":"https://api.github.com/repos/taskrabbit/makara/statuses/{sha}","languages_url":"https://api.github.com/repos/taskrabbit/makara/languages","stargazers_url":"https://api.github.com/repos/taskrabbit/makara/stargazers","contributors_url":"https://api.github.com/repos/taskrabbit/makara/contributors","subscribers_url":"https://api.github.com/repos/taskrabbit/makara/subscribers","subscription_url":"https://api.github.com/repos/taskrabbit/makara/subscription","commits_url":"https://api.github.com/repos/taskrabbit/makara/commits{/sha}","git_commits_url":"https://api.github.com/repos/taskrabbit/makara/git/commits{/sha}","comments_url":"https://api.github.com/repos/taskrabbit/makara/comments{/number}","issue_comment_url":"https://api.github.com/repos/taskrabbit/makara/issues/comments{/number}","contents_url":"https://api.github.com/repos/taskrabbit/makara/contents/{+path}","compare_url":"https://api.github.com/repos/taskrabbit/makara/compare/{base}...{head}","merges_url":"https://api.github.com/repos/taskrabbit/makara/merges","archive_url":"https://api.github.com/repos/taskrabbit/makara/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/taskrabbit/makara/downloads","issues_url":"https://api.github.com/repos/taskrabbit/makara/issues{/number}","pulls_url":"https://api.github.com/repos/taskrabbit/makara/pulls{/number}","milestones_url":"https://api.github.com/repos/taskrabbit/makara/milestones{/number}","notifications_url":"https://api.github.com/repos/taskrabbit/makara/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/taskrabbit/makara/labels{/name}","releases_url":"https://api.github.com/repos/taskrabbit/makara/releases{/id}","deployments_url":"https://api.github.com/repos/taskrabbit/makara/deployments","created_at":"2012-09-06T21:33:08Z","updated_at":"2018-02-24T13:32:27Z","pushed_at":"2018-02-22T16:03:02Z","git_url":"git://github.com/taskrabbit/makara.git","ssh_url":"git@github.com:taskrabbit/makara.git","clone_url":"https://github.com/taskrabbit/makara.git","svn_url":"https://github.com/taskrabbit/makara","homepage":"http://tech.taskrabbit.com/","size":496,"stargazers_count":551,"watchers_count":551,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":100,"mirror_url":null,"archived":false,"open_issues_count":36,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":100,"open_issues":36,"watchers":551,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/taskrabbit/makara/pulls/194"},"html":{"href":"https://github.com/taskrabbit/makara/pull/194"},"issue":{"href":"https://api.github.com/repos/taskrabbit/makara/issues/194"},"comments":{"href":"https://api.github.com/repos/taskrabbit/makara/issues/194/comments"},"review_comments":{"href":"https://api.github.com/repos/taskrabbit/makara/pulls/194/comments"},"review_comment":{"href":"https://api.github.com/repos/taskrabbit/makara/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/taskrabbit/makara/pulls/194/commits"},"statuses":{"href":"https://api.github.com/repos/taskrabbit/makara/statuses/5ef0bb806c6911c9ed3947f9a02ac5a122ec88d4"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"bleonard"}}