[buzz, lights blinking] This is the healthy habits pet in action. When the backend application sends an MQTT notification. [buzz, lights blink] The pet lights up with random colors, and displays the current status in the eyes. So the status is based on whether or not I've done any exercise lately. I can tap to the top of the head [click] to send a notification that I've completed my exercise. [beep] And the pet will reward me with a happy noise. The data that's being sent by the Healthy Habits Pet via MQTT is being persisted into Cloudant DB I've set up the data to bucket by month So for each month, all of the notifications that are being sent from the pet will be in the one bucket Each document represents a single notification so, there's an ID, the device type that I set up before, the device ID, as well as a timestamp and the data that I sent from my Python program This data is being consumed by a cloud application that displays the data in tabular form So it just shows the timestamps of the most recent times that I performed my exercise, just so that I can see how I'm tracking Now I'm running this application locally as well as in Bluemix. To run it locally, I can use Maven to run it on Liberty. So that just runs it locally. And what I've done is I've copied the IOTF and the Cloudant database properties into a local configuration file so that it can connect to the Cloudant database and to the IoT MQTT service on Bluemix from my local app. But if I wanted to deploy it to Bluemix, [typing] I just need to run the Bluemix CLI, and I use Bluemix app push HealthyHabitsPetCloud app, which is just the name of the app And what that will do is that it builds the app, it will deploy it, and restart the app on Bluemix. [CLI commands] Staging the app. [fast-forwards] It doesn't take too long to stage the app, and once that's available, it will print out the URL of the app on Bluemix. Now it's started, so I can visit that app at this URL [clicks] And it should do the same thing as my local app, it will load that data from the Cloudant database, The timestamps look a little bit different because the time zone on Bluemix app instance, but it's loaded the same data from the Cloudant database The other thing that the app has is an API that provides read-only access to the same data as my timestamps so that I can integrate them into another app if I wanted to But the main thing that this cloud application is doing is that it is automatically sending updates to the healthy habits pet and this isn't visible in the UI, but if we take a look at Eclipse, we can see the code that's doing this. So there's a time and task that's being run, it's being scheduled twice a day to automatically look up the Cloudant database, take a look at the timestamps and if there isn't a recent notification of me performing my exercise, then it sends me a reminder so at the moment, I have the threshold set to a couple of hours [scrolling] and it also uses the ratio of the number of days when I have performed exercise and the number of times I have performed exercise And, the current day of the month, to work out how I'm tracking So, either I'm doing good, great, fair. Or whether I'm not doing very well I'll put my healthy habits pet to sleep. So this sends the status that's then used to determine which animation to display in the eyes of the healthy habits pet. And that is being sent from the reminder publisher, which is also sending notifications via MQTT.