Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hold my context! #1

Merged
merged 1 commit into from
Feb 20, 2020
Merged

Hold my context! #1

merged 1 commit into from
Feb 20, 2020

Conversation

bajtos
Copy link
Owner

@bajtos bajtos commented Feb 18, 2020

No description provided.

2020-hold-my-context.md Outdated Show resolved Hide resolved
2020-hold-my-context.md Outdated Show resolved Hide resolved
The talk will describe different solutions people have been using (and
abandoning) over the past 6+ years, dive into history of domains and async
hooks, explain what's so difficult about context keeping, and finally offer
bright future that's coming with the recently introduced `AsyncLocalStorage` API.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if Vladimir thinks the future is bright! nodejs/TSC#807

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. My impression was that nodejs/node#26540 is on a good way to get landed soon. I'll mention in the abstract that the final message of my talk my change depending on the outcome of current discussions in Node.js core.

2020-hold-my-context.md Outdated Show resolved Hide resolved

4. Explain why is it difficult to preserve the context, a.k.a. "connection pool
problem". Talk about our own experience with issues caused by MongoDB driver.
Mention other use cases affected by this problem (APM tools like NewRelic).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Promises are a huge problem as well. Google's native promises have support for async hooks, forced to be added by Node.js, but thirdparty promises don't, so any non-native thenable breaks the async continuation. Apparently, its particularly common for DB drivers.

Copy link

@sam-github sam-github left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Promises are a huge problem as well. Google's native promises have support for async hooks, forced to be added by Node.js, but thirdparty promises don't, so any non-native thenable breaks the async continuation. Apparently, its particularly common for DB drivers.

looks like an interesting talk to me

What about applying for the Austin NodeConf with it as well?

Copy link

@joesepi joesepi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one small nit. Good luck!

2020-hold-my-context.md Outdated Show resolved Hide resolved
Copy link

@dhmlau dhmlau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have much technical knowledge on this, but the proposal and the flow LGTM.
A few suggested changes on typos and grammar.

2020-hold-my-context.md Outdated Show resolved Hide resolved
2020-hold-my-context.md Outdated Show resolved Hide resolved

Please note that `AsyncLocalStorage` has not yet landed at the time of writing
this proposal. The last three points of my talk may may slightly change to
accomodate for the actual API the Node.js core team has settled on.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: accomodate -> accommodate

Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
@bajtos
Copy link
Owner Author

bajtos commented Feb 20, 2020

Thank you all for the suggestions, I really appreciate your feedback 🙇 ❤️

@bajtos bajtos merged commit f0f6c9a into master Feb 20, 2020
@bajtos bajtos deleted the hold-my-context branch February 20, 2020 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants