{"id":569,"date":"2015-07-10T04:00:48","date_gmt":"2015-07-10T01:00:48","guid":{"rendered":"http:\/\/www.roweb.ro\/blog\/?p=569"},"modified":"2022-01-27T13:53:54","modified_gmt":"2022-01-27T11:53:54","slug":"5-great-use-cases-for-node-js","status":"publish","type":"post","link":"https:\/\/www.roweb.ro\/blog\/5-great-use-cases-for-node-js\/","title":{"rendered":"5 Great Use Cases for Node.js"},"content":{"rendered":"<p>Node.js is a platform built on Chrome&#8217;s JavaScript runtime that untangles concurrency by replacing the Java platform&#8217;s standard, multi-threaded approach with single-threaded, event-driven I\/O.<\/p>\n<p>Node.js is a divisive topic in the programming world: it would seem that for each enthusiastic supporter praising its advantages, there is a vocal counterpart highlighting its shortcomings, or at least his personal disapproval of all the hype that\u2019s been recently surrounding this technology.<\/p>\n<p>What is indisputable, though, is the increasing trend in interest for Node.js \u2013 in terms of <a href=\"https:\/\/w3techs.com\/technologies\/details\/ws-nodejs\/all\/all\" target=\"_blank\" rel=\"noopener noreferrer\">market share<\/a>, open <a href=\"https:\/\/apmblog.dynatrace.com\/wp-content\/uploads\/2015\/03\/jobgraph_node_php_others.png\" target=\"_blank\" rel=\"noopener noreferrer\">jobs<\/a> or <a href=\"https:\/\/www.google.com\/trends\/explore#q=Node.js&amp;cmpt=q&amp;tz=Etc%2FGMT-3\" target=\"_blank\" rel=\"noopener noreferrer\">google searches<\/a>.&nbsp;Here\u2019s also an overview of well-known brands that use Node.js:<\/p>\n<p><a href=\"https:\/\/www.roweb.ro\/blog\/wp-content\/uploads\/2015\/07\/node1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-605 size-full\" src=\"https:\/\/www.roweb.ro\/blog\/wp-content\/uploads\/2015\/07\/node1.png\" alt=\"node1\" width=\"600\" height=\"273\" srcset=\"https:\/\/www.roweb.ro\/blog\/wp-content\/uploads\/2015\/07\/node1.png 600w, https:\/\/www.roweb.ro\/blog\/wp-content\/uploads\/2015\/07\/node1-300x137.png 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p><em>Image source: <\/em><a href=\"https:\/\/apmblog.dynatrace.com\/2015\/04\/09\/node-js-is-hitting-the-big-time-in-enterprise-markets\/\"><em>https:\/\/apmblog.dynatrace.com\/2015\/04\/09\/node-js-is-hitting-the-big-time-in-enterprise-markets\/<\/em><\/a><\/p>\n<p>So, it\u2019s worth taking a closer look at the potential benefits that can be derived from Node.js. It\u2019s not so much a question of \u2018is it as good as they say or not?\u2019, but a question of \u2018which use cases benefit the most from it and when is it not such a good idea?\u2019<\/p>\n<p>1.<strong> Light-weight REST \/ JSON APIs<\/strong> \u2013 thanks to the use of JavaScript and the non-blocking I\/O model, Node.js is a good option for wrapping other data sources such as databases or web services and exposing them through a JSON interface.<\/p>\n<p>2.<strong> Real-time applications<\/strong> &#8211; Node.js is a great choice for real-time data-intensive web apps as well as soft real-time systems, like social networks, instant messaging networks or chat software. You can use it to build web-connected apps that gather data from different sources, consolidate it and push it to a great number of clients in real-time, as it provides an easily deployable migration layer that either proxies data to existing systems or collects and reformats data for different uses \u2013 this is why Node.js works great as a bridging technology for existing systems.<\/p>\n<p><a href=\"https:\/\/www.roweb.ro\/blog\/wp-content\/uploads\/2015\/07\/node2.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-606\" src=\"https:\/\/www.roweb.ro\/blog\/wp-content\/uploads\/2015\/07\/node2.png\" alt=\"node2\" width=\"600\" height=\"328\" srcset=\"https:\/\/www.roweb.ro\/blog\/wp-content\/uploads\/2015\/07\/node2.png 600w, https:\/\/www.roweb.ro\/blog\/wp-content\/uploads\/2015\/07\/node2-300x164.png 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p><em>Node.js as bridging technology \u2013 image source: <\/em><em><a href=\"https:\/\/apmblog.dynatrace.com\/2015\/04\/09\/node-js-is-hitting-the-big-time-in-enterprise-markets\/\">https:\/\/apmblog.dynatrace.com\/2015\/04\/09\/node-js-is-hitting-the-big-time-in-enterprise-markets\/<\/a>&nbsp;<\/em><\/p>\n<p>3.<strong> Single page applications <\/strong>\u2013 because Node.js enables the processing of many requests \/ second with low response time and because of the fast synchronization between client and server, it works really well for web apps that do a lot of processing on the client, like AJAX heavy single page applications.<\/p>\n<p>4.<strong> Command line utilities &#8211; <\/strong>js\u2019 ability to spawn thousands of child processes and treat their outputs as a stream makes it a great choice for writing command line scripts and running shell commands to UNIX tools.<\/p>\n<p>5.<strong> Programming hardware \u2013<\/strong> there are several reasons why Node.js works well for embedded devices and robotics: it\u2019s event driven, standardized and it supports IoT-specific communication systems, like MQTT, which is designed for fast status updates from small devices. It has a high productivity and by using JavaScript, it allows developers to implement many features in a short time, to build a prototype rapidly, get feedback from users and iterate. The IoT community has already embraced Node.js for, with notable examples including Nodebots and Cylon.<\/p>\n<p>These are just a few examples of how Node\u2019s capabilities can be best put to work.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Node.js is a platform built on Chrome&#8217;s JavaScript runtime that untangles concurrency by replacing the Java platform&#8217;s standard, multi-threaded approach with single-threaded, event-driven I\/O. Node.js is a divisive topic in the programming world: it would seem that for each enthusiastic supporter praising its advantages, there is a vocal counterpart highlighting its shortcomings, or at least [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[174],"tags":[62],"acf":[],"_links":{"self":[{"href":"https:\/\/www.roweb.ro\/blog\/wp-json\/wp\/v2\/posts\/569"}],"collection":[{"href":"https:\/\/www.roweb.ro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.roweb.ro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.roweb.ro\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.roweb.ro\/blog\/wp-json\/wp\/v2\/comments?post=569"}],"version-history":[{"count":10,"href":"https:\/\/www.roweb.ro\/blog\/wp-json\/wp\/v2\/posts\/569\/revisions"}],"predecessor-version":[{"id":6102,"href":"https:\/\/www.roweb.ro\/blog\/wp-json\/wp\/v2\/posts\/569\/revisions\/6102"}],"wp:attachment":[{"href":"https:\/\/www.roweb.ro\/blog\/wp-json\/wp\/v2\/media?parent=569"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.roweb.ro\/blog\/wp-json\/wp\/v2\/categories?post=569"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.roweb.ro\/blog\/wp-json\/wp\/v2\/tags?post=569"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}