GithubHelp home page GithubHelp logo

remove domains? about kraken-js HOT 16 CLOSED

aheckmann avatar aheckmann commented on June 11, 2024
remove domains?

from kraken-js.

Comments (16)

aheckmann avatar aheckmann commented on June 11, 2024

Here is the NodeJS domains post-mortem. After reading, I'm in favor of sacrificing the rare debugging assistance domains provide and removing them from kraken.

from kraken-js.

aheckmann avatar aheckmann commented on June 11, 2024

Hapi has removed domains too: hapijs/hapi#3573

from kraken-js.

aheckmann avatar aheckmann commented on June 11, 2024

NodeJS discussion of using async_hooks and documentation / best practices plans. It's still the early days for a full replacement.

from kraken-js.

shaunwarman avatar shaunwarman commented on June 11, 2024

Right, core seems to be in the move to async_hooks, but it doesn't seem like there is a concrete direction, especially with async_hooks still in experimental phase.

from kraken-js.

aheckmann avatar aheckmann commented on June 11, 2024

Correct, a solid alternative is not there yet. However, domains don't even work properly as is. The more I research them and the related problems they are giving the app I'm analyzing, the more I never ever want to use them anywhere again. If I were starting a new NodeJS project, I would not use Kraken because it, by default, enables the use of the broken domain design. Nor can I confidently recommend using Kraken to anyone for the same reason. The kraken docs don't warn about their use AFAIK. I therefore don't trust the project.

With alternative solutions available which support async/await style + try/catch error handling models, it's a no brainier for me.

from kraken-js.

aheckmann avatar aheckmann commented on June 11, 2024

Restify deprecated functionality utilizing domains.

from kraken-js.

shaunwarman avatar shaunwarman commented on June 11, 2024

Ya, I wouldn't mind a deprecation warning now and a major bump for 3 with removal and some thought out upgrades.

Also, does it even make sense to sprinkle upgrades within the current setup or to move the underlying framework from express to something like koa? Which brings a lot of work in another direction to get the error handling benefits and a potential solution.

I mainly bring this up as there does seem to be a window right now where error handling is a problem with no concrete solution in current setup with domain deprecation and async hooks in an experimental stage.

from kraken-js.

aheckmann avatar aheckmann commented on June 11, 2024

from kraken-js.

tlivings avatar tlivings commented on June 11, 2024

Given that deprecation warning was merged, assuming this is safe to close.

from kraken-js.

aheckmann avatar aheckmann commented on June 11, 2024

I'd prefer to leave it open until we remove domains.

from kraken-js.

tlivings avatar tlivings commented on June 11, 2024

I don’t think domains deal with a “rare” use case. Until they are replaced with something of equivalent functionality, or express wraps the entire request chain in a promise, there will be a need for this.

from kraken-js.

aheckmann avatar aheckmann commented on June 11, 2024

from kraken-js.

tlivings avatar tlivings commented on June 11, 2024

I’d be surprised if express didn’t have some plan for async/await support. Hapi 17 went this direction and it seems natural for this to be the next evolution of express.

from kraken-js.

aheckmann avatar aheckmann commented on June 11, 2024

from kraken-js.

tlivings avatar tlivings commented on June 11, 2024

Koa is a different framework TJ Holowaychuk build that would not be compatible with kraken without a major rewrite.

Express is still maintained and being developed.

from kraken-js.

aheckmann avatar aheckmann commented on June 11, 2024

from kraken-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.