Future proof integration with Node-RED
Kjetil Mjøs - Technology
13 May, 2022 - 5 min read
Gapit Nordics has been dealing with industrial integrations since 2016. Our collection of standardized software integrations has grown to over 200 at the time of writing.
To leverage modern software tools, we developed these integrations as docker containers. At the end of 2021, we gradually decided to build our integrations around Node-RED instead of building our containers.
With a proven production code with a long track record, it was not an easy decision to make. This article will highlight how and why we came to the solution about doing the switch.
What is Node-RED
Node-RED is an open-source, highly customizable, flow-based integration engine with a large ecosystem of community-based plugins. Configuring flows is done in the browser. This architecture also makes it ideal for running on a server without a screen. Flow configuration can be exported and imported in a JSON format, making it easy to move. Node-RED has been around since 2013 and started as a side project from Nick O'Leary and Dave Conway-Jones, both working at IBM. In 2019 it was taken under the wing of the OpenJS foundation, ensuring project stability.
Why switch to Node-RED
We in Gapit Nordics believe that Node-RED is the integration tool for the future. It is perfect for modern integrations where you need to collect data from various APIs and industrial equipment data.
Node-RED is an advanced tool but has the benefit of visual flows for programming. Visual flows make it easier for people with industrial experience in automation software to start coding without a background in computer science. This is also why we are seeing more and more automation companies like Wago and Schneider Electric embracing Node-RED and embedding it into their controllers. There is even a rise of new automation companies like Revolution Pi that use Node-RED combined with a Raspberry pi to develop a new type of IO controller. Node-RED might be the tool that can replace the old ladder logic language of the automation world.
Our customers have asked several times if they can go in and do small changes in integrations. Gapit Nordics’ custom-made integrations are simple to customise for coders, but for people not familiar with modern coding, it can be hard work with YAML and other languages for customizations. On the other hand, Node-RED is simple to use, and all our customers have to do is log in to a web page, do the modifications, and hit deploy.
As time goes by, more and more people will see the benefit and start using Node-RED. Companies using their old custom-made legacy integration will fall behind and lose customers. Gapit Nordics is fully convinced that an integration tool like Node-RED is the future. And the benefit of us switching now is that we gain years of experience with Node-RED before our competitors. Meaning we can deliver services to our customers demanding integrations done in the open tool Node-RED.
Limitations with Node-RED
Node-RED might sound like the perfect tool, but there are some limitations that we have to address.
First of all, it's not time-deterministic. If you read data every second, you cannot be 100% certain data is read every second. It is not a problem when reading data, but it is a problem for controlling systems. Say you want to control a process, and you need to open and close a valve precisely every 2 seconds for the process to be stable. That is a type of application where you should not use Node-RED. This type of application is better suited for a dedicated control system or a real-time Linux kernel.
Node.js, which Node-RED is built on, is an excellent language for asynchronous communication, meaning it can run different code while it waits for the request. It continues on the other code and goes back to execute the rest of the code needed when a response is received. It's a great way to increase speed, but it's still single-threaded. For instance, each container can run in separate threads when running docker containers, giving parallel workloads and increased speed. Multi-threading is not a real issue before you start with large workloads. But it is still an issue to consider when designing your system.
How we help Node-RED succeed
When betting on Node-RED as the future integration platform, we need to do anything to make the Node-RED platform exceed. Spreading the word and letting people know about Node-RED is one of the things we can do to increase adoption.
Another area we in Gapit Nordics are working on is developing high-quality code for industrial integrations. One of Node-RED's goals in the future is to increase commercial adoption. And having robust community code for industrial integrations is key to making this work. Industrial applications need reliable systems and software that works year after year.
Logging issues, raising feature requests, and helping answer community questions are something all open source projects are interested in. We try to do this as much as possible in Gapit Nordics to help Node-RED be the best possible platform for integrations.
We are betting on Node-RED because it is the tool our customers deserve.