8 ms·
Alternatively you could use fibers. We've been using them together with Common Node (https://github.com/olegp/common-node https://github.com/olegp/common-node)
by olegp 13y ago
Alternatively you could use fibers. We've been using them together with Common Node (https://github.com/olegp/common-node https://github.com/olegp/common-node) at https://starthq.com https://starthq.com with great success - running smoothly on an EC2 micro instance with 300+ concurrent users on site.
- wycats 13y agoGenerators will be an ES6 feature, and therefore libraries written using generators and yield will run on both the server and in browsers. For many use-cases, this is a good enough reason to use them.
- olegp 13y agoIn my experience there's very few libraries that would require generators that could run on both the server and in browsers.
- SeanDav 13y agoI have been quite interested in using fibres. I have concerns about compatibility with existing libraries, stability etc. Could you point to some documentation/discussion/blogs/anything that addresses these concerns and provides decent examples of use?
- olegp 13y agoHere's a talk I gave on the topic: http://vimeo.com/32507674 http://vimeo.com/32507674 and here are the slides: http://www.slideshare.net/olegp/js-everywhere-2011 http://www.slideshare.net/olegp/js-everywhere-2011 Feel free to message me on Twitter (@olegpodsechin) and I'd be happy to answer any questions you have.