BlueBeak beacon technology is a practical example of the Internet of Things at work. It leverages AWS services to deliver a seamless platform providing location-based services for several industries.
In the first blog of this series, we demystified the Internet of Things or IoT for short. Consumer and industrial devices push insane amounts of data into the cloud every second.
IoT essentially boils down to managing data, more specifically:
- Capturing the data generated by devices
- Making real-time decisions based on the data
- Storing the data for later use
- Analyzing the data to gain operational insights
In this installment of the IoT series, we’ll take a look at a specific IoT use case Centric Consulting created around our very own beacon technology framework called BlueBeak. BlueBeak is a Cloud-based framework that provides location-based services by leveraging Bluetooth beacons. Most people are familiar with Bluetooth, but beacons may be a new technology for some. Here’s a brief primer on beacons.
Beacons are:
- Small, battery-powered, transmitters
- Bluetooth Low Energy (BLE)
- Compatible with smartphones
- Micro-location (50 meters or less)
- Low Cost, low profile, low maintenance
We provide location-based services, through BlueBeak, to several industries, including healthcare and retail.
As mentioned above, IoT is all about data. BlueBeak is no different. Let’s take a look under the hood and discover how BlueBeak manages data.
Data Ingestion
The average Bluetooth beacon generates about 30B of data every second. This amount may not sound like a lot until you do the math for even a small deployment of just 100 beacons. In one day, those 100 beacons generate:
30 Bytes x 60 seconds x 60 minutes x 24 hours x 100 beacons = 259,200,000 bytes
Let’s call it 250 Megabytes to make the math easier. And that’s just the beacon data. Don’t forget about all of the metadata accompanying those beacons. For BlueBeak, we chose AWS as our Cloud platform for several reasons, including, specifically, AWS Lightsail. Lightsail is an easy-to-use cloud platform that provides the infrastructure to host a website or application in the cloud.
A few lightweight instances in Lightsail are used to collect, process, and analyze real-time, streaming data so you can get timely insights and react quickly to new information. The raw data transmits from the beacons via MQTT, a lightweight messaging protocol for small sensors. One instance performs some initial filtering on the incoming (beacon) data before passing it down the line for additional processing and storage.
Data Decisions
Once the data flows through the Lightsail instance, BlueBeak responds based on the data. For example, in our retail application, the data identifies a customer is a few feet away from a beacon located near the Spa in a hotel. The business rules indicate for this scenario, the customer receives a notification on his or her smartphone offering 25% off a Spa session. We accomplish this with BlueBeak using web services, also running on Amazon Lightsail.
The web services and business rules hosted on Lightsail examine the data and take action (trigger a notification, for example) if necessary.
Data Storage
Once the data streams into BlueBeak via MQTT and the Lightsail instance activates any immediate business rules, we need to store that data for many reasons:
- Dashboard Display
- Leverage artificial intelligence algorithms to optimize operations
We have several choices when it comes to storing IoT data. Since we receive all our beacon data in JavaScript Object Notation (JSON) format, we use a NoSQL database. For our initial implementation of BlueBeak, we used Couchbase, an open-source, distributed NoSQL documented-oriented database. We store the data in Couchbase, where downstream data consumers can index and retrieve it for a Dashboard for display, Machine Learning algorithms, or other insights. We added an in-memory cache called Redis to optimize retrieval from Couchbase. We conveniently host our Couchbase database in the same Lightsail infrastructure used by the web services mentioned in the Data Decisions section.
Data Display
One of the key benefits BlueBeak provides is operational insights, displaying data on a nearby real-time dashboard. In our healthcare deployments, BlueBeak helps healthcare administrators identify which patients recently received care and which patients need attention based on the last time a nurse was in the patient’s room. We accomplished this using a responsive website that displays the status of each patient’s room based on the most recent beacon data. Furthermore, we configured alerts and notifications based on the beacon data.
For example, if a particular patient room doesn’t receive beacon data for several hours, BlueBeak alerts administration to a potential problem in that room. The Dashboard also provides a visual indication of the problem, such as changing an icon from GREEN to RED, as indicated in the image to the left. We deliver the Dashboard as a responsive website using Angular and NodeJS, hosted in the AWS Lightsail.
Data Insights
We end this blog where we started–talking about data. The real value of any IoT project lies in the data captured in the process. More specifically, the insights gained about a particular process are often unexpected and counterintuitive. Using the IoT data in BlueBeak, for example, we saw trends in how healthcare providers delivered care to patients by measuring how much time they spent at the patient’s bedside.
Exporting this data is the last step in our collection and application process. We obtained those insights by exporting the data from Couchbase into an AWS Machine Learning tool, SageMaker. In short, SageMaker provides developers and data scientists with the ability to build, train, and deploy machine learning models quickly.
Bringing it All Together
Starting with data ingestion through analyzing that data, the focus on IoT is clearly around data. In this part of our series, we explored how BlueBeak leverages AWS services to deliver a seamless platform for providing location-based services for several industries. In the next blog, we’ll explore how we optimize BlueBeak to take advantage of some of the newer technologies available, such as Serverless computing and Multi-Region databases.