So what is Node.js?
Unlike our PHP, Ruby and Python, which are all programming languages supported by our shared hosting platform, Node.js is not a programming language.
With Node.js, websockets are used, which is a protocal that allows two-way communications between the server and the user in real time. The websocket is bidirectional, meaning that communications between user and server are interactive and two way, the client side does not need to continuously poll the server to see if it has an update - the server simply sends it whenever it is appropriate.
It is this two way communications which makes Node.js so useful for many of the modern applications we use today which are all about instant, realtime sharing of data. Online chat tools or messaging apps, social media, SaaS products, gaming, APIs, dara streaming, file uploads, interactive dashboards - anything that might need to proactively update the user with realtime changes in what is presented to them.
Node.js is hugely scalableOne of the major benefits of Node.js is scalability. If you're a startup developing an app that you believe will scale, Node is a great choice as scalability is baked into it at the core. In a traditional PHP backend, each time a user communicates with the backend, a new connection is opened which will spawn a new thread on the server, eating up the servers resources, such as RAM. Node operates on a single thread, using non-blocking I/O calls, and on average you may be able to support around 250 times the number of concurrent users compared to a PHP based backend with the same physical resources. If you don't need to support that many users, this also means that you could scale down, and lower your hosting costs.
npm: The Node.js Package ManagerNo article on Node would be complete without mentioning npm, the package manager that comes with every Node.js installation. Similar to Ruby Gems or the Python Package Index (PyPI), npm allows you to speed up your development time by leveraging thousands of publically available components.
There are hundreds of thousands of packages that do all kinds of things, allowing you to connect to 3rd party ecosystems, automate common tasks and much more, without having to develop that functionality from the ground up yourself.
This makes using Node a no brainer if you want to take your product to market quickly, as it will allow you to significantly speed up your development time, and reduce the cost.
As ever, our team will be available to provide every assistance should you get stuck!