{"action":"created","issue":{"url":"https://api.github.com/repos/portier/demo-rp/issues/3","repository_url":"https://api.github.com/repos/portier/demo-rp","labels_url":"https://api.github.com/repos/portier/demo-rp/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/portier/demo-rp/issues/3/comments","events_url":"https://api.github.com/repos/portier/demo-rp/issues/3/events","html_url":"https://github.com/portier/demo-rp/pull/3","id":182969394,"number":3,"title":"Productionize","user":{"login":"callahad","id":24193,"avatar_url":"https://avatars.githubusercontent.com/u/24193?v=3","gravatar_id":"","url":"https://api.github.com/users/callahad","html_url":"https://github.com/callahad","followers_url":"https://api.github.com/users/callahad/followers","following_url":"https://api.github.com/users/callahad/following{/other_user}","gists_url":"https://api.github.com/users/callahad/gists{/gist_id}","starred_url":"https://api.github.com/users/callahad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/callahad/subscriptions","organizations_url":"https://api.github.com/users/callahad/orgs","repos_url":"https://api.github.com/users/callahad/repos","events_url":"https://api.github.com/users/callahad/events{/privacy}","received_events_url":"https://api.github.com/users/callahad/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-14T05:52:50Z","updated_at":"2016-10-14T14:05:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/portier/demo-rp/pulls/3","html_url":"https://github.com/portier/demo-rp/pull/3","diff_url":"https://github.com/portier/demo-rp/pull/3.diff","patch_url":"https://github.com/portier/demo-rp/pull/3.patch"},"body":"Still lots of ugly boilerplate to clean up, but I'd like to get this merged and auto-deploying to Heroku.\r\n\r\nWould appreciate a review from @stephank or @djc \r\n\r\nMajor changes:\r\n\r\n1. __Reintroduce Bottle as our web microframework__\r\n\r\n    Rationale: We're already using PyJWT, so we've accepted higher levels of abstraction. The use of Bottle dramatically simplifies our code and makes it more accessible to developers without intimate knowledge of WSGI. It also brings niceties like compiling caching templates instead of hitting the disk on every request and actually returning 404 errors instead of spewing backtraces when files aren't found.\r\n\r\n2. __Use aiohttp, an asyncio based server, instead of wsgiref__\r\n\r\n    Rationale: We need this thing to survive if it hits the front page of HN. A single-threaded, synchronous server isn't going to cut it. The stdlib has included asyncio since Python 3.4, and aiohttp uses that to great effect.\r\n\r\n3. __Allow configuration via environment variables__\r\n\r\n    Rationale: Effectively necessary for Heroku. See also: https://12factor.net/config\r\n\r\n    I've also switched to an INI format from JSON so the template can include an explanation of the options.\r\n\r\n4. __Use Redis / FakeRedis for nonce storage__\r\n\r\n    Rationale: This directly mimics what a real RP would need to do, and it works in multi-process environments. It also plugs a memory leak by ensuring that stale, unused nonces get garbage collected.\r\n\r\n5.  __Stop keying nonces by email address__\r\n\r\n    Rationale: It should be possible for the same person to have several simultaneous login attempts, across devices. The previous design precluded that.\r\n\r\nI'd like to work further on docs, content, and code hygiene, but I believe this is at a point where we should merge it: it doesn't leak memory, it's deployable on Heroku, it raises fewer exceptions, it's faster, and it's more reliable.\r\n\r\nIt's currently deployed at https://portier-demo.herokuapp.com/"},"comment":{"url":"https://api.github.com/repos/portier/demo-rp/issues/comments/253809363","html_url":"https://github.com/portier/demo-rp/pull/3#issuecomment-253809363","issue_url":"https://api.github.com/repos/portier/demo-rp/issues/3","id":253809363,"user":{"login":"callahad","id":24193,"avatar_url":"https://avatars.githubusercontent.com/u/24193?v=3","gravatar_id":"","url":"https://api.github.com/users/callahad","html_url":"https://github.com/callahad","followers_url":"https://api.github.com/users/callahad/followers","following_url":"https://api.github.com/users/callahad/following{/other_user}","gists_url":"https://api.github.com/users/callahad/gists{/gist_id}","starred_url":"https://api.github.com/users/callahad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/callahad/subscriptions","organizations_url":"https://api.github.com/users/callahad/orgs","repos_url":"https://api.github.com/users/callahad/repos","events_url":"https://api.github.com/users/callahad/events{/privacy}","received_events_url":"https://api.github.com/users/callahad/received_events","type":"User","site_admin":false},"created_at":"2016-10-14T14:05:39Z","updated_at":"2016-10-14T14:05:39Z","body":"Thanks for the review! Going to work on cleaning up the code and comments real quick.\r\n\r\nAlso going to hide the configuration stuff in another file; people don't need to see how that sausage gets made. :)"}}
{"actor":{"display_login":"callahad"}}