No doubt you have heard of Javascript, a dominant client-side programming language running in browsers and is used by 97.8% of all websites.
Are you wondering where the remaining 2.2% went? Unfortunately, I am also wondering! :) đ
Jump to sections
The background
The Internet is a cobweb of different technologies cobbled together with duct tape, string and chewing gum. It's not elegantly designed in any way, because it's more of a growing organism than it is a machine constructed with intent.
The internet has grown popular majorly because it is a spread of information, and it's a way for us to communicate with people who are even thousands of miles away from us.
Slowly and gradually, Javascript as the only client-side programming language inside of the browsers, has benefited from the growth in popularity of the internet. Today Javascript has become a language that will be difficult to try to replace in its domain. Perhaps, Javascript will be replaced sooner or later when pigs flyđ .
For a while, Javascript has been living inside of browsers only. For this reason, It has only been able to carry out client-side operations only. Until 2009, Ryan Dahl, the creator of Nodejs, steered Nodejs into existence. Unlocking the powers of Javascript that were confined inside of Browser environments, unleashing it to also power the backend of applications.
Nodejs has grown steadily onwards in its adoption and use. Learning Nodejs is well worth your time spent; regarding with how it is becoming a hot topic today(as of 2022).
Its swankiness can be seen: đ
Key NodeJs stats
- JavaScript is the most popular language in the world. See for yourself
- Amazon, Netflix, LinkedIn, eBay, Walmart, Reddit, Uber, Trello, PayPal, ... are very productive building applications with Node JS. These are only the big names. God knows how many startups and small scale businesses are using it too.
- It has the largest repository of libraries (npm).
- It is very performant and does real-time applications very well and seamlessly.
- Well, sorry, but it is FAST! Let alone bun js. Tellingly, PayPal saw a 35% decrease in average response time on its page after deploying Node JS.
- You only need to master one language for frontend and backend.
NodeJs in a (tiny) nutshell
According to Nodejs Website
Node.jsÂź is a JavaScript runtime built on Chrome's V8
JavaScript engine.
Node.js runs the V8 JavaScript engine, the core of Google Chrome, outside of the browser. This allows Node.js to be very performant. I hope you have heard of the perfomant Chrome v8 engine
You may gravitate towards thinking that Nodejs was primarily built for running Javascript on the backend. But Nodejs was created with a major intention of handling multiple requests at once, which was difficult at the time before Nodejs. And the idea that inspired Ryan Dahl about this can be read here.
A Node.js app runs in a single process, without creating a new thread for every request.
NodeJs milestones
Well, without further ado, let's try to quantify how huge NodeJs is, with a bias in it's impact. And therefore your time learning it will be a time well spent.
- Netflix saw a 70% reduction in startup time on it's User Interface. (source: Netflix blog) Startup times could take as long as 40 minutes. Moving to Nodejs, from a 40 minutes+ startup time they went to under a minute.
- Nasa improved database access time with Nodejs. (source: Nasa nodejs case study) 300% improvement in the time needed to access the database, allowing users to get desired data sets in seconds and not hours
- Paypal improved web application high availability and performance. (source: Paypal blog) Paypal got a foot ahead in ensuring 100% Business Availability, even with Huge traffic since the Node.js application was handling twice the number of requests per second. PayPal pages started loading 35% faster, with a decrease in response time.
- Twitter built Twitter Lite with a reduced average load times by over 30%. (source: Twitter blog)
- Javascript is the most popular technology. (source: Stackoverflow survey 2022) Nodejs is a runtime for Javascript. Javascript popularity is a direct relation it is one of the most sought-after skill in the tech industry. So you cannot go wrong learning it.
- NodeJs is used by at least 30 million websites. (source: w3tech) According to w3tech:
- Nodejs trumped the million boundary with its first Billion Downloads back in 2018. (source: nodejs Medium) Backtracking to when the announcement was made, it was closer to 1.2 billion. Today, Node is easily around 1.4 billion with a rough estimation.
- From 57,654 responses, 16.12% of developers want to learn Nodejs. (source: Stackoverflow 2022 survey)
- Users are very upbeat and excited about Node.js; using words like âfastâ âeasyâ âawesomeâ âsimpleâ âpowerfulâ and âfunâ to describe Node.js. (source: 2018 Node.js User Survey Report) Users of NodeJs love using the technology.
- NodeJs has an overall positive impact for bussinesses. (source: 2018 Node.js User Survey Report) Small and Medium Enterprises to large Enterprises speak of the positive impact of using nodejs, majorly through increased developer productivity and satisfaction.
- Less Time to Market. Npm hosts over 1,000,000 open source packages you can freely use. With the large number of ready to use libraries, development time is greatly reduced.
- Node js is a great solution for handling high traffic websites. (source: nodejs) NodeJs is the best way to handle websites with high traffic without sacrificing performance or accuracy.
- Single Programming Language for front-end and back-end With front-end applications developed with JavaScript, you donât need to pick up a different language when using Node.js for the backend.
- Total control over memory usage and scaling capabilities. NodeJs doesnât use any sort of virtual machine. This means that NodeJs doesnât have to utilize any memory for processes giving developers the freedom to use as much of a systemâs resources without worrying about consuming RAM. Also NodeJs doesnât allocate resources for itself, leaving developers with total control over what resources their applications use.
- Building real-time applications. When you post on twitter or place an order on Amazon or send a WhatsApp message, that is a real-time application. NodeJs graces at creating real-time applications without requiring additional plugins or libraries.
- NodeJs is great for Internet of Things.
- NodeJs is great for creating real-time chat servers.
- Building streaming apps.
- NodeJs offers Easy Scalability.
- NodeJs is unopinionated
- You are not stuck with backend development
- Seamless JSON support
Why big brands are using NodeJs
Over the last 3 months weâve reduced average load times by over 30% and 99th percentile time-to-interactive latency by over 25%
Impact and market stats
Node.js is used by 2.0% of all the websites whose web server we know.Computing % ratio of the entire internet, this means NodeJs powers at least 30 million sites, if not more.
Where Nodejs shines
IoT (Internet of Things) are electronic objects; with sensors, processing ability, software, and other technologies that connect and exchange data with other devices and systems over the Internet.
IoT may consist of thousands of such devices, that sent data/requests rapidly to the servers. NodeJs can handle multiple requests deftly without sacrificing performance.
NodeJs makes it easy to use WebSockets, which provide low latency, full-duplex communications channels over a single TCP connection.
The backend tech is the support system for an efficient front-end performance.
With streaming, certain parts of the application needed for bootstrapping are downloaded. The remainder can be downloaded in the background if necessary. When the application is completely downloaded, it can function without any network connection at all.
NodeJs is an excellent player in the development of streaming applications having a native Stream API.
NodeJs scales better than most other typical platforms because of it's event-based model.
To explain how NodeJs scales: A NodeJs application will start and wait for requests. For each request to the db, NodeJs will fire that request, and then go back to sleep while it waits for results or if there are other tasks, it will go on and process them and only when the DB comes back, it will restore the original request. With increased requests, there is less overhead to handle requests since it avoids spinning up threads for each request.
So in typical use case, an average developer will make more scalable server with Node.js, simply because Node.js doesn't do anything at all 95% of the time.
Unopinionated means there is no right way to do things. By contrast opinionated means you are guided/forced into a specific way to do something. NodeJs Gives you freedom to start building everything from scratch.
Youâre not constrained to building back-end applications when youâre using Node.js. It can be coupled with frameworks like Electron and NW.js, which enable you to build cross-platform Desktop applications.
NodeJs is very fast in parsing through and manipulating JSON retrieved from external web API sources like MongoDB, reducing time needed per request. Apache modules, like PHP, may need more time, because they cannot efficiently parse and manipulate JSON because they need marshalling to process the data.
Summary
Node.js has opened up endless possibilities for server-side development using Javascript. The flexibility and rich ecosystem of the Node.js environment means that it will continue to thrive and attract more developers in the near future.
Do consider building with Node.js if you prioritize performance and scalability for your applications.
Did I leave something out? Drop it in the comments.
Thanks for reading. Connect with me on twitter Peaceâïž.
Top comments (4)
You can achieve the same performance as Bun.serve in Node.js using uWebSockets.js
I am yet to check out BunJs in detail. Is uWebSocket.js a module created by Bun team to replicate the performance speeds on Nodejs as a whole? Or is it only for crating real-time applications in Nodejs
No uWebSockets.js is the nodejs implementation of uWebSockets
github.com/uNetworking
Okay thanks, I will check it out. It seems interesting