othiym23 / node-continuation-local-storage

implementation of https://github.com/joyent/node/issues/5243
BSD 2-Clause "Simplified" License
1.13k stars 207 forks source link

Is the module production ready? #20

Closed gabrielf closed 10 years ago

gabrielf commented 10 years ago

This is not an issue, sorry, but this module seems to good to be true so I have to ask what the catch is? If there isn't any catch why is it not heavily depended upon by other modules and why aren't there gazillions of blogposts about it?

othiym23 commented 10 years ago

The real answer is that we originally built CLS for a single purpose: enabling asynchronous transaction tracing for New Relic for Node. Which answers the title of this issue: yes, thousands of sites are running CLS in production (as part of New Relic), with very few problems. I won't claim that it's bug-free (in fact, @groundwater and I are investigating a potential memory leak in it right now, and its monkeypatching is still a little fragile), but so far it seems to do exactly what it claims with very few side effects.

I haven't really had much time to promote it, but I do know that @dshaw has been discussing dedicating an episode of NodeUp to it and the non-New Relic companies who are using it. That will probably happen sometime in the next month or so. See the issue thread for details.

selfie-1

othiym23 commented 10 years ago

(selfie courtesy GitHub selfies, cuz why not)

paulhill commented 10 years ago

Here at KIXEYE we have used CLS extensively to reduce the battering our memcached servers were taking because of our modular re-useable approach to function composition. It's been excellent. So the answer to your question is that apart from a few niggling issues (having to shim some dependency libraries to retain the context) it is a work of genius and doesn't get near the air-play it should. Forrest has brought the equivalent of 'thread local' storage to Node and that is next level design ninja badassery.

gabrielf commented 10 years ago

It was via the dependencies to the new-relic module I first found out about the module but I just had to get it confirmed. Thanks for the quick response! I'll definitely going to give it a try.