c-treeEDGE IoT Database

Next Topic

Introduction to c-treeEDGE

The c-treeEDGE IoT Database allows developers to place a fast, transaction-controlled database on the "edge," near their IoT data. c-treeEDGE places storage close to the sensors, instead of in the cloud or an on-premises server, so it provides autonomy in situations when communication is slow or unavailable. In addition, this means c-treeEDGE can store unfiltered sensor data with no bandwidth concerns. It allows you to put intelligence in your IoT projects for advanced, real-time decision processing.

Multimodel Design

c-treeEDGE consists of a collection of connectors (for use with ThingWorx, Node-RED, MQTT, Node.js, etc.) and a powerful database engine that can be located on the "edge."

The database engine, the c-treeEDGE MicroServer, is based on the c-treeACE Server. The unique c-treeACE "multimodel" design allows both navigational and SQL (relational) access to the same data at the same time. This design allows it to handle volumes of raw sensor data at high-speeds and offer sophisticated features such as immediately-consistent ACID transactions. The relational interfaces provide SQL access to this same data using industry-standard APIs such as ODBC, JDBC, ADO.NET, etc.

Lightweight Yet Powerful

c-treeEDGE is lightweight enough to run on small IoT edge devices yet powerful enough to host data from thousands of sensors. This allows you to decide where your data is stored and how much of it (if any) is sent to the cloud or other machines in the enterprise. Perform queries locally and make decisions on the edge without the latency of first getting data to the cloud or machines elsewhere in your environment. Save all the sensor data for a site on location and only send aggregate data upstream. If things go wrong, all of your data can still be available sitting on the edge device waiting for debugging and analysis.

The image below shows the c-treeEDGE architecture and the available connectors.

Using c-treeEDGE as a Persistent Data Store

c-treeEDGE uses a microservices architecture, so its API is structured as a highly modular collection of loosely coupled, fine-grained services and lightweight protocols. Combined with the tiny footprint of c-treeEDGE (tunable to under 40MB), this allows it to be used as a persistent data store in IoT applications residing on devices and gateways near the "edge" of the network.

The following connectors are provided to allow integration into your IoT projects:

  • ThingWorx "thing"
  • Node-RED Node
  • Node.js
  • MQTT Broker
  • REST API supporting both navigational and relational (SQL) access

Unlimited Options

c-treeEDGE is a two-part solution:

  • A connector that allows it to integrate with your application (ThingWorx, Node-RED, and a REST API are supported)
  • The c-treeEDGE MicroServer, which can be installed on an edge device or gateway.

The connector connects your application to the c-treeEDGE MicroServer. Depending on your host platform, the extensive set of relational and navigational APIs shown below may be available.


The APIs in the diagram above are color-coded:

Orange indicates connectors included with c-treeEDGE.

Red indicates relational APIs.

Light Blue indicates navigational APIs.

Dark Blue indicates the underlying ISAM API.

API Availability on All Platforms

The Windows x86/x64 and the Linux x86/x64 c-treeEDGE packages include all the APIs shown in the above diagram. Tutorials and instructions are located in FairCom\<version>\ctreeEdge\<platform>\ctreeEdge\winX64\ctreeAPIs\sdk.

The packages for the other platforms supported by c-treeEDGE, including Andriod Things, Raspbian (including Ubuntu Core), and Windows IoT, focus on the orange subset of APIs illustrated above and documented in this guide. Contact FairCom if you have interest in support for any other APIs for these operating systems.


FairCom offers an advanced replication solution called the Replication Agent (packaged separately), which can maintain an up-to-date copy of your data in real-time. The files created by the c-treeEDGE MicroServer are replication aware so you can take advantage of the Replication Agent. You can learn more about replication in the chapter titled Replication with c-treeEDGE and in the c-treeAMS Replication Solutions Guide. Contact FairCom for more information.

Supported Environments

c-treeEDGE supports the ThingWorx platform, the Node-RED development environment, and ad hoc development using MQTT, Node.js, or just about any environment you can think of.

c-treeEDGE and ThingWorx

The ThingWorx platform allows developers to model complex enterprise-class applications that integrate thousands of sensors and controls. The ThingWorx MarketPlace gives you access to plug-in "extensions" that allow you to connect to a wide variety of third-party developers. For more about this platform, see ThingWorx later in this document.

The FairCom c-treeEDGE ThingWorx Extension provides full relational and navigational access to your persisted data with very little change to your ThingWorx project. It can be installed on a device or gateway where it adds persistence close to the source of the data. As a certified ThingWorx extension, c-treeEDGE can be added to your project with a simple drag-and-drop operation.

Different from other ThingWorx persistence solutions (e.g., JDBC, ADO, SQL), which connect to databases in the cloud, c-treeEDGE allows you to place persistence on the edge as well as in the cloud.

Node-RED with MQTT

Node-RED is a browser-based, drag-and-drop editor that greatly simplifies the creation of applications by describing flow between hardware devices, APIs, and online services. It includes a palette of nodes, which can be used by simply dragging them into your application. The palette of nodes can be easily extended to add new capabilities. c-treeEDGE appears in the palette so you can quickly add persistence to your application. If you are using MQTT, simply add the c-treeEDGE MQTT Broker to your application. To learn more, see Node-RED.

Node-RED with Node.js

The c-treeEDGE Node.js node can be installed in Node-RED, providing a storage node icon in the Node-RED pallet. You can drag this storage node into your flows to quickly add persistence to your application.

To learn more, see Node-RED.


c-treeEDGE and Node.js

Node.js allows executing JavaScript outside of a browser on the server side. This can be used to produce dynamic web page content before the page is sent to the browser. c-treeEDGE provides a Node.js "node" you can use to access your database from JavaScript code. This allows you to easily persist data or access existing data from Node.js or JavaScrip environments. To learn more, see Node.js.

c-treeEDGE and MQTT

Message Queuing Telemetry Transport (MQTT) is a lightweight protocol allowing small pieces of data (often JSON encoded) to be transferred from machine to machine across networks. MQTT can be used on low bandwidth, high latency connections, which makes it ideal for use with the Internet of Things. MQTT communication consists of a publisher, a broker, and a subscriber. To learn more, see MQTT Broker.

The c-treeEDGE MQTT Broker adds the ability to persist MQTT message contents. Unlike other persistence options, c-treeEDGE can be located on the edge near the sensors.


REST stands for REpresentational State Transfer. It is an architectural model that can be used for distributed systems. In a REST architecture, data and functionality (document, image, temporal service, collection of other resources, even a "non-virtual" object) are considered "resources" identified by a URI. A clearly-defined set of operations is used to act upon resources. Clients and servers exchange representations of resources using a standardized interface and protocol (e.g., HTTP).

c-treeEDGE has made its functionality available via a REST interface. The REST interface in the current offering exposes the Navigational API for high-speed processing with immediately-consistent ACID transactions. Ideally suited for raw sensor data. To learn more, see REST API.

To get started in a hurry, see the next chapter, Quick Start.