Building Internet of Things Apps with Cloudant DBaaS Andy Ellicott, Cloudant John David Chibuk, Kiwi Wearables
Agenda Cloudant overview When to consider using Cloudant for IoT apps Kiwi Wearables Managing wearable sensor data in Cloudant Q&A 2
Cloudant Highlights Distributed NoSQL Database as a Service (DBaaS) For developers of high-velocity web, mobile, IoT apps Ends drudgery & risk of scale-ityourself 23,000+ users Acquired by IBM Feb 2014 3
JSON DBaaS optimized for Concurrency Durability Availability Mobility 4
Open Source DNA Combines best OS technology & thinking to create most scalable, flexible, always-on DBaaS CouchDB) JSON)storage,)API,) Replica5on) Dynamo) Clustering,)Scaling,) Fault)Tolerance) MongoDB) Declara5ve)Query) Language) Lucene) Text)indexing)&) Search) GeoJSON) Geospa5al)indexing) &)query)! Haproxy) GeoLLoad)Balancing) Chef) Configura5on) Management) Graphite)&) Riemann) Monitoring) rsyslog) Federated)))) Logging) CollectD) Con5nuous) Integra5on)
Cloudant NoSQL DBaaS App Layer / Browser / Mobile App / Device REST (HTTPS) Cloudant JSON API JSON CRUD Incremental MapReduce Lucene Search 2D, 3D Geospatial Multi- Master Replication Device Sync Security Monitoring IO Control Geo-Load Balancing Indexed JSON Storage Physical Storage @ IBM So"Layer, Rackspace, Microso" Azure, AWS Managed for you 24x7 by Cloudant developer-operators
Data is the Cornerstone of the Internet of Things Any device using HTTP(s) and JSON can sync with Cloudant 7
Cloudant IoT Customer Examples Wearables location, motion, environmental data for consumer and military Vehicles Route optimization for trucking fleets Health Workout recording planning Scientific various research/sensors Gaming console and toy reporting for leaderboards, et al Manufacturing Product status reporting from installed appliances 8
Cloudant NoSQL DBaaS App Layer / Browser / Mobile App / Device REST (HTTPS) Cloudant JSON API JSON CRUD Incremental MapReduce Lucene Search 2D, 3D Geospatial Multi- Master Replication Device Sync Security Monitoring IO Control Geo-Load Balancing Indexed JSON Storage Physical Storage @ IBM So"Layer, Rackspace, Microso" Azure, AWS Managed for you 24x7 by Cloudant developer-operators
App Data Delivery Network via Masterless Replication & Sync Global network of data centers 34 worldwide Built-in Masterless replication and sync for DR, HA and pushing mutable data close to users (occasionally connected devices) On Device: Open source Cloudant Sync libraries for ios and Android Unlimited scalability
Querying with Cloudant Geospatial Geospatial relations Intersects Nearest Contains Disjoint Contains properly Covered by Covers Crosses Overlaps Touches Within Geospatial search Supports OGC SFSQL & SQL(MM) specifications Paging of data Radius / Ellipse Interface is OpenSearch with Geo 11
When is Cloudant a Good Fit for Your IoT Apps? JSON data HTTP(s) access Location-based Disconnected data collection/access High concurrency High availablity Openness & Integrate-ability 12
13
API Kiwi technology is driven by the vision of a ubiquitous, multi-sensor, connected, wearable device with an open API for application development. Document V1.0 Private and Confidential Kiwi Wearable Technologies Ltd. Nov 14, 2013
High Level Technology Architecture KIWI DEVICE Kiwi Configuration Synchronize Device Customization KIWI PLATFORM Device API Wrapper KIWI API Device API KIWI MACHINE LEARNING SERVICE Javascript, Node, Nginx CLOUDANT DB FIRMWARE RTOS Kiwi Kernel MPU-9150 Data Store KIWI BACK-END Training Sets GUI Real-time Algorithms API Wrapper Kiwi Machine Learning API HARDWARE ARM M4 Bluetooth 4.0/LE SENSORS: accelerometer gyroscope magnetometer STORAGE (serial flash 32Mbit) DISPLAY RGB LED DATA TRANSPORT LAYER <Node.js> <UDP, TCP> <WebSocket> WEB SERVICES INTEGRATION <Node.js> <Twilio, SendGrid> IN-MEMORY DATA STORE <Redis> <Pub/Sub> KIWI RULES/STORAGE ENGINE Event Handler REAL-TIME STREAMING INTERFACE <Node> <Socket.io> CLOUDAN T DB Kiwi Sensor API Kiwi OAUTH Kiwi Rules Document V1.0 Private and Confidential Kiwi Wearable Technologies Ltd. Nov 14, 2013
How is the Kiwi data and the Kiwi Platform used by Developers 1. Developer Tool Kit: A user interface is provided to make it easy for developers to analyze the sensor data, as well as quickly record training sets and run real-time prediction and classification algorithms! We have built a web user interface for developers to use to Visualizes sensor data Record raw data in CSV files for analysis Visualize motion event data (i.e. Tap events, Rotation events) Capture unique motion training sets into machine learning platform Document V1.0 Private and Confidential Kiwi Wearable Technologies Ltd. Nov 14, 2013
How is the Kiwi data and the Kiwi Platform used by Developers 2. Developing Kiwi powered applications The Kiwi Sensor API makes it easy for developers to connect the Kiwi real-time streaming sensor data and motion event to start building mobile and web user experiences. The following snippet illustrates the simplicity with which developers can get access to the sensor data. Currently, the authentication mechanism is at a minimum viable product stage; we plan to increase the robustness and security of the authentication layer in the near future. var socket = io.connect('https://build.kiwiwearables.com:8080') socket.on('connect', function() { socket.emit('listen', {device_id: '31', password: '123'}); }); socket.on('listen_response', function(data) { console.log(data.message); }); Document V1.0 Private and Confidential Kiwi Wearable Technologies Ltd. Nov 14, 2013
Thank You! Learn more: https://cloudant.com/ Develop with Kiwi Wearables: http://kiwiwearables.com/ Andy Ellicott andy@cloudant.com John David Chibuk jd@kiwiwearables.com 18