IoT and Big Data

Jax Big Data Sept. 2016

About Me

  • David Fekke
  • iOS/Android engineer at Swyft Mobile
  • JaxNode founder and co-organizer
  • BeerJS organizer
  • Created jaxtechmeetups.com
  • I like to build things

What is IoT?

The Internet is Everywhere

  • Desktop Computers
  • Mobile devices
  • Wi-Fi enabled microcontrollers
  • Thermostats, Nest
  • Refrigerators, (SAMSUNG)
  • Your Car (3G Data)

My favorite IoT device

What does Internet of Things have to do with Big Data anyways?

Big Data

  • IoT devices collect lots of data
  • Data can be analyzed with tools like Hadoop and Spark
  • AWS and Azure both have Big Data
    and Machine learning solutions  

Building IoT devices

  • Price of components falling
  • Arduino introduced in 2006 makes it easy to prototype micro-controllers
  • Many micro-controllers shipping with WiFi chips
  • Purchased in bulk can be as low $2 per controller
  • Other components can be as low  a couple of cents

Two types of IoT Devices

  • Micro-controller (Arduino)
  • Computer (Raspberry Pi)

Particle Platform

Particle Photon

  • Wi-Fi chip built-in
  • ARM processor
  • Always connected cloud service
  • Arduinish compatible language based on C and C++
  • Node compatible module
  • Just $19

Particle Electron

  • 2G and 3G cellular network
  • 1MB flash memory
  • 128 K RAM
  • 36 Pins
  • $69 for dev board
  • $3 a month global SIM
// Define the pins we're going to call pinMode on
int greenLed = D7;

// This routine runs only once upon reset
void setup() {
  // Initialize D7 pin as output
  // It's important you do this here, inside the setup() function 
  // rather than outside it or in the loop function.
  pinMode(greenLed, OUTPUT);
}

// This routine gets called repeatedly, like once every 5-15 milliseconds.
// Spark firmware interleaves background CPU activity associated with 
// WiFi + Cloud activity with your code. 
// Make sure none of your code delays or blocks for too long (like more than
// 5 seconds), or weird things can happen.
void loop() {
  digitalWrite(greenLed, HIGH);
  delay(500);               // Wait for 500mS = 1 second
  digitalWrite(greenLed, LOW);
  delay(500);               // Wait for 1 second in off mode
}

Particle Cloud

  • Particle hosts their own service
  • You can also host your own
  • Dashboard
  • Web IDE can push code to devices

Particle APIs

  • Multiple SDKs for managing communication
  • Poll defined variables
  • Call functions
  • Hook into event streams
  • Rate limited to once per second 

Getting data from Particle

  • Data logger to SD Card
  • Poll the cloud service
  • WebHooks
  • Pub/Sub event queue

Particle Cloud Methods

  • Publish
  • Subscribe
  • Variable
  • Function

Azure IoT

Webhooks

  • Works with Azure Event Hub
  • Create Webhooks from Particle-cli or
    Particle dashboard
  • Initiate webhook call with publish command 
  • Support for Event Hubs right now

Azure IoT Hub

  • Formally called Event Hub
  • Based on AMQP queues
  • Also supports MQTT and HTTP
  • Cloud to Device
  • Device to Cloud

Azure Big Data

  • Feed data into blob storage or database
  • Connect to HDInsight
  • Hadoop, Spark and R based processing

Demo

https://particleled.herokuapp.com/

Resources

  • github.com/davidfekke/iotbigdata
  • particle.io
  • Sparkfun.com
  • Adafruit.com
  • RadioShack if you can still find one
  • azure.microsoft.com/en-us/services/iot-hub/

Questions

Contact

  • David Fekke at gmail dot com 
  • Twitter: @jaxnode @davidfekke
  • Skype: davidfekke

IoT In The Cloud

By David Fekke

IoT In The Cloud

These are the slides for the Big Data presentation on IoT. IoT and Big Data are complementary technologies.

  • 1,596