The Internet of Things - Expanding Connectivity
MuleSoft’s mission has always been to connect the world's applications to their devices. We firmly believe that the way people compete today depends upon how efficiently they can do this. But the notion of devices is going through another sea change; a new aspect of the concept of “devices” has become smart devices like watches, connected light bulbs, smart appliances - e.g., devices woven into our clothes and the fabric of everyday life.
Five years ago, we started focusing on connecting devices because many of our customers were starting to think about mobile. But it has now gone a lot further than that. Today, the term “devices” means anything that is connected that isn't a traditional web client. In other words, sensors, connected machinery, street lighting, among other things, are now becoming connected devices. This shift to smart, connected devices is referred to as IoT, or the Internet of Things. The value the enterprise gets out of these connected devices is the data they collect and how to react to that data or how that data is leveraged into new services and products.
IoT represents an architectural shift
IoT is changing the computer hardware model that we’ve had for the past 30 or 40 years. Consider all the different phases of hardware models that have existed; green screen, to mini-computer, to PC, to cloud and mobile. The computer architecture has been consistent; Client and Server. What's changed over the years are the clients. For IoT, however, there is actually a third hardware layer which breaks the traditional client server model. Developers and architects are used to building software systems across two physical tiers. But with clients that aren’t traditional web clients, there’s a new notion of a third tier. This is an emerging notion, spearheaded by research at Princeton University, this layer is called the Fog Layer or the Edge Layer. It is responsible for being the first line of connectivity for these devices to connect to before they go to the back-end systems, the server. The reason why this layer is required is the sheer number of connected devices and the differences in network quality.
There are predictions that there will be thirty to fifty billion connected devices in existence by 2020; as of 2015, there are already tens of billions connected devices. If you look at what's on the road map for what people want to people do through IoT, it becomes pretty clear that there's a very distinct role for this Edge Layer. Let’s demonstrate the Edge Layer in a connected building example. In a modern connected building, the light bulbs and the air conditioning, climate control, blinds and other infrastructure are all running through connected devices. Let’s say the building has fifty thousand connected light bulbs. Each bulb pings its status information every 10 seconds plus any state change. That is a lot of repetitive data being generated. That amount of data exchange is not very efficient to send directly to the cloud, particularly if the building owner is paying for bandwidth. The role of the Edge Layer is actually to sit close to the physical location of the sensors and the devices and collect information from those devices, and then collate that into more valuable data sets.
The new Edge Layer
The Edge Layer is responsible for connecting devices locally, and manages the data collection and connection to the server. The benefits of this approach are:
- First pass data filtering reduces the amount of data transmitted but retains the meaning of the data
- Device connectivity doesn’t fail if the network fails, or there is an intermittent connection. The Edge Layer is responsible for handling outages and store and forward of data.
- Enables site level orchestration across devices from different vendors using different protocols
- Site abstraction allowing server/cloud application to be agnostic to the device implementation it controls
The Edge layer has three main components in a typical IoT deployment.
- The device or sensor itself. In IoT this is the client that generates data and/or receives commands to execute.
- Most devices will connect to a gateway that enables access to the internet or private network. Typically these gateways speak a proprietary protocol between the connected devices and then allow connectivity through the gateway using a standard protocol such as HTTP.
- The Edge Controller is responsible for connecting to all the gateways and independent devices in a physical location. The Edge control collected and collates data from all the devices, transmits data and accepts commands from the server to execute across some or all the devices.
Fig 1. MuleSoft’s Reference Architecture for IoT applications covering the Client Layer, Edge Layer and Server Layer.
The server layer is similar to what we already see in other client server architectures such as mobile.
- API Layer is leveraged by IoT architecture to connect to the server layer. This provides consistency, control, governance, security and an analytics-based model for connecting external sites.
- Device Management is responsible for knowing what devices are within the IoT network and sometimes is part of the authentication chain. Device management is also responsible for upgrading software on the Edge controller and possibly the gateways too.
- Data Plane provides the event streaming, transformation orchestration and connectivity to the applications and systems that at can use the data coming from the Edge layer.
- SaaS applications, Enterprise applications, Big data and BI are typically the consumers of the data coming from the Edge Layer to make the data actionable through analytics, dashboards, and application processing.
Going back to the building management system, the light bulbs(devices) would connect to a vendor-specific gateway. That gateway is the interface that allows other things to connect to it or the ability to get information to and from the devices. The Edge Layer allows you to collect information from multiple different devices from different manufacturers. The building management system might have light bulbs from three or four different manufacturers in the building, so there will be three or four different types of gateways that need to connect. In addition, if the building management system wants to connect other devices from other systems like HVAC or environment controls, there's no easy way to have control events executing across those different types of devices. If someone wanted the lights off, they would need to bridge three or four different control events to each of those different gateways. That's a tougher proposition than actually having the gateway device that knows how to navigate the physical landscape and be the marshal of events from the cloud or the data center to the physical location.
The Edge Layer is critically important for network reliability. The IoT Architecture is separated by network boundaries, so at the device side it could be Bluetooth, Zigbee, ZWave between the device and gateway then more common or standard protocols at the Edge Controller. Then between the Edge Layer and the edge and the server layer there is usually a private network IP network or 3G or public internet. Now typically in most IoT applications, security constraints are actually defined by these network boundaries to control access and monitor.
What happens when network connectivity is lost to the server layer? The edge controller serves as the point of contact for devices and gateways so they can keep operating without connectivity to the server layer over the network. An example of this is if you're monitoring a piece of machinery and the temperature goes within a certain boundary, it is fine. But if it goes outside the boundary there needs to be a series of events that triggers an actuator to inject some coolant. The logic that decides whether the machine needs to be cooled is local to the machine itself so even if the network is down the machine will continue to function properly.
Another case to consider is that the location of these devices and sensors is extremely varied so where connectivity is limited, network connectivity perhaps in rural areas or countries where the availability of connectivity can be limited, the edge layer is crucial.
Take a look at more resources on how IoT could be incorporated in your business.