How Node.js Revolutionized the Retail Space
How Node.js Revolutionized the Retail Space
In this article, I share the basics of Node.js, and discuss why some are using it to reduce page load times and improve server efficiency.
Join the DZone community and get the full member experience.Join For Free
Sensu is an open source monitoring event pipeline. Try it today.
In a crowded world of popular computer languages, platforms and ecosystems, Node.js is one of the hottest. According to w3techs.com, Node.js usage has gone up 241 percent in the last year alone. Retailers have taken notice and are implementing it on many levels. I am going to share the basics of Node.js, and discuss why retailers are using it to reduce page load times and improve server efficiency. I’ll talk about similar developments such as Docker and microservices, and look at several companies implementing these technologies. I’ll also discuss how mobile computing is changing buyer behavior and expectations.
I believe one of the main reasons retail stores and related businesses are embracing Node.js is due to its ability to build data-intensive apps that can run in real time across a spectrum of distributed devices. Also, its performance is much faster for high-traffic applications than other traditional languages, such as Java. As consumers continue to shop more from their mobile devices, these factors are increasingly important. Bob Sherwin, a senior marketing director at Wayfair LLC, told Internet Retailer magazine that only a year ago customers would research products on their handset, but make the actual purchase from their desktop computer or tablet. Now they are comfortable making purchases right from their smartphone, increasing the need for stronger support from the web APIs these devices interface with.
Mobile Sales Growing Fast
These changes in buying behavior on mobile devices are leading retailers to re-evaluate their approach to mobile marketing. Mobile sales are growing fast — Goldman Sachs estimates that worldwide commerce sales on mobile devices will reach $415 billion in 2016, rising to $626 billion in 2018. Experts expect mobile sales to continue growing at a furious pace because they are currently expanding at twice the rate of e-commerce sales. However, these numbers only reflect actual purchases. When research and browsing time is factored in, mobile’s role in retail sales takes on even greater impact.
Node.js On the Rise
Node.js strengths in retail include:
- The ability to handle many connections at the same time, which reduces operating costs.
- Hundreds of thousands of modules currently available in the official Node.js package manager, which makes it easy for developers to build apps quickly rather than starting from scratch each time.
- Its ability to use resources on the server as they are needed, reducing its footprint considerably.
- Its efficiency and the way it increases productivity gains. Node.js is a natural for agile development as it only needs one-third to one-half the lines of code to complete a job.
- The fact that it allows developers to test different options quickly. When Netflix was trying to figure out the best way to let Sony Playstation 3 users download movies, they came up with four different interfaces for testing. The interface that won was not even a favorite of the programming team.
Retailers and related companies using Node.js include:
- LinkedIn. LinkedIn was an early Node.js evangelist. They abandoned Ruby on Rails for Node.js back in 2011. Today, the entire stack is driven by Node.js. Speeds improved up to 20 times, and server count was reduced from 30 to three.
- Uber. Uber completely changed their web layer to Node.js to improve efficiency and create a better experience for customers and partners. Node.js replaced a LAMP stack with PHP and MySQL. PHP did not scale well and produced unacceptable bugs — there were errors like double-dispatching which sent two cars to one customer. They decided to separate the business logic from the dispatch system that operated in real time. Node.js was selected to bring the system up to date and be able to handle more connections efficiently.
- Groupon. Groupon was another high profile e-commerce company who left Ruby on Rails behind for Node.js. Was it worth it? They noticed page load times improved 50 percent and are now able to develop new features quicker.
Supplementing Node.js to Node.js
Node.js is just one of several rapidly developing technologies that retailers are using. Docker, microservices, and agile development are also high on the list for retail and e-commerce companies.
- Docker. Docker is an open-source project that packages an app and its dependencies in a container.
- Microservices. Microservices is a process of building a large app as a system of small, modular services. Each microservice has a business purpose and uses simple methods to communicate with other services.
- Agile Development. Developing software through cross-functional teams using continuous improvement and rapid planning and implementation.
For example, here are examples of retailers and sales-oriented companies who have used these technologies.
- Shopify. Shopify implemented Docker to make their data centers more adaptable and easier to maintain. Shopify primarily relied on Ruby on Rails to handle thousands of requests per second spread over 1,700 cores. However, as Docker’s popularity began to expand, Shopify considered it for several benefits, including scaling up several servers quickly to handle traffic surges, using spare capacity in server farms for heavy-duty operations, and the ability for several containers to do different work on the same hardware with no interference.
- Salesforce. Agile development is not new, but more companies are in the process of improving their agile methods. Twitter and Salesforce are two high-profile companies that rely on agile development for shorter cycle times, reduced bottlenecks and increased productivity. The key is self-organized teams with dedicated resources who can continually iterate their approach. They work under principles such as minimal work-in-progress and continuously releasable products that rely on automation to help keep everything lean.
Node.js shines, since it can be rapidly reconfigured and will adapt quickly to high-demand environments. Just as they have with other newer architecture design-patterns, like Docker and microservices, I soon expect to see more retailers using Node.js. We are now living in a high-traffic world, so retailers that can meet customer needs quickly and efficiently will garner more sales and profits in the process.
Published at DZone with permission of Omed Habib , DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.