PayPal Finds Node.js Secret To Successful Makeover - InformationWeek

InformationWeek is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them.Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

PayPal Finds Node.js Secret To Successful Makeover
Newest First  |  Oldest First  |  Threaded View
User Rank: Ninja
3/17/2014 | 11:03:16 PM
Is it really an advantage?
From the article:

"Whereas a Java process would suspend further operations until a database query had been answered, Node.js's non-blocking system continues to execute commands and get work done while the query is going on."

Java code is almost always executed in a web application container like JBoss, Tomcat, Weblogic or WebSphere.  Those servers have thread pools that service a configurable number of concurrent HTTP requests (based on the number of cores in your server, each core's speed and total server memory).  They also have connection pools that allow for a configurable number of concurrent DB operations (depending on the strength and type of queries issued to the DB server).

I understand the Node.js asynchronous architecture.  It uses callbacks when work is finished and that Javascript closures make this seemingly easy to code (depends on whether or not the developers are used to closures).  However, somewhere there's still a limit to throughput based on the number of concurrent asynchronous operations permitted and backed by the number of concurrent DB requests permitted (some kind of connection cache).  It cannot be a free-for-all.

When analyzed on a deeper level, this statement seems to be a six to one, half dozen to another subjective call.  Both environments allow more than one thing to happen at a time but they achieve it through different architectures.  I fail to see how or why an asynchronous callback that must end up processing the work via a pool of synchronous threads, is any more efficient than having an up-front thread pool of synchronous threads.

I also fail so see why one architecture would be more efficient than the other.  In fact, the asynchronous programming model looks hideous and even the article mentioned it's a pain to debug.  The up-front thread pool model where each thread blocks on synchronous, relatively long-running requests seems more straightforward to program and for the life of me, I'm not sure why anyone would hail the asynchronous architecture as an advantage.

That said, I cannot disagree that it would be absolutely fabulous to change code and see instant results.  When I first started writing web pages in 1996 with Microsoft's Active Server Pages, it had a fast-turn-around programming model.  While still a shock to those familiar with stateful, event-driven fat-client GUIs (but like a warm blanket to those used to CICS), there were no long build times and changes were instant.  Save the file, hit the site.  However, the larger an ASP application became, the more disgusting and impossible it was to maintain.  There were no internationalization features or built-in support to organize code.  Server-side includes would only go so far.  While Javascript is much nicer than VBScript (it was really limited), it would seem Node.js would also run into similar problems.

While developers can make a mess with anything, it seems Node.js is returning to where the web began and we evolved from that to more complex architectures.  Maybe we went too far (I often think that) but what does Node.js offer that makes it a "back to the future" alternative?

Charlie Babcock
Charlie Babcock,
User Rank: Author
3/17/2014 | 1:33:50 PM
A line from his first review?
I didn't get a chance to ask. Bill Scott once had a consulting company, LooksGoodWorksWell. And his blog still appears under that name. Is this a line from his first review as a programmer? You can see the irony, if it is.

2020 State of DevOps Report
2020 State of DevOps Report
Download this report today to learn more about the key tools and technologies being utilized, and how organizations deal with the cultural and process changes that DevOps brings. The report also examines the barriers organizations face, as well as the rewards from DevOps including faster application delivery, higher quality products, and quicker recovery from errors in production.
The State of Chatbots: Pandemic Edition
Jessica Davis, Senior Editor, Enterprise Apps,  9/10/2020
Deloitte on Cloud, the Edge, and Enterprise Expectations
Joao-Pierre S. Ruth, Senior Writer,  9/14/2020
Data Science: How the Pandemic Has Affected 10 Popular Jobs
Cynthia Harvey, Freelance Journalist, InformationWeek,  9/9/2020
Register for InformationWeek Newsletters
Current Issue
IT Automation Transforms Network Management
In this special report we will examine the layers of automation and orchestration in IT operations, and how they can provide high availability and greater scale for modern applications and business demands.
White Papers
Twitter Feed
Sponsored Live Streaming Video
Everything You've Been Told About Mobility Is Wrong
Attend this video symposium with Sean Wisdom, Global Director of Mobility Solutions, and learn about how you can harness powerful new products to mobilize your business potential.
Sponsored Video
Flash Poll