{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/web-server-frameworks/issues/22","repository_url":"https://api.github.com/repos/nodejs/web-server-frameworks","labels_url":"https://api.github.com/repos/nodejs/web-server-frameworks/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/web-server-frameworks/issues/22/comments","events_url":"https://api.github.com/repos/nodejs/web-server-frameworks/issues/22/events","html_url":"https://github.com/nodejs/web-server-frameworks/issues/22","id":549217029,"node_id":"MDU6SXNzdWU1NDkyMTcwMjk=","number":22,"title":"agenda: Handling of request context scope","user":{"login":"fed135","id":2380281,"node_id":"MDQ6VXNlcjIzODAyODE=","avatar_url":"https://avatars1.githubusercontent.com/u/2380281?v=4","gravatar_id":"","url":"https://api.github.com/users/fed135","html_url":"https://github.com/fed135","followers_url":"https://api.github.com/users/fed135/followers","following_url":"https://api.github.com/users/fed135/following{/other_user}","gists_url":"https://api.github.com/users/fed135/gists{/gist_id}","starred_url":"https://api.github.com/users/fed135/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fed135/subscriptions","organizations_url":"https://api.github.com/users/fed135/orgs","repos_url":"https://api.github.com/users/fed135/repos","events_url":"https://api.github.com/users/fed135/events{/privacy}","received_events_url":"https://api.github.com/users/fed135/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2020-01-13T22:23:45Z","updated_at":"2020-01-14T17:23:28Z","closed_at":null,"author_association":"MEMBER","body":"It's a common use case to need access to the request data, (ex: headers) further down the user code, or to want to store stateful information that is scoped to a specific request. - this is a concept present in other languages (like PHP), or is a use of thread caching in Java, for example.\r\n\r\nThere are multiple ways to do this right now, either via the domains API, [continuation-local-storage](https://www.npmjs.com/package/continuation-local-storage) or [cls-hooked](https://www.npmjs.com/package/cls-hooked). Unfortunately, these are either deprecated or introduce weird behaviors, memory leaks and a significant performance overhead.\r\n\r\nI'm opening this to debate that this is an obstacle that API developers simply have to deal with, or if there's room for improvement in Node/ Web frameworks."},"comment":{"url":"https://api.github.com/repos/nodejs/web-server-frameworks/issues/comments/574283439","html_url":"https://github.com/nodejs/web-server-frameworks/issues/22#issuecomment-574283439","issue_url":"https://api.github.com/repos/nodejs/web-server-frameworks/issues/22","id":574283439,"node_id":"MDEyOklzc3VlQ29tbWVudDU3NDI4MzQzOQ==","user":{"login":"wesleytodd","id":1027776,"node_id":"MDQ6VXNlcjEwMjc3NzY=","avatar_url":"https://avatars2.githubusercontent.com/u/1027776?v=4","gravatar_id":"","url":"https://api.github.com/users/wesleytodd","html_url":"https://github.com/wesleytodd","followers_url":"https://api.github.com/users/wesleytodd/followers","following_url":"https://api.github.com/users/wesleytodd/following{/other_user}","gists_url":"https://api.github.com/users/wesleytodd/gists{/gist_id}","starred_url":"https://api.github.com/users/wesleytodd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wesleytodd/subscriptions","organizations_url":"https://api.github.com/users/wesleytodd/orgs","repos_url":"https://api.github.com/users/wesleytodd/repos","events_url":"https://api.github.com/users/wesleytodd/events{/privacy}","received_events_url":"https://api.github.com/users/wesleytodd/received_events","type":"User","site_admin":false},"created_at":"2020-01-14T17:23:27Z","updated_at":"2020-01-14T17:23:27Z","author_association":"MEMBER","body":"Great resources @mcollina, thanks!\r\n\r\nIs there something this team can do to help move this forward?  It looks like it is on track, but maybe we could provide some documentation on usage within a web app?  Or maybe an experimental framework implemented on top of nodejs/node#26540 to show it in action?\r\n\r\nThis is where I think we need to clear up our team's scope so that we know where we should pitch in.  I am not sure what will be the most effective way to participate in these conversations, but I do think we should be aware and help where we can.\r\n\r\n"}}
{"actor":{"display_login":"wesleytodd"}}