Skip to content

Commit

Permalink
Notice of obsolescence
Browse files Browse the repository at this point in the history
  • Loading branch information
laverdet committed Apr 23, 2020
1 parent 93a7839 commit e2a0ed9
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
**NOTE OF OBSOLESCENCE** -- The author of this project recommends you avoid its use if possible. The
original version of this module targeted nodejs v0.1.x in early 2011 when JavaScript on the server
looked a lot different. Since then
[async/await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function),
[Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise),
and
[Generators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator)
were standardized and the ecosystem as a whole has moved in that direction.

I'll continue to support newer versions of nodejs as long as possible but v8 and nodejs are
extraordinarily complex and dynamic platforms. It is inevitable that one day this library will
abruptly stop working and no one will be able to do anything about it.

I'd like to say thank you to all the users of fibers, your support over the years has meant a lot to
me.

fibers(1) -- Fiber support for v8 and Node
==========================================
[![npm version](https://badgen.now.sh/npm/v/fibers)](https://www.npmjs.com/package/fibers)
Expand Down

6 comments on commit e2a0ed9

@christian-bromann
Copy link

@christian-bromann christian-bromann commented on e2a0ed9 May 20, 2020

Choose a reason for hiding this comment

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

Thank you for all your work you have been putting into this ❤️ I have to emphasise how important this package is for WebdriverIO as it simplifies users automating a browser or a mobile device. It is particularly helpful for people that come from the Java universe or other languages to Node.js and are confused about how promises or generators work. I hope it will be possible to support this a bit longer. Cheers!

@tcf909
Copy link

@tcf909 tcf909 commented on e2a0ed9 May 20, 2020

Choose a reason for hiding this comment

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

I couldn't agree more. I honestly wish node.js would have adopted this approach officially at it's much more powerful and yet, still less complex than single stack approach.

@aogaili
Copy link

@aogaili aogaili commented on e2a0ed9 Aug 6, 2020

Choose a reason for hiding this comment

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

@laverdet I'm truly impressed by you work in pioneering this library in the NodeJS ecosystem and admire your efforts in maintaining it thus far, this decision makes a total sense.

"It is inevitable that one day this library will abruptly stop working and no one will be able to do anything about it."

I'm wondering, do you have a reason to believe that this might happen in Node 14 or 15? or guesses on why this might happen sooner than later? This clarification is relevant for projects that depend on this package and trying to figure out their long-term plan and if and when should they migrate.

Finally, any tips/recommendations for the projects that plan to migrate would to modern ES is really appreciated.

Once again, thank you for your amazing work and giving the community so much. 👍

@laverdet
Copy link
Owner Author

Choose a reason for hiding this comment

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

nodejs has an abstraction called async hooks which attempts to track resources through async call stacks and improve diagnostics and debuggabilty. While not fundamentally incompatible with fibers it is definitely not built with fibers in mind. Discussions with the node team about building this with fibers in mind stalled out [#365], and not without justification.

Furthermore fibers is built on a hack to trick v8 into thinking that each fiber is actually a new thread. I poke around in thread-local storage using horrifying techniques that would make any site reliability engineer lose sleep at night coroutine.cc. It's actually astounding that such a hack has lasted for so long. There is a backup plan in case this stops working.. I could make each active fiber a distinct thread. This would drastically change the performance characteristics of fibers and might very well be a nonstarter for some applications.

Finally fibers violates control flow invariants which are core to JS. Truthfully this hasn't been a problem in practice, but it's definitely an added risk for applications.

My tips for migration are to use async/await. I understand that in some ways these are less powerful than fibers, but it's my opinion that official support from the JS ecosystem is worth the tradeoff.

@aogaili
Copy link

@aogaili aogaili commented on e2a0ed9 Sep 6, 2020

Choose a reason for hiding this comment

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

Thank you so much laverdet for your response, I think this information will help the community in the maintenance and the future decision-making processes.

@christian-bromann
Copy link

Choose a reason for hiding this comment

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

Just wanted to come back to say that Webdriver.IO has moved on: https://webdriver.io/blog/2021/07/28/sync-api-deprecation

Please sign in to comment.