GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — async-hooks: introduce async-storage API by vdeturckheim · Pull Request #26540 · nodejs/node Conversation
Member
This introduces a new API in core to provide asynchronous storage features. More and more Node.js users have been needing such API to:
Some userland modules exist but they:
Havin such API in core will make the ecosystem more stable and reliable when needing an asynchronous storage. This is still an early work and there is probably a lot of updates to do to this PR :) Checklist
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
This comment has been minimized.
mcollina
reviewed
Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page.
mscdex
previously requested changes
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMO this is best left as a userland module, especially considering it can be fairly easily implemented using just Even if this kind of feature were to be added to node core, it would be better to have it start in userland to allow easier iteration on the idea first, to figure out the best API and behaviors between all parties that would be involved.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
addaleax
reviewed
Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
jasnell
reviewed
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this supposed to be
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
| |||||||||||||||||||||||||||||||||||||
There was an error while loading. Please reload this page.
|
Should we create npm placeholder for this name as per our guide? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Go ahead. I kind of expect this to go under `@nodejs/async-storage` but
better safe than sorry.
Il giorno sab 9 mar 2019 alle ore 13:10 Vse Mozhet Byt <
[email protected]> ha scritto:
… Should we create npm placeholder for this name as per our guides?
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#26540 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AADL4xdIdUUD6v4zX5DYe6C_E1y5GCinks5vU6SmgaJpZM4bmmI4>
.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Sorry, I am not experienced in registering placeholders in npm, so anybody more confident please do it. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
There is https://www.npmjs.com/package/async-storage, which makes calling this module |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Does this require a separate new top level module? Could this be exposed alternatively through the existing async_hooks module? Or via util? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@jasnell I actually think it would make sense to have that in |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I will update the PR over the week end and start to contact APM and RASP vendors to ensure thay can comment. Thanks a lot to all of you for the comments and suggestions! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
if this is going to be in core I'd want it to be more similar to https://github.com/WICG/kv-storage |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@vdeturckheim ... One thing to consider is that by putting this into a new module, it automatically becomes semver-major and significantly harder to backport. My hope is that we could at least get this into 10.x also. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@jasnell good point, I'll move it to @devsnek I did not know about this proposal. I'd be interested in other opinions here but the solutions I could see would probably be a bit slow. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@vdeturckheim reading over this again it seems i was confused as to what this pr is adding to node. i think it might lend itself better to a different name like "async_closure" or "async_context" something. i'd be strongly in favor of making the class available as an |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I think it would be better placed in |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
As a developer and co-maintainer of |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Notable changes: * async_hooks * introduce async-context API (vdeturckheim) #26540 * stream * support passing generator functions into pipeline() (Robert Nagy) #31223 * tls * expose SSL\_export\_keying\_material (simon) #31814 * vm * implement vm.measureMemory() for per-context memory measurement (Joyee Cheung) #31824 PR-URL: #32027
Notable changes: * async_hooks * introduce async-context API (vdeturckheim) #26540 * stream * support passing generator functions into pipeline() (Robert Nagy) #31223 * tls * expose SSL\_export\_keying\_material (simon) #31814 * vm * implement vm.measureMemory() for per-context memory measurement (Joyee Cheung) #31824 PR-URL: #32027
Notable changes: * async_hooks * introduce async-context API (vdeturckheim) #26540 * stream * support passing generator functions into pipeline() (Robert Nagy) #31223 * tls * expose SSL\_export\_keying\_material (simon) #31814 * vm * implement vm.measureMemory() for per-context memory measurement (Joyee Cheung) #31824 PR-URL: #32027
Notable changes: * async_hooks * introduce async-context API (vdeturckheim) #26540 * stream * support passing generator functions into pipeline() (Robert Nagy) #31223 * tls * expose SSL\_export\_keying\_material (simon) #31814 * vm * implement vm.measureMemory() for per-context memory measurement (Joyee Cheung) #31824 PR-URL: #32027
Notable changes: * async_hooks * introduce async-context API (vdeturckheim) #26540 * stream * support passing generator functions into pipeline() (Robert Nagy) #31223 * tls * expose SSL\_export\_keying\_material (simon) #31814 * vm * implement vm.measureMemory() for per-context memory measurement (Joyee Cheung) #31824 PR-URL: #32027
|
Any chance this will be backported to v12? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
It would be great to have Note: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
As far as I know, backporting |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Care must be taken to include also the followup PRs fixing various bugs found afterwards. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I've created a backport PR for |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@puzpuzpuz thanks! this next release is a patch so it'll go out in the subsequent minor. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
v12 backport: #32318 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Adding AsyncLocalStorage class to async_hooks module. This API provide a simple CLS-like set of features. Co-authored-by: Andrey Pechkurov <[email protected]> PR-URL: nodejs#26540 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Stephen Belanger <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
Adding AsyncLocalStorage class to async_hooks module. This API provide a simple CLS-like set of features. Co-authored-by: Andrey Pechkurov <[email protected]> PR-URL: nodejs#26540 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Stephen Belanger <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
Adding AsyncLocalStorage class to async_hooks module. This API provide a simple CLS-like set of features. Co-authored-by: Andrey Pechkurov <[email protected]> PR-URL: #26540 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Stephen Belanger <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
There was an error while loading. Please reload this page.
|
Providing a reference to another issue here because most interested parties are subscribed to this issue. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.