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

Primary dependency module "domain" is being deprecated. #44

Closed
anitsh opened this issue Nov 26, 2019 · 4 comments
Closed

Primary dependency module "domain" is being deprecated. #44

anitsh opened this issue Nov 26, 2019 · 4 comments
Labels
question Further information is requested under discussion

Comments

@anitsh
Copy link

anitsh commented Nov 26, 2019

As the main module based on which this library is based on is being deprecated by Node.js community, an alternative or plan to move ahead must be thought of but after reading the document what has not been mentioned is which other API to use for this purpose as replacement API has not been specifically mentioned.

https://nodejs.org/api/domain.html

@kabirbaidhya
Copy link
Contributor

kabirbaidhya commented Nov 26, 2019

@codeanit Yes, thanks for raising an issue. We are aware of this. And we've thought through this before opensourcing this project.

This is a pending deprecation which means they'll deprecate this module only when they finalize a replacement API which they haven't done it yet. When that happens, we plan to deprecate our domain based adapter shortly and publish a new adapter based on the new API when it's released.

For now we've made it clear in a note for the users to read about domains first before using this.

image

One assurance we have for the users is - when we release a new adapter with an alternative internals, there will be no breaking change - the usage for the end users remains the same - but they can opt-in to use a newer adapter instead. That is because the design of async-store decouples it with the internal APIs adapters use and so the end user contract remains the same. Every new implementation we do will be done as a new adapter that adheres to the same high-level contract.

In addition, we've also planned a new alternative adapter implementation here #14. Once this is done, users can choose in between using domain or async_hooks meanwhile keeping their codebase same.

cc @cham11ng @mesaugat

@kabirbaidhya kabirbaidhya added question Further information is requested under discussion labels Nov 26, 2019
@kabirbaidhya
Copy link
Contributor

As for background, we did go through some alternatives that are not node's standard built-in APIs as well like continuation-local-storage but it's almost dated now and we faced few issues in production time and again and eventually we ended up creating our own utility from scratch that eventually became the async-store 🙂.

@kabirbaidhya kabirbaidhya pinned this issue Nov 26, 2019
@anitsh
Copy link
Author

anitsh commented Nov 26, 2019

@kabirbaidhya Thank you for the update. It's nice to see there will be a plan for the changes.

Should this issue kept as a reminder or closed, I leave it up-to the team then :)

Thanks.

@kabirbaidhya
Copy link
Contributor

Yes. I've pinned this issue and we'll keep it open for discussion / additional proposals until we have an alternative implementation.

@kabirbaidhya kabirbaidhya changed the title Primary dependency module "Domain" is being deprecated. Primary dependency module "domain" is being deprecated. Nov 26, 2019
@mesaugat mesaugat closed this as completed Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested under discussion
Projects
None yet
Development

No branches or pull requests

3 participants