DEV Community

Pooja Mistry
Pooja Mistry

Posted on • Updated on

Why you should be using Node-RED right now!

This month I have spent most of my time exploring, learning and teaching Node- RED, and I have come to the conclusion that this awesome technology is one that you should be using right now!

Let me explain. Have you ever wanted to rapidly prototype something, whether that be a building an IoT device, a web service, or a larger proof of concept for your enterprise clients? Have you ever found yourself in an endless google search on how to get started or trying to figure out where your project will run? Well, with Node-RED you can start building, prototyping, and sharing within minutes.

Designed and built by IBM, Node-RED is a free open source logic engine that allows programmers of any level to interconnect IoT, cloud-based systems, webservices, databases, API’s and more! Here are 3 reasons why it is so awesome to use!

1. Node-RED’s power lies in its ease of use.

Using Node-RED is as simple as wiring graphical nodes together and deploying to see the desired out comes. It uses a visual web interface, where blocks –called nodes – can receive and send messages to other nodes. This makes the whole integration process easier by abstracting a lot of repetitive and boilerplate code needed to make these simple things.

Anyone with logic or programming background can easily start working with Node-RED. There are countless nodes in the node pallet that can help you build something worthwhile. These nodes allow you to inject your own data or data from other sources (i.e. social media, IoT devices, APIs and databases). You can also use function nodes to write your own logic as well as build your own web services user interface.

Here’s an example with a simple Hello World:

In this example, an inject node is used to send a message object manually to a function node, in this case “Hello World” and the function node replaces the msg.payload “World” with “Everyone, I hope you enjoy Node Red” . Then, it passes the message forward to a debug node, which prints it on the debug tab.

This simple flow can be incredibly powerful because when you are able to build out a hello world application, you can easily build something much more intricate without having to learn how to use several APIs and libraries. All it takes is being able to drag, drop, wire, and deploy and you’re ready to go!

2.Node-RED allows developers to prototype, test, build and rebuild within minutes
The countless examples and nodes available on Node-RED make it easy for developers to test out their ideas in minutes.

Let’s say you want to build an application that tells you whether a tweet is positive or is negative.

You can easily hook up a twitter input node and output tweets into your debug panel like so:

Now, once you have the input of tweets you want to hook up sentiment analysis , since this will give you the sentiment of the tweet and whether it represented positively or negatively.

In this example we have hooked up inject nodes to test the sentiment analysis service with static messages to represent influx of tweets. We can easily add tests to our flows to ensure that our services are working the way we want them to.

Now let’s say that we are happy with the way this flow is working however it would be awesome to represent the data in a dashboard / UI. There are nodes for this!


In this example we went from having an idea of getting tweets as inputs to building out a UI dashboard that shows the sentiment score or positive or negative tweets. Compared to the time and energy it would take to write your own tweet input, a sentiment algorithm, and a robust user interface, we can easily hook up the necessary nodes and get a working prototype in significantly less time.

Of course, this flow will not be the end-all-be-all, but it will show you how these services work together. If you decide to go with a prototype for more production-level work, your flow in Node-RED will provide you with a dependable road map. In many cases Node-RED also has you covered from prototype to production when building a single new function, a collection of functionalities, or an entire application from browser to database.

The ability to tweak, adjust, build and rebuild on the fly is Node-RED’s greatest feature. Get ready to start impressing those around you with robust prototypes that can be turned into production quality applications in less time than you think!

3.Node-RED is incredibly flexible and is built on dependable technology

Node-RED is built on top of one of the most dependable and ubiquitous technology stacks out there – JavaScript. This makes it highly flexible and easy to work with on web browser, server side, IoT projects and more.

Since you will be working in this space , there is incredible support from npm for Node-RED and there are over 3000 ready made nodes to get you started building whatever you want.

And if you don’t find a component that fits your needs from the thousands that are freely available, you can write your own.

You can run Node-RED as an IBM cloud service and easily have a connection to cloudant data base and IBM Watson services or you can install Node-RED locally. You can also install Node-RED in docker. It is highly flexible and easy to run and get started with, so the sky is the limit.

There you have it! Node-RED is incredibly powerful and useful for anyone who wants to take their ideas from concept to creation! It’s easy to use, its ideal for prototyping, and it is incredibly dependable. So, what are you waiting for, start building with Node-Red now!

I hope this blog helps you as you begin your next prototyping journey! Check out my Twitter Analysis workshop to get hands on how to on building twitter analyzers with Node-RED.

Give me a follow if you like this post or follow me on Twitter @poojamakes

Latest comments (1)

Collapse
 
pappu_kumar_pashi profile image
Pappu Kumar Pashi

Thank you, mam, for this amazing information