Tuesday, June 23, 2015

NODE.JS

NODE.JS

Every few weeks someone posts a Java vs Node benchmark, like PayPal’s or Joey Whelan’s. As one of maintainers of Node core and contributors to many npm modules, StrongLoop is happy to see Node winning lately. Everyone knows benchmarks are a specific measurement and don’t account for all cases. Sometimes Java is faster. Sometimes Node is. Certainly what and how you measure matters a lot.

High concurrency matters
But there’s one thing we can all agree on: At high levels of concurrency (thousands of connections) your server needs to go to asynchronous non-blocking. I would have finished that sentence with IO, but the issue is that if any part of your server code blocks you’re going to need a thread. And at these levels of concurrency, you can’t go creating threads for every connection. So the whole codepath needs to be non-blocking and async, not just the IO layer. This is where Node excels.

While Java or Node or something else may win a benchmark, no server has the non-blocking ecosystem of Node.js today. Over 50k modules all written in the async style, ready to use. Countless code examples strewn about the web. Lessons and tutorials all using the async style. Debuggers, monitors, loggers, cluster managers, test frameworks and more all expecting your code to be non-blocking async.

Until Java or another language ecosystem gets to this level of support for the async pattern (a level we got to in Node because of async JavaScript in the browser), it won’t matter whether raw NIO performance is better than Node or any other benchmark result: Projects that need big concurrency will choose Node (and put up with its warts) because it’s the best way to get their project done.

Big companies, committed vendors and engaged community
We’re going to help keep maturing Node and the ecosystem of tools and libraries as well. Others are doing the same, from big users like LinkedIn, Yahoo & Groupon to vendors like Microsoft, MuleSoft and Appcelerator and individual developers contributing thousands of useful modules every year. Node will keep getting better, we’ll help bandage over some of those warts or remove them altogether, and the era of async shall take us to the promised land of millions of connected devices.

Use StrongOps to Monitor Node Apps
Ready to start monitoring event loops, manage Node clusters and chase down memory leaks? We’ve made it easy to get started with StrongOps either locally or on your favorite cloud, with a simple npm install.










No comments:

Easy Way to Handle Android Notifications

Android Notifications Android Toast class provides a handy way to show users alerts but problem is that these alerts are not persist...