The Year Ahead: Node.js and all the Internet Things
Node.js originally got its foothold for web applications and is quickly becoming an alternative for at least some enterprise jobs that would have previous been executed on .Net or Enterprise Java. But at the Node Interactive conference in Portland earlier this month, we discovered developers putting Node to work on another job: Building applications for the emerging Internet of Things (IoT).
You’re probably familiar with IoT, and perhaps are even tired of the phrase. But, with the falling costs of processors and ubiquitous Internet, IoT will be all but inevitable. Analyst firm IDC has predicted that the world will spend $1.7 trillion on all the Internet things by 2020.
At Node Interactive, Andrew Chalkley, a teacher at the Treehouse online education site, talked about how Node could already be used on many low-powered hobbyist devices. These home projects will be the prototypes of IoT devices that will be industrialized and commercialized in the years to come:
Then there are the embedded devices, which are pretty much like full Linux servers, and can offer complete support for running Node. Here, we are talking about the Tessel 2, the Raspberry Pi. “You can install anything on them, including full Node,” Chalkley said. They are, in essence, actual “Internet things.”
For those who have been around for awhile, IoT sounds suspiciously like what used to be called embedded computing, with, perhaps, some additional the additional back-end data crunching for operational inefficiencies and customer insights. Due to the initial processing and memory constraints of these microcontrollers, embedded developers tended to favor low-level, close-to-the-metal languages such as C.
“These young adults are coming into the market, they will innovate and create new use models, and new applications. They be will coming in right an interesting point in regards to IoT,” Evers-Hood said.
Ryan Dahl created Node.js, itself written in C, to solve the issue of I/O blocking in Web applications, releasing the software in 2009. I/O blocking happens when a web page requests something from a database or disk, causing all subsequent operations to halt, at least momentarily, until a response arrives. Node.js uses a single event-loop thread to handle multiple chores. Instead of waiting for a response, Node can assign a callback to each function, so the event loop can continue on to the next task and loop back around to the function response when it does arrive. As a result, it is fast, and can scale.
As a Web technology, Node also offers a consistent set of APIs, which will be helpful in addressing the wide range of platforms IoT will run on.
“You get a consistency in the ability to deploy,” Evers-Hood said. “Core development assets can be readily transferable across platforms, to development platforms, because those APIs are consistent across the OS, you have a lot more flexible in regards to the code you develop.”
“The features that were selected and the how they were put together are astonishingly good,” Crockford said. “It’s a language of amazing expressive power.”
Intel is a sponsor of The New Stack.
Feature Image: “Archbishop Gauthier Cornut of Sens Displaying the Crown of Thorns,” 13th century stained glass art at the Cloisters museum in New York City.