MQTT Pub/Sub Architecture


Expand Image Larger

Using a Publish/Subscribe pattern in AWS IoT, with the advertising wearable being a subscriber, it is possible to develop a scalable technology stack which can handle millions of wearables and billions of advertising wearable messages.  In addition AWS is popularly used and has a high availability of programming talent. (Diagram Correction Linux)

 

The architecture should communicate using MQTT, which is a machine-to-machine (M2M)/"Internet of Things" connectivity protocol which can transport over HTTP.  On AWS we recommend use of a WebSocket protocol.

 

The next layers of the stack can be thought of to reside inside the wear’s phone apps which consume the SDKs for iOS and Android, connecting AWS IoT to a device with a JavaScript/Node.js framework.

 

There may be opportunities for the use of JSON, a Rest API and Python in the stack.

 

Prototype

 

Fortunately we have a Nordic nRF51822 chip in our wearable,   refer to the Adafruit Feather M0 Bluefruit LE reference links for our prototype.

 

https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF5-SDK

 

Currently in the prototype we are using the UART protocol for communication between phone and wearable.  VERY IMPORTANT TO REMEMBER: Also there is potentially to use BLE Beacons as part of some business use cases yet to be defined, allowing for some future flexibility in the business model.

 

Alternatives

 

Finally, as alternatives there are always many ways to solve a problem, it should be noted that Samsung’s ARTIK Cloud may also present a viable architectural solution to the technology platform needs, both specific and dynamically for the evolving business plans.  Rules in the cloud on ARTIK allow the cloud to be controlled in a declarative programming language. https://artik.cloud/

 

Important Links for Technology Stack

 

 

 

 

 

 

Publish–subscribe pattern

https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern

 

Cloud Stack AWS IoT

https://aws.amazon.com/iot/

 

AWS IoT Now Supports WebSockets, Custom Keepalive Intervals, and Enhanced Console

https://aws.amazon.com/about-aws/whats-new/2016/01/aws-iot-now-supports-...

 

MQTT

http://mqtt.org/faq

 

MQTT over the WebSocket protocol

http://docs.aws.amazon.com/iot/latest/developerguide/protocols.html#mqtt-ws

SDK for connecting to AWS IoT from a device using JavaScript/Node.js

https://github.com/aws/aws-iot-device-sdk-js

 

Adafruit Feather M0 Bluefruit LE

https://learn.adafruit.com/adafruit-feather-m0-bluefruit-le?view=all

 

BLE FAQ

https://learn.adafruit.com/adafruit-feather-m0-bluefruit-le/faq

 

Nordic nRF51822 BLE Beacons

https://www.youtube.com/watch?v=Q5SpUnJTuk8

 

General FAQ: Data Models for IoT

http://iot-datamodels.blogspot.com/2014/05/design-patterns-for-internet-...

 

Open Questions

  1. Is it possible to use Python to write cross-platform apps for both iOS and Android?

http://stackoverflow.com/questions/10664196/is-it-possible-to-use-python...

 

This content is restricted.