SlideShare a Scribd company logo
Using JavaScript to Put
the “Internet” in IoT
@kevinswiber
Open source platform for
the Internet of Things
http://zettajs.org
Internet of Things
Ubiquitous Computing
Like control systems
Sensor Actuator
Controller
Environment
The Internet
…but on the Internet
More than 50B connected
devices by 2020
99 Problems
Technology
Coordination
Analysis
Experience
Decisions
Protocols
• HTTP/1.1
• WebSockets
• SPDY
• Future: HTTP/2
Crossing Network
Boundaries
• Access
• Interaction
• Streaming
Why Node?
• Evented, async
• Open Source
• Cross-platform
• Because you know
JavaScript!
Nuts & Bolts
Reaching the Edge
DevicesDevicesDevices
Zetta
Zetta
DevicesDevicesDevices
Zetta
ClientsClientsClients
ClientsClientsClients Private Network
Data Center
Internet
Desired Architectural
Properties
• Decoupling of implementations
• Independent evolution
• Scale
• Load balancing
• Centralize complexity, distribute simplicity
• Reduce latency
• Support event streams
Architectural Constraints
• Client-server, stateless, cacheable, layered
system, uniform interface, etc.
Wait, isn’t that REST?
The hypest of all media!
http://sirenspec.org
What about event streams?
How streams are done over
HTTP today
• WebHooks
• Chunked Transfer-Encoding
• HTTP Pipelining
• Long Polling
• Server Sent Events
X
X
X
X
X
Just upgrade
Zetta Process
Zetta Components
Scouts Drivers
Apps
create
observe
Model drivers as finite state
machines
LED.prototype.init = function(config) {
config
.type('led')
.state('off')
.when('off', { allow: ['turn-on'] })
.when('on', { allow: ['turn-off'] })
.map('turn-on', this.turnOn)
.map('turn-off', this.turnOff);
};
Transitions are represented
as affordances in the API.
"actions": [
{
"name": "turn-on",
"method": "POST",
"href": “...”,
"fields": [
{
"name": "action",
"type": "hidden",
"value": "turn-on"
}
]
}
]
We need to consume an
object stream.
links: [
{
title: “pulse“,
rel: [“http://rels.zettajs.io/object-stream“],
href: “ws://...”
}
]
We need to consume an
object stream.
» wscat -c ws://...
connected (press CTRL+C to quit)
< {"topic":"heartbeat/1/pulse","timestamp":1411757412119,"data":61}
< {"topic":"heartbeat/1/pulse","timestamp":1411757412620,"data":65}
< {"topic":"heartbeat/1/pulse","timestamp":1411757413121,"data":69}
< {"topic":"heartbeat/1/pulse","timestamp":1411757413622,"data":71}
< {"topic":"heartbeat/1/pulse","timestamp":1411757414124,"data":66}
< {"topic":"heartbeat/1/pulse","timestamp":1411757414626,"data":64}
< {"topic":"heartbeat/1/pulse","timestamp":1411757415128,"data":68}
< {"topic":"heartbeat/1/pulse","timestamp":1411757415629,"data":63}
< {"topic":"heartbeat/1/pulse","timestamp":1411757416130,"data":65}
< {"topic":"heartbeat/1/pulse","timestamp":1411757416631,"data":63}
Monitor resource events
before taking action.
links: [
{
title: “logs“,
rel: [
“monitor“,
“http://rels.zettajs.io/object-stream“
],
href: “ws://...”
}
]
Monitor resource events
before taking action.
» wscat -c ws://...
connected (press CTRL+C to quit)
< {"topic":"led/2/logs","timestamp":
1411809676901,"transition":"turn-on","input":[],"properties":
{"id":"2","type":"led","name":null,"state":"on"}}
< {"topic":"led/2/logs","timestamp":
1411809677548,"transition":"turn-off","input":[],"properties":
{"id":"2","type":"led","name":null,"state":"off"}}
< {"topic":"led/2/logs","timestamp":
1411809678483,"transition":"turn-on","input":[],"properties":
{"id":"2","type":"led","name":null,"state":"on"}}
< {"topic":"led/2/logs","timestamp":
1411809679126,"transition":"turn-off","input":[],"properties":
{"id":"2","type":"led","name":null,"state":"off"}}
We also need binary.
links: [
{
rel: [“http://rels.zettajs.io/binary-stream“],
href: “ws://...“,
type: “video/mpeg“,
}
]
We also need binary.
» wscat -c ws://...
connected (press CTRL+C to quit)
Q`rCEDˌDIp=`"3ss79:Yk}{` 5e`>9%J[K89z^> 8X Gp;W̮qXF
h1{%O;7<Bi‫.ڞ‬r r5
vyeK[X@ƯDRmT:uLz[‫ޱްޯޮޭެޫުީިާަޥޤޣޢޡޠޟޞޝޜޛޚޙޘޗޖޕޔޓޒޑސޏގލތދފމވއކޅބރނށހ‬V
.vK",,u!N8֝=LQ=s~ӆ`]{E6[
WȝM]3Uo|&n
Њmo('/K>2칩e,l{%`:<rtN|SXu曆psFJS*s#AB]ý0Rt_`uS}vX3ctA>kJfuΎ^L๖䜼V"u8GU
‫*ڹ‬
We also need binary.
» wscat -c ws://...
connected (press CTRL+C to quit)
Reactive Clients
var siren = require('siren');
!
siren()
.load('http://zetta-cloud-2.herokuapp.com')
.link('http://rels.zettajs.io/peer', 'Detroit')
.entity(function(e) {
return e.properties.type === 'sound';
})
.link('http://rels.zettajs.io/object-stream', 'level')
.monitor()
.subscribe(console.log);
Reactive Clients
var zrx = require('zrx');
!
zrx()
.load('http://zetta-cloud-2.herokuapp.com')
.server('Detroit')
.device(function(d) {
return d.type === 'sound';
})
.stream('level')
.subscribe(console.log);
It works!
Going Forward
Solve the producer-
consumer problem.
Reactive Stream Control
Protocol
• Consumer controlled streams
• Runs over WebSockets
• Multiplex streams
• URI scheme definition
• Will be supported on HTTP/2 + WebSockets.
What can you do with
streams?
• Monitoring values over time
• Distributed data processing
• Event sourcing
• Batches
// TODO:
• Extract reactive hypermedia framework from
Zetta internals.
• Produce a clean specification and
documentation.
• Experiment with multiple languages/platform
implementations.
Hit me up!
• kswiber@gmail.com
• https://twitter.com/kevinswiber
• https://linkedin.com/in/kevinswiber
• https://github.com/kevinswiber

More Related Content

What's hot

Introducing log analysis to your organization
Introducing log analysis to your organization Introducing log analysis to your organization
Introducing log analysis to your organization
Sematext Group, Inc.
 
Real-time data analysis using ELK
Real-time data analysis using ELKReal-time data analysis using ELK
Real-time data analysis using ELK
Jettro Coenradie
 
Intro to Big Data - Orlando Code Camp 2014
Intro to Big Data - Orlando Code Camp 2014Intro to Big Data - Orlando Code Camp 2014
Intro to Big Data - Orlando Code Camp 2014
John Ternent
 
Using OpenStack With Fog
Using OpenStack With FogUsing OpenStack With Fog
Using OpenStack With Fog
Mike Hagedorn
 
Security From The Big Data and Analytics Perspective
Security From The Big Data and Analytics PerspectiveSecurity From The Big Data and Analytics Perspective
Security From The Big Data and Analytics Perspective
All Things Open
 
ACES QuakeSim 2011
ACES QuakeSim 2011ACES QuakeSim 2011
ACES QuakeSim 2011
marpierc
 
Cloud Compliance with Open Policy Agent
Cloud Compliance with Open Policy AgentCloud Compliance with Open Policy Agent
Cloud Compliance with Open Policy Agent
QAware GmbH
 
The Next AMPLab: Real-Time, Intelligent, and Secure Computing
The Next AMPLab: Real-Time, Intelligent, and Secure ComputingThe Next AMPLab: Real-Time, Intelligent, and Secure Computing
The Next AMPLab: Real-Time, Intelligent, and Secure Computing
Spark Summit
 
Cosmos, Big Data GE implementation in FIWARE
Cosmos, Big Data GE implementation in FIWARECosmos, Big Data GE implementation in FIWARE
Cosmos, Big Data GE implementation in FIWARE
Fernando Lopez Aguilar
 
How to manage one million messages per second using Azure, Radu Vunvulea, ITD...
How to manage one million messages per second using Azure, Radu Vunvulea, ITD...How to manage one million messages per second using Azure, Radu Vunvulea, ITD...
How to manage one million messages per second using Azure, Radu Vunvulea, ITD...
Radu Vunvulea
 
Rethinking Syncing at AltConf 2019
Rethinking Syncing at AltConf 2019Rethinking Syncing at AltConf 2019
Rethinking Syncing at AltConf 2019
Joe Keeley
 
Using Riak for Events storage and analysis at Booking.com
Using Riak for Events storage and analysis at Booking.comUsing Riak for Events storage and analysis at Booking.com
Using Riak for Events storage and analysis at Booking.com
Damien Krotkine
 
Real-Time Log Analysis with Apache Mesos, Kafka and Cassandra
Real-Time Log Analysis with Apache Mesos, Kafka and CassandraReal-Time Log Analysis with Apache Mesos, Kafka and Cassandra
Real-Time Log Analysis with Apache Mesos, Kafka and Cassandra
Joe Stein
 
OPA: The Cloud Native Policy Engine
OPA: The Cloud Native Policy EngineOPA: The Cloud Native Policy Engine
OPA: The Cloud Native Policy Engine
Torin Sandall
 
Leveraging parse.com for Speedy Development
Leveraging parse.com for Speedy DevelopmentLeveraging parse.com for Speedy Development
Leveraging parse.com for Speedy Development
Andrew Kozlik
 
Spark Summit EU talk by John Musser
Spark Summit EU talk by John MusserSpark Summit EU talk by John Musser
Spark Summit EU talk by John Musser
Spark Summit
 
Dropwizard Internals
Dropwizard InternalsDropwizard Internals
Dropwizard Internals
carlo-rtr
 
Eagle from eBay at China Hadoop Summit 2015
Eagle from eBay at China Hadoop Summit 2015Eagle from eBay at China Hadoop Summit 2015
Eagle from eBay at China Hadoop Summit 2015
Hao Chen
 
Ubiquitous Solr - A Database's Not-So-Evil Twin: Presented by Ayon Sinha, Wal...
Ubiquitous Solr - A Database's Not-So-Evil Twin: Presented by Ayon Sinha, Wal...Ubiquitous Solr - A Database's Not-So-Evil Twin: Presented by Ayon Sinha, Wal...
Ubiquitous Solr - A Database's Not-So-Evil Twin: Presented by Ayon Sinha, Wal...
Lucidworks
 
Docker Usage Patterns - Meetup Docker Paris - November, 10th 2015
Docker Usage Patterns - Meetup Docker Paris - November, 10th 2015Docker Usage Patterns - Meetup Docker Paris - November, 10th 2015
Docker Usage Patterns - Meetup Docker Paris - November, 10th 2015
Datadog
 

What's hot (20)

Introducing log analysis to your organization
Introducing log analysis to your organization Introducing log analysis to your organization
Introducing log analysis to your organization
 
Real-time data analysis using ELK
Real-time data analysis using ELKReal-time data analysis using ELK
Real-time data analysis using ELK
 
Intro to Big Data - Orlando Code Camp 2014
Intro to Big Data - Orlando Code Camp 2014Intro to Big Data - Orlando Code Camp 2014
Intro to Big Data - Orlando Code Camp 2014
 
Using OpenStack With Fog
Using OpenStack With FogUsing OpenStack With Fog
Using OpenStack With Fog
 
Security From The Big Data and Analytics Perspective
Security From The Big Data and Analytics PerspectiveSecurity From The Big Data and Analytics Perspective
Security From The Big Data and Analytics Perspective
 
ACES QuakeSim 2011
ACES QuakeSim 2011ACES QuakeSim 2011
ACES QuakeSim 2011
 
Cloud Compliance with Open Policy Agent
Cloud Compliance with Open Policy AgentCloud Compliance with Open Policy Agent
Cloud Compliance with Open Policy Agent
 
The Next AMPLab: Real-Time, Intelligent, and Secure Computing
The Next AMPLab: Real-Time, Intelligent, and Secure ComputingThe Next AMPLab: Real-Time, Intelligent, and Secure Computing
The Next AMPLab: Real-Time, Intelligent, and Secure Computing
 
Cosmos, Big Data GE implementation in FIWARE
Cosmos, Big Data GE implementation in FIWARECosmos, Big Data GE implementation in FIWARE
Cosmos, Big Data GE implementation in FIWARE
 
How to manage one million messages per second using Azure, Radu Vunvulea, ITD...
How to manage one million messages per second using Azure, Radu Vunvulea, ITD...How to manage one million messages per second using Azure, Radu Vunvulea, ITD...
How to manage one million messages per second using Azure, Radu Vunvulea, ITD...
 
Rethinking Syncing at AltConf 2019
Rethinking Syncing at AltConf 2019Rethinking Syncing at AltConf 2019
Rethinking Syncing at AltConf 2019
 
Using Riak for Events storage and analysis at Booking.com
Using Riak for Events storage and analysis at Booking.comUsing Riak for Events storage and analysis at Booking.com
Using Riak for Events storage and analysis at Booking.com
 
Real-Time Log Analysis with Apache Mesos, Kafka and Cassandra
Real-Time Log Analysis with Apache Mesos, Kafka and CassandraReal-Time Log Analysis with Apache Mesos, Kafka and Cassandra
Real-Time Log Analysis with Apache Mesos, Kafka and Cassandra
 
OPA: The Cloud Native Policy Engine
OPA: The Cloud Native Policy EngineOPA: The Cloud Native Policy Engine
OPA: The Cloud Native Policy Engine
 
Leveraging parse.com for Speedy Development
Leveraging parse.com for Speedy DevelopmentLeveraging parse.com for Speedy Development
Leveraging parse.com for Speedy Development
 
Spark Summit EU talk by John Musser
Spark Summit EU talk by John MusserSpark Summit EU talk by John Musser
Spark Summit EU talk by John Musser
 
Dropwizard Internals
Dropwizard InternalsDropwizard Internals
Dropwizard Internals
 
Eagle from eBay at China Hadoop Summit 2015
Eagle from eBay at China Hadoop Summit 2015Eagle from eBay at China Hadoop Summit 2015
Eagle from eBay at China Hadoop Summit 2015
 
Ubiquitous Solr - A Database's Not-So-Evil Twin: Presented by Ayon Sinha, Wal...
Ubiquitous Solr - A Database's Not-So-Evil Twin: Presented by Ayon Sinha, Wal...Ubiquitous Solr - A Database's Not-So-Evil Twin: Presented by Ayon Sinha, Wal...
Ubiquitous Solr - A Database's Not-So-Evil Twin: Presented by Ayon Sinha, Wal...
 
Docker Usage Patterns - Meetup Docker Paris - November, 10th 2015
Docker Usage Patterns - Meetup Docker Paris - November, 10th 2015Docker Usage Patterns - Meetup Docker Paris - November, 10th 2015
Docker Usage Patterns - Meetup Docker Paris - November, 10th 2015
 

Similar to Using JavaScript to Put the "Internet" in IoT

Integrate Solr with real-time stream processing applications
Integrate Solr with real-time stream processing applicationsIntegrate Solr with real-time stream processing applications
Integrate Solr with real-time stream processing applications
thelabdude
 
IoT interoperability
IoT interoperabilityIoT interoperability
IoT interoperability
1248 Ltd.
 
Web_of_Things_2013
Web_of_Things_2013Web_of_Things_2013
Web_of_Things_2013
Max Kleiner
 
Why OpenStack on UCS? An Introduction to Red Hat and Cisco OpenStack Solution
Why OpenStack on UCS? An Introduction to Red Hat and Cisco OpenStack SolutionWhy OpenStack on UCS? An Introduction to Red Hat and Cisco OpenStack Solution
Why OpenStack on UCS? An Introduction to Red Hat and Cisco OpenStack Solution
Elizabeth Sale
 
Standard Provenance Reporting and Scientific Software Management in Virtual L...
Standard Provenance Reporting and Scientific Software Management in Virtual L...Standard Provenance Reporting and Scientific Software Management in Virtual L...
Standard Provenance Reporting and Scientific Software Management in Virtual L...
njcar
 
Improving the Efficiency of Cloud Infrastructures with Elastic Tandem Machine...
Improving the Efficiency of Cloud Infrastructures with Elastic Tandem Machine...Improving the Efficiency of Cloud Infrastructures with Elastic Tandem Machine...
Improving the Efficiency of Cloud Infrastructures with Elastic Tandem Machine...
Frank Dürr
 
Data encoding and Metadata for Streams
Data encoding and Metadata for StreamsData encoding and Metadata for Streams
Data encoding and Metadata for Streams
univalence
 
SRV408 Deep Dive on AWS IoT
SRV408 Deep Dive on AWS IoTSRV408 Deep Dive on AWS IoT
SRV408 Deep Dive on AWS IoT
Amazon Web Services
 
AWS IoT 深入探討
AWS IoT 深入探討AWS IoT 深入探討
AWS IoT 深入探討
Amazon Web Services
 
Building a system for machine and event-oriented data - Data Day Seattle 2015
Building a system for machine and event-oriented data - Data Day Seattle 2015Building a system for machine and event-oriented data - Data Day Seattle 2015
Building a system for machine and event-oriented data - Data Day Seattle 2015
Eric Sammer
 
High-Volume Data Collection and Real Time Analytics Using Redis
High-Volume Data Collection and Real Time Analytics Using RedisHigh-Volume Data Collection and Real Time Analytics Using Redis
High-Volume Data Collection and Real Time Analytics Using Redis
cacois
 
DNA: an overview
DNA: an overviewDNA: an overview
DNA: an overview
Cisco DevNet
 
Code PaLOUsa Azure IoT Workshop
Code PaLOUsa Azure IoT WorkshopCode PaLOUsa Azure IoT Workshop
Code PaLOUsa Azure IoT Workshop
Mike Branstein
 
Building a system for machine and event-oriented data with Rocana
Building a system for machine and event-oriented data with RocanaBuilding a system for machine and event-oriented data with Rocana
Building a system for machine and event-oriented data with Rocana
Treasure Data, Inc.
 
Building a system for machine and event-oriented data - SF HUG Nov 2015
Building a system for machine and event-oriented data - SF HUG Nov 2015Building a system for machine and event-oriented data - SF HUG Nov 2015
Building a system for machine and event-oriented data - SF HUG Nov 2015
Felicia Haggarty
 
From Device to Data Center to Insights
From Device to Data Center to InsightsFrom Device to Data Center to Insights
From Device to Data Center to Insights
DataWorks Summit/Hadoop Summit
 
How to over-engineer things and have fun? | Oto Brglez, OPALAB
How to over-engineer things and have fun? | Oto Brglez, OPALABHow to over-engineer things and have fun? | Oto Brglez, OPALAB
How to over-engineer things and have fun? | Oto Brglez, OPALAB
HostedbyConfluent
 
[DSC Europe 23] Pramod Immaneni - Real-time analytics at IoT scale
[DSC Europe 23] Pramod Immaneni - Real-time analytics at IoT scale[DSC Europe 23] Pramod Immaneni - Real-time analytics at IoT scale
[DSC Europe 23] Pramod Immaneni - Real-time analytics at IoT scale
DataScienceConferenc1
 
Building a system for machine and event-oriented data - Velocity, Santa Clara...
Building a system for machine and event-oriented data - Velocity, Santa Clara...Building a system for machine and event-oriented data - Velocity, Santa Clara...
Building a system for machine and event-oriented data - Velocity, Santa Clara...
Eric Sammer
 
Web of Things - Connecting People and Objects on the Web
Web of Things - Connecting People and Objects on the WebWeb of Things - Connecting People and Objects on the Web
Web of Things - Connecting People and Objects on the Web
Dominique Guinard
 

Similar to Using JavaScript to Put the "Internet" in IoT (20)

Integrate Solr with real-time stream processing applications
Integrate Solr with real-time stream processing applicationsIntegrate Solr with real-time stream processing applications
Integrate Solr with real-time stream processing applications
 
IoT interoperability
IoT interoperabilityIoT interoperability
IoT interoperability
 
Web_of_Things_2013
Web_of_Things_2013Web_of_Things_2013
Web_of_Things_2013
 
Why OpenStack on UCS? An Introduction to Red Hat and Cisco OpenStack Solution
Why OpenStack on UCS? An Introduction to Red Hat and Cisco OpenStack SolutionWhy OpenStack on UCS? An Introduction to Red Hat and Cisco OpenStack Solution
Why OpenStack on UCS? An Introduction to Red Hat and Cisco OpenStack Solution
 
Standard Provenance Reporting and Scientific Software Management in Virtual L...
Standard Provenance Reporting and Scientific Software Management in Virtual L...Standard Provenance Reporting and Scientific Software Management in Virtual L...
Standard Provenance Reporting and Scientific Software Management in Virtual L...
 
Improving the Efficiency of Cloud Infrastructures with Elastic Tandem Machine...
Improving the Efficiency of Cloud Infrastructures with Elastic Tandem Machine...Improving the Efficiency of Cloud Infrastructures with Elastic Tandem Machine...
Improving the Efficiency of Cloud Infrastructures with Elastic Tandem Machine...
 
Data encoding and Metadata for Streams
Data encoding and Metadata for StreamsData encoding and Metadata for Streams
Data encoding and Metadata for Streams
 
SRV408 Deep Dive on AWS IoT
SRV408 Deep Dive on AWS IoTSRV408 Deep Dive on AWS IoT
SRV408 Deep Dive on AWS IoT
 
AWS IoT 深入探討
AWS IoT 深入探討AWS IoT 深入探討
AWS IoT 深入探討
 
Building a system for machine and event-oriented data - Data Day Seattle 2015
Building a system for machine and event-oriented data - Data Day Seattle 2015Building a system for machine and event-oriented data - Data Day Seattle 2015
Building a system for machine and event-oriented data - Data Day Seattle 2015
 
High-Volume Data Collection and Real Time Analytics Using Redis
High-Volume Data Collection and Real Time Analytics Using RedisHigh-Volume Data Collection and Real Time Analytics Using Redis
High-Volume Data Collection and Real Time Analytics Using Redis
 
DNA: an overview
DNA: an overviewDNA: an overview
DNA: an overview
 
Code PaLOUsa Azure IoT Workshop
Code PaLOUsa Azure IoT WorkshopCode PaLOUsa Azure IoT Workshop
Code PaLOUsa Azure IoT Workshop
 
Building a system for machine and event-oriented data with Rocana
Building a system for machine and event-oriented data with RocanaBuilding a system for machine and event-oriented data with Rocana
Building a system for machine and event-oriented data with Rocana
 
Building a system for machine and event-oriented data - SF HUG Nov 2015
Building a system for machine and event-oriented data - SF HUG Nov 2015Building a system for machine and event-oriented data - SF HUG Nov 2015
Building a system for machine and event-oriented data - SF HUG Nov 2015
 
From Device to Data Center to Insights
From Device to Data Center to InsightsFrom Device to Data Center to Insights
From Device to Data Center to Insights
 
How to over-engineer things and have fun? | Oto Brglez, OPALAB
How to over-engineer things and have fun? | Oto Brglez, OPALABHow to over-engineer things and have fun? | Oto Brglez, OPALAB
How to over-engineer things and have fun? | Oto Brglez, OPALAB
 
[DSC Europe 23] Pramod Immaneni - Real-time analytics at IoT scale
[DSC Europe 23] Pramod Immaneni - Real-time analytics at IoT scale[DSC Europe 23] Pramod Immaneni - Real-time analytics at IoT scale
[DSC Europe 23] Pramod Immaneni - Real-time analytics at IoT scale
 
Building a system for machine and event-oriented data - Velocity, Santa Clara...
Building a system for machine and event-oriented data - Velocity, Santa Clara...Building a system for machine and event-oriented data - Velocity, Santa Clara...
Building a system for machine and event-oriented data - Velocity, Santa Clara...
 
Web of Things - Connecting People and Objects on the Web
Web of Things - Connecting People and Objects on the WebWeb of Things - Connecting People and Objects on the Web
Web of Things - Connecting People and Objects on the Web
 

Recently uploaded

Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Neo4j
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Pitangent Analytics & Technology Solutions Pvt. Ltd
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
Neo4j
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Neo4j
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Edge AI and Vision Alliance
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
AstuteBusiness
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
c5vrf27qcz
 

Recently uploaded (20)

Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
 
Artificial Intelligence and Electronic Warfare
Artificial Intelligence and Electronic WarfareArtificial Intelligence and Electronic Warfare
Artificial Intelligence and Electronic Warfare
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
 

Using JavaScript to Put the "Internet" in IoT

  • 1. Using JavaScript to Put the “Internet” in IoT @kevinswiber
  • 2. Open source platform for the Internet of Things http://zettajs.org
  • 5. Like control systems Sensor Actuator Controller Environment The Internet …but on the Internet
  • 6. More than 50B connected devices by 2020
  • 13. Protocols • HTTP/1.1 • WebSockets • SPDY • Future: HTTP/2
  • 14. Crossing Network Boundaries • Access • Interaction • Streaming
  • 15. Why Node? • Evented, async • Open Source • Cross-platform • Because you know JavaScript!
  • 18. Desired Architectural Properties • Decoupling of implementations • Independent evolution • Scale • Load balancing • Centralize complexity, distribute simplicity • Reduce latency • Support event streams
  • 19. Architectural Constraints • Client-server, stateless, cacheable, layered system, uniform interface, etc. Wait, isn’t that REST?
  • 20. The hypest of all media! http://sirenspec.org
  • 21. What about event streams?
  • 22. How streams are done over HTTP today • WebHooks • Chunked Transfer-Encoding • HTTP Pipelining • Long Polling • Server Sent Events X X X X X
  • 24. Zetta Process Zetta Components Scouts Drivers Apps create observe
  • 25. Model drivers as finite state machines LED.prototype.init = function(config) { config .type('led') .state('off') .when('off', { allow: ['turn-on'] }) .when('on', { allow: ['turn-off'] }) .map('turn-on', this.turnOn) .map('turn-off', this.turnOff); };
  • 26. Transitions are represented as affordances in the API. "actions": [ { "name": "turn-on", "method": "POST", "href": “...”, "fields": [ { "name": "action", "type": "hidden", "value": "turn-on" } ] } ]
  • 27. We need to consume an object stream. links: [ { title: “pulse“, rel: [“http://rels.zettajs.io/object-stream“], href: “ws://...” } ]
  • 28. We need to consume an object stream. » wscat -c ws://... connected (press CTRL+C to quit) < {"topic":"heartbeat/1/pulse","timestamp":1411757412119,"data":61} < {"topic":"heartbeat/1/pulse","timestamp":1411757412620,"data":65} < {"topic":"heartbeat/1/pulse","timestamp":1411757413121,"data":69} < {"topic":"heartbeat/1/pulse","timestamp":1411757413622,"data":71} < {"topic":"heartbeat/1/pulse","timestamp":1411757414124,"data":66} < {"topic":"heartbeat/1/pulse","timestamp":1411757414626,"data":64} < {"topic":"heartbeat/1/pulse","timestamp":1411757415128,"data":68} < {"topic":"heartbeat/1/pulse","timestamp":1411757415629,"data":63} < {"topic":"heartbeat/1/pulse","timestamp":1411757416130,"data":65} < {"topic":"heartbeat/1/pulse","timestamp":1411757416631,"data":63}
  • 29. Monitor resource events before taking action. links: [ { title: “logs“, rel: [ “monitor“, “http://rels.zettajs.io/object-stream“ ], href: “ws://...” } ]
  • 30. Monitor resource events before taking action. » wscat -c ws://... connected (press CTRL+C to quit) < {"topic":"led/2/logs","timestamp": 1411809676901,"transition":"turn-on","input":[],"properties": {"id":"2","type":"led","name":null,"state":"on"}} < {"topic":"led/2/logs","timestamp": 1411809677548,"transition":"turn-off","input":[],"properties": {"id":"2","type":"led","name":null,"state":"off"}} < {"topic":"led/2/logs","timestamp": 1411809678483,"transition":"turn-on","input":[],"properties": {"id":"2","type":"led","name":null,"state":"on"}} < {"topic":"led/2/logs","timestamp": 1411809679126,"transition":"turn-off","input":[],"properties": {"id":"2","type":"led","name":null,"state":"off"}}
  • 31. We also need binary. links: [ { rel: [“http://rels.zettajs.io/binary-stream“], href: “ws://...“, type: “video/mpeg“, } ]
  • 32. We also need binary. » wscat -c ws://... connected (press CTRL+C to quit) Q`rCEDˌDIp=`"3ss79:Yk}{` 5e`>9%J[K89z^> 8X Gp;W̮qXF h1{%O;7<Bi‫.ڞ‬r r5 vyeK[X@ƯDRmT:uLz[‫ޱްޯޮޭެޫުީިާަޥޤޣޢޡޠޟޞޝޜޛޚޙޘޗޖޕޔޓޒޑސޏގލތދފމވއކޅބރނށހ‬V .vK",,u!N8֝=LQ=s~ӆ`]{E6[ WȝM]3Uo|&n Њmo('/K>2칩e,l{%`:<rtN|SXu曆psFJS*s#AB]ý0Rt_`uS}vX3ctA>kJfuΎ^L๖䜼V"u8GU ‫*ڹ‬
  • 33. We also need binary. » wscat -c ws://... connected (press CTRL+C to quit)
  • 34. Reactive Clients var siren = require('siren'); ! siren() .load('http://zetta-cloud-2.herokuapp.com') .link('http://rels.zettajs.io/peer', 'Detroit') .entity(function(e) { return e.properties.type === 'sound'; }) .link('http://rels.zettajs.io/object-stream', 'level') .monitor() .subscribe(console.log);
  • 35. Reactive Clients var zrx = require('zrx'); ! zrx() .load('http://zetta-cloud-2.herokuapp.com') .server('Detroit') .device(function(d) { return d.type === 'sound'; }) .stream('level') .subscribe(console.log);
  • 39. Reactive Stream Control Protocol • Consumer controlled streams • Runs over WebSockets • Multiplex streams • URI scheme definition • Will be supported on HTTP/2 + WebSockets.
  • 40. What can you do with streams? • Monitoring values over time • Distributed data processing • Event sourcing • Batches
  • 41. // TODO: • Extract reactive hypermedia framework from Zetta internals. • Produce a clean specification and documentation. • Experiment with multiple languages/platform implementations.
  • 42. Hit me up! • kswiber@gmail.com • https://twitter.com/kevinswiber • https://linkedin.com/in/kevinswiber • https://github.com/kevinswiber