28/03/2017 | Written by: Frank van der Wal
Categorized: CTO's Shack | Generic
Share this post:
Last week the IBM InterConnect event took place in Las Fake-as. Terrible place, but good for holding this kind of large events. Approximately 20.000 people attended. 100s and 100s of sessions and it took me quite some time to find my way around the Mandalay Bay Conference Centre that could easily have given shelter for the whole of my home town. The most frustrating part of these events is that you miss so much compared to the sessions you can attend. But it left me with more than enough inspiration to write blogs about it.
Of course, being IBM’s Cloud-like event, there were many sessions on the topic. Cognitive, was all over the place as well, Security, Internet of Things, you can come up with the usual suspects. Still I would like to dedicate this blog-entry to Node.js.
Node-what? Node.js (to be pronounced as node – jee – es)
Let me step back some decades here, when computer programs had to be written from scratch, meaning that the poor programmer needed to write a lot of code around the actual functionality of the program. If a file needed to be accessed, the whole code around it – including error handling – had to be considered. The same for opening a database, opening and maintaining connections, the works. The result was a file that could be executed with all the functionality in it. The non-functional handling of connections and errors etc. is a pain in the neck, and every time a new program or functionality was needed, the programmer needed to take care of it all.
Along came application servers, like IBM’s WebSphere. An environment that could take care of all the non-functional requirements. The programmer just needed to concentrate on the functionality and could land his program onto the application server. WebSphere has an enormous number of built-in functionalities which are needed in today’s demanding IT and, over time, it has become a bulky environment capable of driving business critical applications for enterprises around the globe.
While there is a fundamental need for those types of application servers, in 2009 a guy called Ryan Dhal started a project called Node.js. Now, 7 years later it has become the fastest growing application server-like environment.
The core of Node.js is an event-driven asynchronous non-blocking I/O programming environment!
So that you know!
What, for crying out loud, does that mean? Well, non-blocking I/O means that whatever you run in Node.js it handles tasks pretty effectively. In traditional environments, when a task comes in, it will be handled and all other tasks need to wait for the first one to complete. It’s like waiting in one single long queue, with one person holding up all the rest.
The non-blocking I/O concept of Node.js is that tasks that might take a while are ‘set aside’ so that other tasks can continue. Once the bulky task has ended it signals Node.js and the results are given. An example might be a big query into a large database. The response might take 1 minute or so, a lifetime in the processor’s fast way of working, and even for end-users. In traditional programming, all other things need to wait that minute to continue. In Node.js it would mean that the query will be fired of, and, while waiting for the results, other statements of the program will continue.
Node.js is open source and, like always, it is the community that drives the development. Programmers all over the world contribute to node.js by means of creating functionalities called modules that anyone can use in their projects. More than 300 thousand (!) modules have been developed over the years by far more than any other community or programming language out there. It means than if you want to develop an application, 10 to 1 that the basic functionality has already a module for it. The trick is to find that module. Well, there is a node.js module for that as well…
All well, but enterprises are, very rightfully so, a bit afraid of open source in their core. They want support, they want roadmaps, they want continuity… IBM is contributing to the Node.js community to do those things as well. We are one of the 8 platinum members, alongside 19 silver members and the thousands of individuals out there. At first the community was a bit afraid that Big Blue would take over, but that’s not our intention at all. Within IBM we developed a Node.js Software Development Kit (SDK) and provided support on our BlueMix Cloud platform as well as on IBM’s Power and even the mainframe (in public beta at this moment). If a client wants to work with Node.js and there is a need for support on those supported platforms, we can provide that it.
Node.js will not replace the current application servers out there for it has its drawbacks in delivering high-throughput and deep calculations, but it is extremely well suited for data-updates with thousands of concurrent connections. In getting a cloud-based Internet of Things and web servers up and running in no time, it’s great.
With the support of IBM, amongst others, Node.js will be an interesting application server for the years to come!