node.js as an iot bridge
DESCRIPTION
Why Progress cares about IOT, how our customers are using it, and how Node.js is a great bridge between IOT and Progress's productsTRANSCRIPT
Node.js as an IOT Bridge
Eduardo Pelegri-Llopart
Vice President, Technology
Progress Software
[email protected] / @pelegri
© 2014 Progress Software Corporation. All rights reserved. 2
Agenda
Progress
Why Progress cares about IOT
Why Node.js
iBeacons and Philips Hues
Snow Plows
© 2014 Progress Software Corporation. All rights reserved. 3
Progress
© 2014 Progress Software Corporation. All rights reserved. 4
Progress Products
Progress OpenEdge
• RDBM, Multi-Tenant DB with 4GL Language (ABL)
• First commercial release in 1984; latest release 11.3
• ERP, CRM, back-end systems.
• Many Faithful ISV and end users
Rollbase – Object-based Productivity Platform (akin to Force.com)
Rollbase Mobile – Apache Cordova-based Mobile Platform
Corticon – Decision Service / Business Rules
Modulus – Node.js and MongoDB Platform
All w/ Flexible Deployment: Public Cloud, Private Cloud, On-Premises
© 2014 Progress Software Corporation. All rights reserved. 5
Computing Tomorrow Today!
© 2014 Progress Software Corporation. All rights reserved. 6
Many IoT Applications
Beacons, (indoor) Location Based Services
Payments
Home / Office Automation
Smart Buildings
Industry Automation
Wearables – Secondary Notifications & Health / Fitness
Connected Cars
Smart Cities
….
Very fast moving space Brought to you by the economy
of scale of mobile devices
© 2014 Progress Software Corporation. All rights reserved. 7
Some Progress Partners
DMSi
GMT
Macintosh
Jungle Lasers
So… How Can I Build These Apps?
© 2014 Progress Software Corporation. All rights reserved. 9
Node.js = V8 + libuv (+ xtras) + Community (NPM)
A JavaScript Runtime to run outside of the browser
Builds on the Javascript V8 engine and libuv library for async IO
Highly Efficient
Highly Portable
Event-Driven
Built-in package manager (NPM)
© 2014 Progress Software Corporation. All rights reserved. 10
Why Are JavaScript & Node Growing So Fast?
Why JavaScript?
Virtually all developers know it
Widest developer footprint of any language
Easy to learn, productive
Even business users learn it fast
Used for everything
Browser, Server-side, Mobile, Wearables, IoT
Used at all levels of the stack
Frontend, middleware and backend DB
Maximizes developer collaboration
All developers can contribute everywhere
Why Node?
Event-based model, highly scalable
Great for data-intensive, real-time apps
Web API Focused
Very good fit for API-first architectures
Extremely efficient
Requires few computational resources
Incredible Community and Ecosystem
Over 97,000 packages
Fast and easy setup
Passes the 5 minute test
© 2014 Progress Software Corporation. All rights reserved. 11
Why Is Node a Great Match for IoT
Why JavaScript?
Virtually all developers know it
Widest developer footprint of any language
Easy to learn, productive
Even business users learn it fast
Used for everything
Browser, Server-side, Mobile, Wearables, IoT
Used at all levels of the stack
Frontend, middleware and backend DB
Maximizes developer collaboration
All developers can contribute everywhere
Why Node?
Event-based model, highly scalable
Great for data-intensive, real-time apps
Web API Focused
Very good fit for API-first architectures
Extremely efficient
Requires few computational resources
Incredible Community and Ecosystem
Over 97,000 packages
Fast and easy setup
Passes the 5 minute test
© 2014 Progress Software Corporation. All rights reserved. 12
Roll Call
© 2014 Progress Software Corporation. All rights reserved. 13
iBeacons and Philips Hue
Apple iBeacon – notification protocol on BLE
• Signal 2/s – 10/s, 3-6months/2years battery
• Power (proximity) and UID (identity)
• Point-to-Point, no pairing, 50 meters
• Indoor microlocation, retail, etc…
Philips Hue
• Ethernet/IP (Bridge) + Zigbee/Mesh (Bulb)
• AC power
• REST interface (to bridge)
• Home automation
© 2014 Progress Software Corporation. All rights reserved. 14
Roll Call Sample
Use iBeacons to detect presence in some space
Record this in our servers
Act on this by manipulating some smart lights
For extra credit smart lights are behind firewall
© 2014 Progress Software Corporation. All rights reserved. 15
Mongoose
BLE/iBeacon
iOS
Web
Node MongoDB
POST
request
Express
Roll Call and Node.js
Hue
Bridge
Local
Node
Server
Modulus
Node
Server
iOS
App
Bulb
Bulb
Bulb
Firew
all
© 2014 Progress Software Corporation. All rights reserved. 16
Snow Plow
© 2014 Progress Software Corporation. All rights reserved. 17
Tracking and Managing Snow Plows … With Rollbase
Snow Plows (et al) have GPS unit
Based on Jungle Lasers’ App Goals
Efficiently Managing GPS Stream Data
Exposing data to Rollbase
© 2014 Progress Software Corporation. All rights reserved. 18
End-to-End: Snow Plow / Geo Data Example Location-viewer
Rollbase App
Dashboards
Modulus
JSDO
Remote Objects
AngularJS SPA
App
Municipality Data
Rollbase Mobile
GPS
Data
Node and
MongoDB
OEM Data
(emergencies)
Current Data
Historical Data
Hospital Patients
(e.g. dialysis)
© 2014 Progress Software Corporation. All rights reserved. 19
jsdo-node – JDSO Remoting into Node.js Layer
Rollbase App
Node.js Layer
Node JSDO
server objects
Any
JSDO Client
© 2014 Progress Software Corporation. All rights reserved. 20
Snow Plow DEMO
© 2014 Progress Software Corporation. All rights reserved. 21
What Else?
© 2014 Progress Software Corporation. All rights reserved. 22
What Else Can We Do with Node? Samples at http://github.com/progress
Corticon 5.4
REST Interface
Node.js Layer
POST / JSON AngularJS
SPA
Rollbase
Node.js Layer
Invoke REST
AngularJS
SPA
Socket.io
or REST
Rollbase
Mobile
Angular Node OpenEdge REST JSDO
Thanks to David Inglis, Keegan Mendonca and Reeti Banthia, and Jungle Lasers
http://dcinglis.wordpress.com & http://mendoncakeegan.wordpress.com