Skip to main content

FairCom Edge Node-RED concepts

Node-RED is an open-source solution for building low-code, event-driven applications. It is designed to wire together hardware devices, APIs, and online services. It is low-code because it provides a graphical user interface for building flows.


Because Node-RED is built around JavaScript and JSON, it is easy to create flows that interact with the FairCom JSON APIs. There is no need for drivers or custom-built Node-RED nodes; instead, the http request node is used to post JSON to the FairCom server, and the Request Result node is used to read the results.

Node-RED and FairCom Edge complete each other

Node-RED is ideal for creating and managing flows using a graphical interface. It can collect data, apply conditional logic to process it, and deliver it to supported protocols, such as MQTT.

Node-RED does not include a database for persisting and querying data. This prevents Node-RED from being used in mission-critical environments that need a queryable log of events. It also prevents Node-RED from processing historical data, such as running machine learning on historical data or looking up historical data to control flows. Historical data is also required for calculating, storing, and tracking overall equipment efficiency (OEE).

Ideal database for Node-RED

FairCom Edge contains an embedded database optimized for Node-RED to persist and query data without drivers or custom-built Node-RED nodes. Node-RED uses the FairCom JSON APIs to manage tables, indexes, and accounts. It can insert, update, delete, and query data records. It can also manage MQTT topics, inputs, outputs, transforms, and connections to other MQTT brokers.

FairCom Edge can deliver Node-RED data to protocols that Node-RED cannot support, such as SQL, ODBC, and JDBC. This allows Node-RED flows to integrate directly with data warehouses, data lakes, and machine learning systems.

The FairCom JSON DB API enables Node-RED to manage FairCom database objects, such as accounts, tables, indexes, and records. It is easy to use Node-RED to insert, update, delete, and query data.

Ideal MQTT broker for Node-RED

Node-RED does not provide an MQTT broker for delivering MQTT messages.

FairCom Edge contains a mission-critical MQTT broker. It is ideal for Node-RED because Node-RED can use the FairCom JSON APIs to manage MQTT topics, inputs, outputs, transforms, and connections to other MQTT brokers.

Because Node-RED and FairCom Edge use MQTT, they can easily interact with each other by publishing messages to MQTT topics and subscribing to those topics.

The FairCom Edge embedded MQTT broker fully integrates with its embedded database. FairCom Edge automatically stores all MQTT messages in its embedded database and automatically delivers inserted records to MQTT Topics. This is ideal for Node-RED because Node-RED can query all MQTT messages that it processes. This gives Node-RED historical access to the data in MQTT messages. Node-RED can help users find previously sent messages, display charts of collected data, and track overall equipment efficiency (OEE) trends.

The FairCom Edge unique convergence of an MQTT broker and a database allows Node-RED to bridge fundamentally incompatible protocols, such as MQTT, SQL, ODBC, JDBC, REST, OPC UA, Modbus, EtherNet/IP, and so forth. This extends Node-RED to integrate natively with all IT database systems.