{ DreamFactory: 'Blog' }

DreamFactory IoT stack offers MQTT integration

Posted by Janakiram MSV

Tue, Oct 18, 2016

Developers trust DreamFactory to expose a broad range of data sources as REST APIs. Over the last few years, we have seen desktop, web, mobile developers build applications that are powered by DreamFactory. Today, we are excited to announce the support for MQTT, which will enable our customers to build solutions for Internet of Things (IoT).

Internet of Things is not just a trendy acronym. According to the research from International Data Corporation (IDC), the worldwide Internet of Things market will grow from $655.8 billion in 2014 to $1.7 trillion in 2020 with a compound annual growth rate (CAGR) of 16.9%. It presents an exciting opportunity to businesses and developers by bringing multiple device platforms together. Combined with rich data and analytics, IoT translates information into actionable insights.

MQTT has evolved as the de facto protocol of IoT. Developers use MQTT for machine-to-machine and machine-to-cloud communication to exchange sensor data. Mainstream IoT platforms from AWS, IBM, Cisco, Microsoft, ThingWorx, and others support MQTT as one of the protocols. The simplicity and flexibility of this protocol makes it the ideal choice to build robust IoT solutions.

We integrated Mosca, an open source MQTT broker, with DreamFactory to complement the RESTful API. Combined with the existing support for a variety of data sources, developers are able to build end-to-end IoT applications that take advantage of both MQTT and REST.

The integration of DreamFactory with Mosca enables multiple use cases and scenarios. Apart from sending messages and telemetry data from sensors and devices, developers can create powerful workflows by tapping into the server-side scripting features of DreamFactory. They can write rules in a variety of languages including Javascript, PHP, Python, and others. This capability opens up many interesting opportunities to extend IoT solutions with many 3rd party services.

 

Screen_Shot_2016-10-17_at_11.29.53_PM.png
DreamFactory IoT Building Blocks

 

Here are some capabilities that the DreamFactory IoT stack brings to the developers:

Device Registry

Device Registry acts as the inventory of all the devices connected to the platform. Developers can register devices to acquire tokens that are used for secure connection. Devices can be blacklisted or whitelisted through the policies. Additional metadata can be added through a simple JSON schema.

User Management

DreamFactory has built-in support for users and groups, which is extended to the IoT stack. Each device connected to the platform is owned and registered by a user. Only authorized users have access to the device registry.

Client Libraries

Since DreamFactory IoT uses standard MQTT, developers can use their favorite MQTT client library from any language. We recommend using Eclipse Paho client libraries that support multiple languages.

Messages

Devices connected to DreamFactory IoT talk to each other through messages. Actuators, switches, and other devices generate data which is not stored permanently but used to control other devices send messages.

Telemetry

Telemetry data generated by sensors can be retained and stored for long term processing and analysis. Developers can easily ingest telemetry data to DreamFactory through MQTT or REST protocols. The time-series data can be easily exported to other sources such as Apache Hadoop or data lakes for complex analysis.

Rules Engine

The DreamFactory IoT Rules Engine is a powerful server-side scripting environment to create complex workflows and integration points. Developers can define thresholds, conditions, and actions in their favorite language.

Visualization

Based on the open source reporting tool, Freeboard, developers will be able to create dashboards that deliver rich visualization. Freeboard is connected to the Telemetry data source of DreamFactory through REST.

Integration

DreamFactory IoT is one of the first open source stacks with comprehensive functionality. Since it uses industry standard protocols including REST and MQTT, developers can easily extend the platform to integrate it with other systems such as cloud platforms, Big Data stacks, and reporting engines.

We will be merging the IoT branch with main github repo in the coming days. We’re looking forward to seeing what you build with the new DreamFactory IoT stack. To learn more about DreamFactory IoT, please register for the webinar that we are hosting on 27th November.

 

 

Get started with DreamFactory with a free hosted DreamFactory development environment. Or, download and run it on the server, cloud, or desktop of your choice.

Product Updates

Weekly Digest

Recent Posts