The Internet of Things (IoT), which enables common objects to be intelligent and interactive, is widely considered the next evolution of the Internet.
The pervasiveness of IoT devices and the ability to collect and analyze data which can be converted into information has motivated a plethora of IoT applications. For the successful deployment and management of these applications, cloud computing techniques are indispensable because they provide high computational capabilities as well as large storage capacity.
By integrating cloud computing and IoT techniques, new valuable and reliable services can be provided to many users.
The IoT cloud consists of several key components, each of which is composed of multiple servers that perform different tasks. The servers are established as Virtual Machines (VMs) utilizing virtualization technology. They are independent from each other, even if they run on the same physical machine.
With the development of wireless communication technologies, a multitude of objects can be interactive and connected to the Internet.
These inter-connected objects with built-in computing, communications and sensing capabilities constitute the Internet of Things (IoT). It is estimated that by 2020 the number of IoT devices will be close to 50 billion while the population will reach 7.6 billion.
These devices can generate huge amounts of data, which usually come in different format and meaning.
However, IoT devices usually have very limited capabilities due to their small physical size and energy consumption. Therefore, an IoT cloud is imperative to support the requirements of billions of IoT devices and provide various new and exciting IoT applications for the end-users.
Application servers: Application servers are often considered as the most important component of the IoT cloud since they are responsible for providing business services to customers. They need to provide facilities and an appropriate environment to run multiple applications based on certain application protocols.
The application servers in the traditional cloud are usually based on the HTTP.
HTTP servers work in a request-response manner through Transmission Control Protocol (TCP) connections with clients.
When connections are established, an HTTP server can listen to specific ports for requests from clients and send appropriate responses to the received requests. However, HTTP is not well suited for the IoT cloud, because IoT devices are constrained by their computing, communication, and energy resources. Consequently, another type of application protocol is more appealing for the IoT cloud, i.e., the Message Queuing Telemetry Transport (MQTT) protocol.
MQTT is designed specifically for resource constrained IoT devices as a lightweight messaging transportation protocol that operates via a topic-based publish-subscribe mode. When a client publishes a message on a particular topic, all the clients that have subscribed to the same topic can receive this message.
In order to enable one-to-many connections, the publish-subscribe messaging pattern of MQTT requires a message broker.
One way to achieve high performance with an IoT cloud system using MQTT servers is to utilize a Redis cluster database.
Redis which is an open-source, high performance, in-memory NoSQL distributed database with key-value store, works well with the MQTT servers because it can act as a message broker.
The load of the MQTT server can be largely moved to a Redis cluster so that higher concurrency can be achieved.
Redis Database cluster and broker: Using Redis to store data for the IoT cloud.
IoT systems collect and process large volumes of data from many devices – sensors, machines, cameras, appliances, etc. deployed in the field. The data exchange is often bidirectional as these systems control devices by sending them time-critical messages and commands. IoT systems require high performance databases and messaging platforms. Traditional databases typically cannot keep up with the volume, cost and agility required.
The main bottleneck for the deployment of real-time IoT applications is the performance of the SQL databases. Consequently, a NoSQL database like Redis can be used to provide real-time and high-efficiency services for data storage. A Redis database enables data to be
stored directly in memory.
By storing all key-value data in the memory, Redis can significantly increase the I/O speed. In order to improve the reliability of the database, a Redis cluster with more than one Redis nodes can be configured in the IoT cloud. Thus, the users can enjoy continuous data services even when one or more Redis nodes are out of order. The Redis cluster is fully connected such that each Redis node is connected with all the others through TCP connections. After forming the Redis cluster, slot share should be configured before the cluster can work properly. The data stored in the Redis cluster are first hashed, e.g., taking the CRC16 of modulo 16384 of the data as the hash slot.
By checking in which interval the hash slot is located, the data is then stored in the corresponding Redis node.
Since the hash slots of incoming data are uniformly distributed, the load of each Redis node is inherently balanced. From the users’ viewpoint, there is no difference in accessing the database whether it is a single Redis node or a cluster.
Some additional benefits of using Redis for an IoT Cloud System include:
- Fast time to market. Built-in data structures, modules, publish-subscribe capabilities give Redis Enterprise an advantage in delivering reliable IoT solutions. Redis’ small footprint allows for its deployment on devices such as the Raspberry Pi, with corresponding scalable Redis Enterprise deployments both at the edge and in the cloud, to process any data type and volume with the most efficient use of hardware.
- Least complexity. Redis Enterprise takes all the operational hassle out of deployment, availability and scaling through automation of the critical processes for managing Redis databases and with technology that incorporates failure protection. With multiple deployment options, Redis Enterprise works for devices, edge and elastic on-premises or cloud environments that support IoT environments.
- Lowest costs. Redis Enterprise maximizes the power you can get from your infrastructure by delivering millions of reads and writes/second with just a few servers, through utilization of all available virtual or physical cores for computing and built-in multi-tenancy with controls for balancing and re-balancing shards to ensure consistent performance. By extending Redis to utilize Flash memory as a RAM extension, Redis Enterprise delivers a great balance of memory-like performance at SSD-like costs.
Contact us today to schedule a free consultation and see how we can help you achieve your IoT development goals.