IoT Demo using SAP Leonardo with Red Hat
Posted by tejones in Virtual Thoughts on Jun 27, 2016 6:49:48 PMOverview
This demo illustrates a retail store scenario using a mobile app to track customer movements while shopping at a store. There are many parts to the demo and I will step through each one in detail. The demo is hosted on github so you can download and try for yourself. Also, a short video of the demo can be found here.
The Demo Components and Roles
Beacon Data
The beacon data is generated by a python script to emulate customers moving in a store. The script will send MQTT messages to Red Hat JBoss A-MQ, Red Hat's messaging platform reflecting customer movements (Enter, Move, Exit).
There are two subscribers to the topics on the message broker, a web UI running a node.js MQTT client and a Red Hat JBoss BRMS instance. BRMS is Red Hat's Business Rules Management system. It serves as a decision point in our demo and has rules defined to determine if customers are "focused" (in the same department for x number of moves) or "roaming" (moving through the store). Both of these scenarios indicate that the customer may need assistance and a message is added to A-MQ indicating the customer's id and location in the store. This message is intended to provide an alert to sales personnel in the store.
Web UI
The web UI is listening for both customer movements and sales alerts and uses this data to show customer movements in the store and display the alerts.
SAP SQL Anywhere
In addition to categorizing customers and adding alerts to A-MQ, BRMS is also responsible for inserting data into SQL Anywhere. The SQL Anywhere instances provides web services that are called by BRMS to insert the data. When network bandwidth or connectivity is available, the data is then pushed to the HANA Cloud Platform. This is the beauty of the Intelligent Edge. The data will continued to be gather in the gateway and made available to the data center when possible.
HANA
The HANA instance in our architecture also pulls data from a second HANA database using HANA Smart Data Access (SDA) that contains the inventory of all stores in our fictitious corporation. All stores are also kept in this second instance.
Red Hat JBoss Data Virtualization
The data virtualization layer federates all related but disparate sources to provide a central connection to the native Android app. This app has been downloaded by the stores customer's and allows us to track their movements in the remote store. We can use this information along with the data in HANA, Salesforce customer data, postgreSQL customer sales history and promotional data from Amazon Redshift to target the precise promotional notification to send to the customer's mobile app. We can tell what department the customer is currently in and what their previous purchases were to match a promotion for the customer that will most likely result in a sale. This is in addition to all of the other data we can use in our app using the unified view of all of our enterprise and beacon data.
Reference Architecture
Summary
Please check out our github repository and try the demo out for yourself! As usual, please don't hesitate to ping me with any questions you may have!
Comments