Using Docker Containers for Complex IoT Application – Flux7 Blog

By admin
January 27, 2014

container technologyRecently at Flux7 Labs we developed an end-to-end Internet of Things project that received sensor data to provide reports to service-provider end users. Our client asked us to support multiple service providers for his new business venture. We knew that rearchitecting the application to incorporate major changes would prove to be both time-consuming and expensive for our client. It also would have required a far more complicated, rigid and difficult-to-maintain codebase.


We had been exploring the potential of using container technology, Docker, to set up Flux7 Labs’ internal development environments and, based on our findings, believed we could use it in order to avoid a major application rewrite. So we decided to use Docker containers to provide quick, easy, and inexpensive multi-tenancy by creating isolated environments for running app tier multiple instances for each provider.

What is Docker?

Docker provides a user-friendly layer on top of Linux Containers (LXCs). LXCs provide operating-system-level virtualization by limiting a process’s resources. In addition to using the chroot command to change accessible directories for a given process, Docker effectively provides isolation of one group of processes from other files and system processes without the expense of running another operating system.

In the Beginning

The “single provider” version of our app had three components:

  1. Cassandra for data persistence, which we later use for generating each gateway’s report.

  1. A Twisted TCP server listening at PORT 6000 for data ingestion from a provider’s multiple gateways.

  1. A Flask app at PORT 80 serving as the admin panel for setting customizations and for viewing reports.

In the past, we’d used the following to launch the single-provider version of the application:


Subscribe Here!