2014/05/22
22 May, 2014

Connecting the Real World and World of Computing with a Complete Cloud-Centric IOT Model

  • Pulasthi Supun
  • Software Engineer - WSO2

Introduction

Internet of Things (IOT) is the next step in internet, allowing the internet to grow beyond traditional devices, such as laptops and smartphones; IOT will enable everyday things to be connected to the internet through embedded technology. Gartner has predicted that the number of connected devices will reach 26 billion by 2020. With IOT, we will experience true ubiquitous computing. Ubiquitous computing is a concept where computing is made to appear as it is everywhere and anywhere. Our surroundings will be embedded with various sensors and actuators that will be interconnected through networks. Even a simple device like a thermostat may take on a completely different role within IOT; from a device that just displays the temperature to a device that monitors and changes environmental parameters to provide the user with a better experience as with the Nest Thermostat.

With a vast number of sensors, enormous amounts of data will be accumulated, putting current big data solutions to the test, even though current systems are capable of processing large amounts of data.

This data by itself is of little use, thus this data needs to be stored and analyzed to generate information which then can be presented to users through visualization tools. It is also important to be able to process the data real time to take immediate action as and when required according to the data that’s received. To achieve these goals, it is important to have a complete set of middleware that seamlessly integrates with one another to give monitoring, storage, analytics, and visualization as a single solution. Considering the volume of data and events, it is important that the services and tools are scalable. Cloud Computing is able to provide such scalable services, hence it is important that all the solutions discussed are also available in the cloud.

Key ingredients of IOT

IOT, as the name suggests, is made up of a numerous number of ‘Things.’ It is not possible to list all the ingredients that IOT will consist of; therefore, we will take a look at a few key ingredients that play a major role in IOT as depicted in Figure 1.

Radio frequency identification (RFID)

RFID technology has enabled the creation of microchips for wireless data communication, which will plays a major role in a sustainable IOT architecture. RFIDs are widely used in supply chain management applications and transportation applications.

Wireless sensor networks (WSN)

WSN technologies will enable the creation of small to medium scale networks of sensors with a small level of processing power that can collect data from the environment and perform a low level analysis on the data before disseminating the collected data to the cloud. Active RFID can also be considered as low level wireless sensor networks. A personal health monitoring system could be considered a small WSN with a small set of sensors to measure vital signs, such as the heart rate, body temperature, etc. All these sensors relay data to a small device that could be even embedded in a wrist watch.

Addressing schemes

With the rapidly increasing number of “Things” that need to be interconnected, it will be vital to have a sustainable addressing model that can be used to uniquely identify each object in the network. An address scheme based on IPV6 may be a viable solution for this problem.

Data storage and analytics

Data storage plays a key role in IOT given that there should be a scalable method to store all the data that is collected through sensors, wireless sensor networks, and other data collection points. Data stored should also be readily accessible for analysis. Raw data that is collected has very little value, hence it is important to be able to analyze the data and infer information. Data may be processed in real time or in batch processing mode. The middleware solution or cloud offering should be able to provide all these solutions in a seamless manner. The WSO2 platform is complete and is able cater to all the needs of data storage and analytics that will be needed to develop a sustainable IOT architecture.

Visualization

For people to properly benefit from IOT, it is important that information is presented to the user in an attractive and user-friendly manner. The user should be able to grasp the information with minimum effort and interact through devices, such as smartphones, tablets, etc. WSO2 User Engagement Server is ideal to visualize the information that was collected by analyzing the data.

Cloud centric model of IOT

One way to look at IOT is as a cloud-centric system as all the processing and data accumulation can be done in the cloud. Figure 1 shows a conceptual view of the cloud centric model.

Objects (Things) of the network will mainly constitute sensors and wireless sensor networks that will monitor the surrounding environment and collect data. Consider a smart home like Nest - the sensors in such a system will be cameras, thermostats, motion detectors, etc. This data will then be processed at an edge processing system, which will be a small device with very little processing power. The edge processing system is important because it would be counterproductive to send each and every bit of data into the cloud; the edge processing system will analyze the data collected and aggregate the data. This aggregated data will be sent to the cloud. It is not necessary for all the collected data to go through an edge processing system, and some data may be sent directly to the cloud.

Figure 1

Depending on the data and scenario, it may be processed in real time or stored away to be batch processed. Some data may be processed real time and then stored away to be analyzed for historical data. Cloud services should provide tools for data storage, data analytics, complex event processing, and visualization. More importantly, these services need to be scalable to handle large amounts of data. The events that are triggered and information that is inferred should then be used to control and run actuators and applications.

Consider the smart home once again. A user would want the smart home to automatically handle several things, such as turning on the AC and TV when he/she enters the house. This processing needs to be done real time. When the sensors detect that the owner is home, an event should be triggered to turn on the AC or turn on the TV. It is also important that the system is able to process historical data to infer user preferences, e.g. what TV channel the user prefers to view when he/she gets home after work, what he/she wants to watch on a Sunday morning, etc. This is where data analytics and batch processing comes into the picture; the system should be able to analyze the collected data of the users’ behavior to choose a preferred channel.

How the WSO2 product stack fits into the picture

The WSO2 product stack has a comprehensive and complete set of products that have all the required features to achieve the cloud-centric model discussed above. Figure 2 shows how WSO2 products fit into the conceptual view of the cloud-centric model. All WSO2 products are available as cloud offerings.

Figure 2

WSO2 data agents can be used to gather data from various sources. Mobile devices can be managed through WSO2 Enterprise Mobility Manager to gather data. Data streams that need to be aggregated will be processed at the edge processing system. The edge processing system will run on WSO2 Siddhi, which is an extremely lightweight event processing engine. All the streams of data will be then sent to the cloud. An integration layer is added by using WSO2 Enterprise Service Bus (WSO2 ESB). The ESB enables the underlying system to use many different protocols and message formats. The ESB is capable of handling a variety of transports, protocols, and formats.

The data is then received by WSO2 Business Activity Monitor (BAM) and WSO2 Complex Event Processor (WSO2 CEP) data receivers. BAM stores the data in a Cassandra cluster, which is managed using WSO2 Storage Server to be later analyzed using BAM, which runs on top of Hadoop. WSO2 CEP can be used to process the data real time to trigger events corresponding to the data. WSO2 UES can be used to visualize the information that is gathered after analyzing the data using BAM. The information and events are then sent to applications and actuators and they will function according to the inputs. Again an ESB layer is used as an integration layer to convert between protocols and formats when needed.

WSO2 BAM

With the immense amount of data that will be accumulated in real-world IOT applications, it is important to have top edge analytics tools to analyze the data. WSO2 BAM is a comprehensive analytics tool that can be used for such use cases. One of the essential requirements for an analytics tool to be useable for an IOT application is high scalability. BAM uses Apache Cassandra to store data before processing them, allowing BAM to achieve high scalability. BAM can also be horizontally scaled by using load balancing and high availability deployments.

BAM also provides highly scalable data analytics powered by Apache Hadoop, and also supports an SQL-like query language powered by Apache Hive for writing analytics algorithms, which removes the hassle of writing tedious mapreduce jobs. Consider the smart home application discussed previously. To identify the TV channels the user prefers, we can collect the historical data of what he/she watches during certain times of the day and then write a Hive query to analyze this data to find the most watched channels at a certain time, and then use this data to invoke actuators to take appropriate actions. This is a very simple use case; with complex analytical queries, BAM is able to support highly complex use cases. One such use would be traffic control systems in a smart transportation system. The traffic control system will have to analyze all the historical data collected on vehicle traffic and suggest the most suitable time lines for each intersection.

BAM also has built-in support to create visualization dashboards without ever writing code. BAM can also be integrated with WSO2 UES to gain all the visualization power of the UES.

WSO2 CEP

The capability to process complex events real time and trigger events accordingly is a key component in IOT. Tools used for complex event processing should be able to process a large number of events in a very short time period. WSO2 CEP is an extremely high performance complex event processing engine, which is powered by the WSO2 Siddhi engine. CEP can process more than 2.5M events/sec on single server commodity hardware. It can also be scaled horizontally with high availability deployments.

CEP also provides a powerful and extensible query language for temporal event stream processing. This can be used to write complex queries to process data real time and act quickly according to the data. Consider the smart home once again, in such an application, there are numerous amounts of activities that would need real-time processing of the data. For example, a smart house should be able to identify when the owner enters the house. This can be detected by sensors that are installed in the house. The data needs to be processed real time and actions such as turning on the AC or brewing a hot cup of coffee need to be done. CEP can handle much more complex events by writing complex queries. One such complex use case would be a smart transportation system, which provides drivers with recommendations on routes that would take the least amount of time. The system needs to collect all the data from various routes the user can take and process them real time to offer the best option. CEP also supports built-in dashboards that can be used to visualize information that’s collected.

WSO2 CEP and WSO2 BAM combined (Lambda architecture)

WSO2 BAM and WSO2 CEP tightly integrate with one another. The combined products allow us to achieve Lambda architecture, which will play a key role in the cloud-centric model of IOT. In short, Lambda architecture allows both batch processing and real-time processing to be used side by side. For IOT application, what this implies is that rather than just separately depending on the batch processed data for some functions and on real-time event processing for others, the system can leverage from both processing modes to achieve better results. Let’s take a look at the smart transportation system that provides routing suggestions. Suggestions are made by running real-time queries on data collected on various routes that can be taken to reach the destination. The drawback in this method is that these calculations do not consider historical data that has already been collected and processed regarding these routes. With Lambda architecture in place, data from batch views can also be incorporated with real-time queries. The resulting suggestions would be more accurate with a better user experience.

Conclusion

IOT is bridging the real-world and the world of computing, enabling an even more connected world. With growth in IOT, we will experience a world like never before. Computer and embedded devices will be anywhere and everywhere always analyzing and processing data to provide us with the best of services and facilities and making our day-to-day activities easier and more enjoyable.

The combined products in the WSO2 product stack along with the ability to support Lambda architecture provides a complete solution for the cloud-centric IOT model. Data capturing is handled through WSO2 BAM and CEP data agents and WSO2 EMM; data storage is supported directly by WSO2 BAM or can be managed through WSO2 Storage Server. Comprehensive data analytics support is provided by WSO2 BAM. WSO2 CEP provides all the required features to develop a complete complex event processing system. WSO2 UES can be used to visualize the information gathered from the data. WSO2 ESB provides an integration layer to connect anything to anything. Other WSO2 products such as WSO2 Business Process Server, WSO2 Message Broker, etc. can also be incorporated to leverage their rich set of features.

References

[1] Cloud computing and emerging IT platforms: Vision, hype, and reality for delivering computing as the 5th utility

[2] The Lambda architecture: principles for architecting realtime Big Data systems

 

About Author

  • Pulasthi Supun
  • Software Engineer
  • WSO2