SlideShare ist ein Scribd-Unternehmen logo
1 von 45
Programming
for the
Internet of Things
Peter Hoddie
@phoddie
@kinoma
#ieee
January 9, 2016
@kinoma
Overview
• Looking ahead five years, based on what is happening
today.
• What does the code we program need to do?
• How will we be writing that code?
• Who will be doing the programming?
@kinoma
@kinoma
Consumer IoT
@kinoma
Consumer expectations
• These things are better than their predecessors
• Do more
• More configurable
• More reliable
• These things can work together with other things to
do even more useful stuff
@kinoma
Two kinds of standards
• To underpin markets
where massive
investment needed
• DVD (manufacturing
factories)
• 5G (cell towers)
• Wi-Fi (chips)
• MPEG compression
(silicon, software,
toolchain)
• To formalize (and
clean-up) existing
practice
• HTTP
• JSON
• JavaScript
• HTML
• MPEG-4 file format
@kinoma
Standards in IoT
• Industry impulse is to
create a new standard
• Define boundaries of
new product
categories
• Ensure interoperability
@kinoma
Everyone is trying
@kinoma
Too much. Too soon.
• It isn’t obvious what we want to do in the big picture
• Trying to create “underpinning” standards
• Not necessary for this market – investment level is
already unbelievably high
• Leading to bad standards
• Too much functionality
• Allow for too many possible futures
• Too big and complex to be practical
@kinoma
IoT needs time to evolve
• Experiments to discover what is possible
• Experience to know what works in the real world
• Too early for new standards
• Plenty of existing standards to build on
• Many suggest sending everything through the cloud
• Cloud acts as intermediary between devices and services
• Problems
• Too much data
• Internet isn’t always available
• Who’s cloud?
• Security – moving data around unnecessarily @kinoma
The cloud
• Devices must be able to communicate directly with
• Any cloud service
• Any other IoT device
• Any mobile app
@kinoma
Direct
@kinoma
@kinoma
The Killer App for IoT is the same as the
Killer App for PC and mobile:
The ability to run the apps you choose.
@kinoma
No single killer app
@kinoma
User-installed apps on IoT devices?
• Devices aren’t powerful enough.
• Too difficult for anyone but the most experienced
embedded programmers.
• It won’t be reliable.
• A security nightmare.
Insanity!
Let’s explore the insanity
@kinoma
Let’s use a standard to help
• JavaScript is the closest thing we have to a
universal programming language
Web (Desktop)
Mobile (Apps and Web)
Server
Embedded
@kinoma
High level programming languages
on embedded systems
Relatedly, writing software to control drones,
vending machines, and dishwashers has become
as easy as spinning up a website. Fast, efficient
processors … are turning JavaScript into a
popular embedded programming language—
unthinkable less than a decade ago.
JavaScript for IoT
@kinoma
• JSON built in – de facto data format of the
web
• Exceptionally portable – OS independent
• Helps eliminate memory leaks so devices
can run for a very long time – garbage
collector
Secure foundation
@kinoma
• Sandbox
• Core language provides no access to network, files, hardware,
screen, audio, etc.
• Scripts can only see and do what the system designer chooses
to provide
• Secure – many classes of security flaws in native code are
nonexistent
• Uninitialized memory
• Stack overflow
• Buffer overruns
• Mal-formed data injection
First truly major enhancements to the language.
ES6 contains more than 400 individual changes
including:
• Classes – familiar tool for inheritance
• Promises – clean, consistent asynchronous
operation
• Modules – reusable code libraries
• ArrayBuffer – work with binary data
JavaScript 6th Edition – Features for IoT
@kinoma
@kinoma
How small a system can run
JavaScript?
• 512 KB RAM
• 200 MHz ARM Cortex M4
• Wi-Fi b/g
• Most complete ES6 implementation anywhere
• Open source
What does JavaScript for
IoT devices look like?
@kinoma
HTTP Client
let HTTPClient = require("HTTPClient");
let http = new HTTPClient(url);
http.onTransferComplete = function(status) {
trace(`Transfer complete : ${status}n`);
};
http.onDataReady = function(buffer) {
trace(String.fromArrayBuffer(buffer));
};
http.start();
@kinoma
HTTP Server
let HTTPServer = require("HTTPServer");
let server = new HTTPServer({port: 80});
server.onRequest = function(request) {
trace(`new request: url = ${request.url}n`);
request.addHeader("Connection", "close");
request.response();
};
@kinoma
I2C Accelerometer
let accel = new I2C(1, 0x53);
let id = accel.readChar(0x00);
if (0xE5 != id)
throw new Error(`unrecognized id: ${id}`);
accel.write(0x2d, [0x08]);
accel.write(0x38, [(0x01 << 6) | 0x1f]);
let status = accel.readByte(0x39);
let tmp = accel.readByte(0x32);
let x = (tmp << 8) | accel.readByte(0x33);
tmp = accel.readByte(0x34);
let y = (tmp << 8) | accel.readByte(0x35);
tmp = accel.readByte(0x36);
let z = (tmp << 8) | accel.readByte(0x37);
@kinoma
Adding ES6 to your product
• Just a few steps to get the basics working
• Get XS6 from GitHub
• Build it with your product
• Entirely ANSI C – likely builds as-is
• All host OS dependencies in three files
xs6Host.c, xs6Platform.h, and xs6Platform.6
• Update as needed for your host OS / RTOS
@kinoma
Hello World
/* test.js */
trace("Hello, world!n");
@kinoma
Hosting scripts in your code
#include <xs.h>
int main(int argc, char* argv[])
{
xsCreation creation = {
128 * 1024 * 1024,/* initial chunk size */
16 * 1024 * 1024, /* incremental chunk size */
8 * 1024 * 1024, /* initial heap slot count */
1 * 1024 * 1024, /* incremental heap slot count */
4 * 1024, /* stack slot count */
12 * 1024, /* key slot count */
1993, /* name modulo */
127 /* symbol modulo */
};
xsMachine* machine = xsCreateMachine(&creation, NULL,"my virtual machine", NULL);
xsBeginHost(machine);
xsRunProgram(argv(1));
xsEndHost(machine);
xsDeleteMachine(machine);
return 0;
}
Reading environment variables
To allow a script to do this trace(getenv("XS6") + "n");
trace(getenv("XSBUG_HOST") + "n");
xsResult = xsNewHostFunction(xs_getenv, 1);
xsSet(xsGlobal, xsID("getenv"), xsResult);
void xs_getenv(xsMachine* the)
{
xsStringValue result = getenv(xsToString(xsArg(0)));
if (result)
xsResult = xsString(result);
}
Implement xs_getenv in C
Add getenv function to
the virtual machine
Going deeper
• JavaScript is also great for building the
product
• App logic
• Communication
• Network protocols
• Hardware
@kinoma
@kinoma
Why use JavaScript to build your
product?
• Get it working faster
• Iterate incredibly fast
• Leverage code and techniques
developed by other JS developers
• Hardware independent; easy to re-use
in your next generation
• Re-use JavaScript code with Node.js cloud
service, mobile apps, and web pages
• Much easier to find JavaScript
programmers
Avoid the “100% pure” trap
• It doesn’t make sense to code
everything in script
• Native code is great
• Fast
• Access to native functionality
• Access to hardware functions
• Re-use of proven, reliable code
• Secure
@kinoma
But, you may say
JavaScript isn’t type
safe. My manager
insists….
JavaScript isn’t good
for big projects.
Google told me… Modules
JavaScript
isn’t fast
Programming is for more people
than you may imagine
Everyone can configure IoT devices
with mobile apps
IFTTT goes the next step with simple
rules
Visual programming is powerful,
an on-ramp to “real” coding
JavaScript has proven to be accessible
to designers, students, and engineers
@kinoma
Scriptable is scalable
• Your organization can’t implement everything itself
• Interactions with other devices
• Mobile experience
• Interactions with cloud service
• Building partnerships directly is slow, expensive, and limited
• Opening your product to Apps let’s individuals and
companies integrate your product with theirs
• Brings new abilities, new customers, access to new
markets
@kinoma
Scriptable IoT will lead us to the
right standards
• New “standard objects” for IoT to augment JavaScript built-
ins
• Common programming models
• Modules / libraries that are common across devices
• Perhaps enhancements to JavaScript for needs of IoT
@kinoma
Scriptable will realize potential of IoT
• We can’t organize to connect all
these devices and services
together
• This is not a central design /
control problem
• Organic exploration and growth
• Consumers will get the magic they
expect, just as the mobile app
ecosystem snapped into place
Thankyou!
Peter Hoddie
@phoddie
@kinoma
kinoma.com
Questions?
Peter Hoddie
@phoddie
@kinoma
kinoma.com

Weitere ähnliche Inhalte

Was ist angesagt?

001 osn 9800 m wdm series main slides 202008-v1-r19c10-mo (1) (002)
001 osn 9800 m wdm series main slides 202008-v1-r19c10-mo (1) (002)001 osn 9800 m wdm series main slides 202008-v1-r19c10-mo (1) (002)
001 osn 9800 m wdm series main slides 202008-v1-r19c10-mo (1) (002)victoriovega
 
Internet of things and wireless sensor networks
Internet of things and wireless sensor networksInternet of things and wireless sensor networks
Internet of things and wireless sensor networksRonald Mutezo
 
Introduction to Things board (An Open Source IoT Cloud Platform)
Introduction to Things board (An Open Source IoT Cloud Platform)Introduction to Things board (An Open Source IoT Cloud Platform)
Introduction to Things board (An Open Source IoT Cloud Platform)Amarjeetsingh Thakur
 
FPGA IMPLIMENTATION OF UART CONTTROLLER
FPGA IMPLIMENTATION OF UART CONTTROLLERFPGA IMPLIMENTATION OF UART CONTTROLLER
FPGA IMPLIMENTATION OF UART CONTTROLLERVarun Kambrath
 
Beginners: Bandwidth, Throughput, Latency & Jitter in mobile networks
Beginners: Bandwidth, Throughput, Latency & Jitter in mobile networksBeginners: Bandwidth, Throughput, Latency & Jitter in mobile networks
Beginners: Bandwidth, Throughput, Latency & Jitter in mobile networks3G4G
 
User datagram protocol (udp)
User datagram protocol (udp)User datagram protocol (udp)
User datagram protocol (udp)Ramola Dhande
 
Synchronisation and Time Distribution in Modern Telecommunications Networks
Synchronisation and Time Distribution in Modern Telecommunications NetworksSynchronisation and Time Distribution in Modern Telecommunications Networks
Synchronisation and Time Distribution in Modern Telecommunications Networks3G4G
 
Why and How to Interconnect IXP
Why and How to Interconnect IXPWhy and How to Interconnect IXP
Why and How to Interconnect IXPInternet Society
 
OTN for Beginners
OTN for BeginnersOTN for Beginners
OTN for BeginnersMapYourTech
 
10G SFP+ Fiber Optic Transceivers and SFP+ DAC Data Sheet
10G SFP+ Fiber Optic Transceivers and SFP+ DAC Data Sheet10G SFP+ Fiber Optic Transceivers and SFP+ DAC Data Sheet
10G SFP+ Fiber Optic Transceivers and SFP+ DAC Data SheetAlice Gui
 
Embedded system design process_models
Embedded system design process_modelsEmbedded system design process_models
Embedded system design process_modelsRavi Selvaraj
 
10 gigabit ethernet technology
10 gigabit ethernet technology10 gigabit ethernet technology
10 gigabit ethernet technologySajan Sahu
 
3GPP_Overall_Architecture_and_Specifications.pdf
3GPP_Overall_Architecture_and_Specifications.pdf3GPP_Overall_Architecture_and_Specifications.pdf
3GPP_Overall_Architecture_and_Specifications.pdfAbubakar416712
 
ESP32 WiFi & Bluetooth Module - Getting Started Guide
ESP32 WiFi & Bluetooth Module - Getting Started GuideESP32 WiFi & Bluetooth Module - Getting Started Guide
ESP32 WiFi & Bluetooth Module - Getting Started Guidehandson28
 

Was ist angesagt? (20)

001 osn 9800 m wdm series main slides 202008-v1-r19c10-mo (1) (002)
001 osn 9800 m wdm series main slides 202008-v1-r19c10-mo (1) (002)001 osn 9800 m wdm series main slides 202008-v1-r19c10-mo (1) (002)
001 osn 9800 m wdm series main slides 202008-v1-r19c10-mo (1) (002)
 
Internet of things and wireless sensor networks
Internet of things and wireless sensor networksInternet of things and wireless sensor networks
Internet of things and wireless sensor networks
 
COMPUTER NETWORKS UNIT 2
COMPUTER NETWORKS UNIT 2COMPUTER NETWORKS UNIT 2
COMPUTER NETWORKS UNIT 2
 
Introduction to Things board (An Open Source IoT Cloud Platform)
Introduction to Things board (An Open Source IoT Cloud Platform)Introduction to Things board (An Open Source IoT Cloud Platform)
Introduction to Things board (An Open Source IoT Cloud Platform)
 
FPGA IMPLIMENTATION OF UART CONTTROLLER
FPGA IMPLIMENTATION OF UART CONTTROLLERFPGA IMPLIMENTATION OF UART CONTTROLLER
FPGA IMPLIMENTATION OF UART CONTTROLLER
 
Raspberry pi
Raspberry piRaspberry pi
Raspberry pi
 
Beginners: Bandwidth, Throughput, Latency & Jitter in mobile networks
Beginners: Bandwidth, Throughput, Latency & Jitter in mobile networksBeginners: Bandwidth, Throughput, Latency & Jitter in mobile networks
Beginners: Bandwidth, Throughput, Latency & Jitter in mobile networks
 
Transport layer protocols : TCP and UDP
Transport layer protocols  : TCP and UDPTransport layer protocols  : TCP and UDP
Transport layer protocols : TCP and UDP
 
Chapter 3 esy
Chapter 3 esy Chapter 3 esy
Chapter 3 esy
 
User datagram protocol (udp)
User datagram protocol (udp)User datagram protocol (udp)
User datagram protocol (udp)
 
Synchronisation and Time Distribution in Modern Telecommunications Networks
Synchronisation and Time Distribution in Modern Telecommunications NetworksSynchronisation and Time Distribution in Modern Telecommunications Networks
Synchronisation and Time Distribution in Modern Telecommunications Networks
 
Why and How to Interconnect IXP
Why and How to Interconnect IXPWhy and How to Interconnect IXP
Why and How to Interconnect IXP
 
OTN for Beginners
OTN for BeginnersOTN for Beginners
OTN for Beginners
 
10G SFP+ Fiber Optic Transceivers and SFP+ DAC Data Sheet
10G SFP+ Fiber Optic Transceivers and SFP+ DAC Data Sheet10G SFP+ Fiber Optic Transceivers and SFP+ DAC Data Sheet
10G SFP+ Fiber Optic Transceivers and SFP+ DAC Data Sheet
 
Embedded system design process_models
Embedded system design process_modelsEmbedded system design process_models
Embedded system design process_models
 
10 gigabit ethernet technology
10 gigabit ethernet technology10 gigabit ethernet technology
10 gigabit ethernet technology
 
3GPP_Overall_Architecture_and_Specifications.pdf
3GPP_Overall_Architecture_and_Specifications.pdf3GPP_Overall_Architecture_and_Specifications.pdf
3GPP_Overall_Architecture_and_Specifications.pdf
 
rs-232
rs-232rs-232
rs-232
 
ESP32 WiFi & Bluetooth Module - Getting Started Guide
ESP32 WiFi & Bluetooth Module - Getting Started GuideESP32 WiFi & Bluetooth Module - Getting Started Guide
ESP32 WiFi & Bluetooth Module - Getting Started Guide
 
Multicast address
Multicast addressMulticast address
Multicast address
 

Ähnlich wie Programming for the Internet of Things

APIs for the Internet of Things
APIs for the Internet of ThingsAPIs for the Internet of Things
APIs for the Internet of ThingsKinoma
 
The Internet of Fails - Mark Stanislav, Senior Security Consultant, Rapid7
The Internet of Fails - Mark Stanislav, Senior Security Consultant, Rapid7The Internet of Fails - Mark Stanislav, Senior Security Consultant, Rapid7
The Internet of Fails - Mark Stanislav, Senior Security Consultant, Rapid7Rapid7
 
13 practical tips for writing secure golang applications
13 practical tips for writing secure golang applications13 practical tips for writing secure golang applications
13 practical tips for writing secure golang applicationsKarthik Gaekwad
 
Transforming Consumer Banking with a 100% Cloud-Based Bank (FSV204) - AWS re:...
Transforming Consumer Banking with a 100% Cloud-Based Bank (FSV204) - AWS re:...Transforming Consumer Banking with a 100% Cloud-Based Bank (FSV204) - AWS re:...
Transforming Consumer Banking with a 100% Cloud-Based Bank (FSV204) - AWS re:...Amazon Web Services
 
Abusing bleeding edge web standards for appsec glory
Abusing bleeding edge web standards for appsec gloryAbusing bleeding edge web standards for appsec glory
Abusing bleeding edge web standards for appsec gloryPriyanka Aash
 
IoT is Something to Figure Out
IoT is Something to Figure OutIoT is Something to Figure Out
IoT is Something to Figure OutPeter Hoddie
 
Android lessons you won't learn in school
Android lessons you won't learn in schoolAndroid lessons you won't learn in school
Android lessons you won't learn in schoolMichael Galpin
 
The hardcore stuff i hack, experiences from past VAPT assignments
The hardcore stuff i hack, experiences from past VAPT assignmentsThe hardcore stuff i hack, experiences from past VAPT assignments
The hardcore stuff i hack, experiences from past VAPT assignmentsn|u - The Open Security Community
 
Coding Secure Infrastructure in the Cloud using the PIE framework
Coding Secure Infrastructure in the Cloud using the PIE frameworkCoding Secure Infrastructure in the Cloud using the PIE framework
Coding Secure Infrastructure in the Cloud using the PIE frameworkJames Wickett
 
Iot meets Serverless
Iot meets ServerlessIot meets Serverless
Iot meets ServerlessNarendran R
 
DevOpsCon 2015 - DevOps in Mobile Games
DevOpsCon 2015 - DevOps in Mobile GamesDevOpsCon 2015 - DevOps in Mobile Games
DevOpsCon 2015 - DevOps in Mobile GamesAndreas Katzig
 
CSW2017 Yuhao song+Huimingliu cyber_wmd_vulnerable_IoT
CSW2017 Yuhao song+Huimingliu cyber_wmd_vulnerable_IoTCSW2017 Yuhao song+Huimingliu cyber_wmd_vulnerable_IoT
CSW2017 Yuhao song+Huimingliu cyber_wmd_vulnerable_IoTCanSecWest
 
The Hacking Games - A Road to Post Exploitation Meetup - 20240222.pptx
The Hacking Games - A Road to Post Exploitation Meetup - 20240222.pptxThe Hacking Games - A Road to Post Exploitation Meetup - 20240222.pptx
The Hacking Games - A Road to Post Exploitation Meetup - 20240222.pptxlior mazor
 
5 Steps To Deliver The Fastest Mobile Shopping Experience This Holiday Season
5 Steps To Deliver The Fastest Mobile Shopping Experience This Holiday Season5 Steps To Deliver The Fastest Mobile Shopping Experience This Holiday Season
5 Steps To Deliver The Fastest Mobile Shopping Experience This Holiday SeasonG3 Communications
 
Controlling your home with IoT Hub
Controlling your home with IoT HubControlling your home with IoT Hub
Controlling your home with IoT HubStamatis Pavlis
 
Kuby, ActiveDeployment for Rails Apps
Kuby, ActiveDeployment for Rails AppsKuby, ActiveDeployment for Rails Apps
Kuby, ActiveDeployment for Rails AppsCameron Dutro
 
Netflix oss season 2 episode 1 - meetup Lightning talks
Netflix oss   season 2 episode 1 - meetup Lightning talksNetflix oss   season 2 episode 1 - meetup Lightning talks
Netflix oss season 2 episode 1 - meetup Lightning talksRuslan Meshenberg
 

Ähnlich wie Programming for the Internet of Things (20)

APIs for the Internet of Things
APIs for the Internet of ThingsAPIs for the Internet of Things
APIs for the Internet of Things
 
The Internet of Fails - Mark Stanislav, Senior Security Consultant, Rapid7
The Internet of Fails - Mark Stanislav, Senior Security Consultant, Rapid7The Internet of Fails - Mark Stanislav, Senior Security Consultant, Rapid7
The Internet of Fails - Mark Stanislav, Senior Security Consultant, Rapid7
 
13 practical tips for writing secure golang applications
13 practical tips for writing secure golang applications13 practical tips for writing secure golang applications
13 practical tips for writing secure golang applications
 
Transforming Consumer Banking with a 100% Cloud-Based Bank (FSV204) - AWS re:...
Transforming Consumer Banking with a 100% Cloud-Based Bank (FSV204) - AWS re:...Transforming Consumer Banking with a 100% Cloud-Based Bank (FSV204) - AWS re:...
Transforming Consumer Banking with a 100% Cloud-Based Bank (FSV204) - AWS re:...
 
Abusing bleeding edge web standards for appsec glory
Abusing bleeding edge web standards for appsec gloryAbusing bleeding edge web standards for appsec glory
Abusing bleeding edge web standards for appsec glory
 
IoT is Something to Figure Out
IoT is Something to Figure OutIoT is Something to Figure Out
IoT is Something to Figure Out
 
Android lessons you won't learn in school
Android lessons you won't learn in schoolAndroid lessons you won't learn in school
Android lessons you won't learn in school
 
The hardcore stuff i hack, experiences from past VAPT assignments
The hardcore stuff i hack, experiences from past VAPT assignmentsThe hardcore stuff i hack, experiences from past VAPT assignments
The hardcore stuff i hack, experiences from past VAPT assignments
 
Coding Secure Infrastructure in the Cloud using the PIE framework
Coding Secure Infrastructure in the Cloud using the PIE frameworkCoding Secure Infrastructure in the Cloud using the PIE framework
Coding Secure Infrastructure in the Cloud using the PIE framework
 
Iot meets Serverless
Iot meets ServerlessIot meets Serverless
Iot meets Serverless
 
DevOpsCon 2015 - DevOps in Mobile Games
DevOpsCon 2015 - DevOps in Mobile GamesDevOpsCon 2015 - DevOps in Mobile Games
DevOpsCon 2015 - DevOps in Mobile Games
 
20120306 dublin js
20120306 dublin js20120306 dublin js
20120306 dublin js
 
Ankit Vakil (2)
Ankit Vakil (2)Ankit Vakil (2)
Ankit Vakil (2)
 
CSW2017 Yuhao song+Huimingliu cyber_wmd_vulnerable_IoT
CSW2017 Yuhao song+Huimingliu cyber_wmd_vulnerable_IoTCSW2017 Yuhao song+Huimingliu cyber_wmd_vulnerable_IoT
CSW2017 Yuhao song+Huimingliu cyber_wmd_vulnerable_IoT
 
The Hacking Games - A Road to Post Exploitation Meetup - 20240222.pptx
The Hacking Games - A Road to Post Exploitation Meetup - 20240222.pptxThe Hacking Games - A Road to Post Exploitation Meetup - 20240222.pptx
The Hacking Games - A Road to Post Exploitation Meetup - 20240222.pptx
 
5 Steps To Deliver The Fastest Mobile Shopping Experience This Holiday Season
5 Steps To Deliver The Fastest Mobile Shopping Experience This Holiday Season5 Steps To Deliver The Fastest Mobile Shopping Experience This Holiday Season
5 Steps To Deliver The Fastest Mobile Shopping Experience This Holiday Season
 
Controlling your home with IoT Hub
Controlling your home with IoT HubControlling your home with IoT Hub
Controlling your home with IoT Hub
 
Kuby, ActiveDeployment for Rails Apps
Kuby, ActiveDeployment for Rails AppsKuby, ActiveDeployment for Rails Apps
Kuby, ActiveDeployment for Rails Apps
 
Netflix oss season 2 episode 1 - meetup Lightning talks
Netflix oss   season 2 episode 1 - meetup Lightning talksNetflix oss   season 2 episode 1 - meetup Lightning talks
Netflix oss season 2 episode 1 - meetup Lightning talks
 
Node
NodeNode
Node
 

Kürzlich hochgeladen

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 

Kürzlich hochgeladen (20)

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 

Programming for the Internet of Things

  • 1. Programming for the Internet of Things Peter Hoddie @phoddie @kinoma #ieee January 9, 2016
  • 2. @kinoma Overview • Looking ahead five years, based on what is happening today. • What does the code we program need to do? • How will we be writing that code? • Who will be doing the programming?
  • 5. @kinoma Consumer expectations • These things are better than their predecessors • Do more • More configurable • More reliable • These things can work together with other things to do even more useful stuff
  • 6. @kinoma Two kinds of standards • To underpin markets where massive investment needed • DVD (manufacturing factories) • 5G (cell towers) • Wi-Fi (chips) • MPEG compression (silicon, software, toolchain) • To formalize (and clean-up) existing practice • HTTP • JSON • JavaScript • HTML • MPEG-4 file format
  • 7. @kinoma Standards in IoT • Industry impulse is to create a new standard • Define boundaries of new product categories • Ensure interoperability
  • 9. @kinoma Too much. Too soon. • It isn’t obvious what we want to do in the big picture • Trying to create “underpinning” standards • Not necessary for this market – investment level is already unbelievably high • Leading to bad standards • Too much functionality • Allow for too many possible futures • Too big and complex to be practical
  • 10. @kinoma IoT needs time to evolve • Experiments to discover what is possible • Experience to know what works in the real world • Too early for new standards • Plenty of existing standards to build on
  • 11. • Many suggest sending everything through the cloud • Cloud acts as intermediary between devices and services • Problems • Too much data • Internet isn’t always available • Who’s cloud? • Security – moving data around unnecessarily @kinoma The cloud
  • 12. • Devices must be able to communicate directly with • Any cloud service • Any other IoT device • Any mobile app @kinoma Direct
  • 15. The Killer App for IoT is the same as the Killer App for PC and mobile: The ability to run the apps you choose. @kinoma No single killer app
  • 16. @kinoma User-installed apps on IoT devices? • Devices aren’t powerful enough. • Too difficult for anyone but the most experienced embedded programmers. • It won’t be reliable. • A security nightmare. Insanity!
  • 18. @kinoma Let’s use a standard to help • JavaScript is the closest thing we have to a universal programming language Web (Desktop) Mobile (Apps and Web) Server Embedded
  • 19. @kinoma High level programming languages on embedded systems Relatedly, writing software to control drones, vending machines, and dishwashers has become as easy as spinning up a website. Fast, efficient processors … are turning JavaScript into a popular embedded programming language— unthinkable less than a decade ago.
  • 20. JavaScript for IoT @kinoma • JSON built in – de facto data format of the web • Exceptionally portable – OS independent • Helps eliminate memory leaks so devices can run for a very long time – garbage collector
  • 21. Secure foundation @kinoma • Sandbox • Core language provides no access to network, files, hardware, screen, audio, etc. • Scripts can only see and do what the system designer chooses to provide • Secure – many classes of security flaws in native code are nonexistent • Uninitialized memory • Stack overflow • Buffer overruns • Mal-formed data injection
  • 22. First truly major enhancements to the language. ES6 contains more than 400 individual changes including: • Classes – familiar tool for inheritance • Promises – clean, consistent asynchronous operation • Modules – reusable code libraries • ArrayBuffer – work with binary data JavaScript 6th Edition – Features for IoT @kinoma
  • 23. @kinoma How small a system can run JavaScript? • 512 KB RAM • 200 MHz ARM Cortex M4 • Wi-Fi b/g • Most complete ES6 implementation anywhere • Open source
  • 24. What does JavaScript for IoT devices look like?
  • 25. @kinoma HTTP Client let HTTPClient = require("HTTPClient"); let http = new HTTPClient(url); http.onTransferComplete = function(status) { trace(`Transfer complete : ${status}n`); }; http.onDataReady = function(buffer) { trace(String.fromArrayBuffer(buffer)); }; http.start();
  • 26. @kinoma HTTP Server let HTTPServer = require("HTTPServer"); let server = new HTTPServer({port: 80}); server.onRequest = function(request) { trace(`new request: url = ${request.url}n`); request.addHeader("Connection", "close"); request.response(); };
  • 27. @kinoma I2C Accelerometer let accel = new I2C(1, 0x53); let id = accel.readChar(0x00); if (0xE5 != id) throw new Error(`unrecognized id: ${id}`); accel.write(0x2d, [0x08]); accel.write(0x38, [(0x01 << 6) | 0x1f]); let status = accel.readByte(0x39); let tmp = accel.readByte(0x32); let x = (tmp << 8) | accel.readByte(0x33); tmp = accel.readByte(0x34); let y = (tmp << 8) | accel.readByte(0x35); tmp = accel.readByte(0x36); let z = (tmp << 8) | accel.readByte(0x37);
  • 28. @kinoma Adding ES6 to your product • Just a few steps to get the basics working • Get XS6 from GitHub • Build it with your product • Entirely ANSI C – likely builds as-is • All host OS dependencies in three files xs6Host.c, xs6Platform.h, and xs6Platform.6 • Update as needed for your host OS / RTOS
  • 29. @kinoma Hello World /* test.js */ trace("Hello, world!n");
  • 30. @kinoma Hosting scripts in your code #include <xs.h> int main(int argc, char* argv[]) { xsCreation creation = { 128 * 1024 * 1024,/* initial chunk size */ 16 * 1024 * 1024, /* incremental chunk size */ 8 * 1024 * 1024, /* initial heap slot count */ 1 * 1024 * 1024, /* incremental heap slot count */ 4 * 1024, /* stack slot count */ 12 * 1024, /* key slot count */ 1993, /* name modulo */ 127 /* symbol modulo */ }; xsMachine* machine = xsCreateMachine(&creation, NULL,"my virtual machine", NULL); xsBeginHost(machine); xsRunProgram(argv(1)); xsEndHost(machine); xsDeleteMachine(machine); return 0; }
  • 31. Reading environment variables To allow a script to do this trace(getenv("XS6") + "n"); trace(getenv("XSBUG_HOST") + "n"); xsResult = xsNewHostFunction(xs_getenv, 1); xsSet(xsGlobal, xsID("getenv"), xsResult); void xs_getenv(xsMachine* the) { xsStringValue result = getenv(xsToString(xsArg(0))); if (result) xsResult = xsString(result); } Implement xs_getenv in C Add getenv function to the virtual machine
  • 32. Going deeper • JavaScript is also great for building the product • App logic • Communication • Network protocols • Hardware @kinoma
  • 33. @kinoma Why use JavaScript to build your product? • Get it working faster • Iterate incredibly fast • Leverage code and techniques developed by other JS developers • Hardware independent; easy to re-use in your next generation • Re-use JavaScript code with Node.js cloud service, mobile apps, and web pages • Much easier to find JavaScript programmers
  • 34. Avoid the “100% pure” trap • It doesn’t make sense to code everything in script • Native code is great • Fast • Access to native functionality • Access to hardware functions • Re-use of proven, reliable code • Secure
  • 35. @kinoma But, you may say JavaScript isn’t type safe. My manager insists…. JavaScript isn’t good for big projects. Google told me… Modules JavaScript isn’t fast
  • 36. Programming is for more people than you may imagine
  • 37. Everyone can configure IoT devices with mobile apps
  • 38. IFTTT goes the next step with simple rules
  • 39. Visual programming is powerful, an on-ramp to “real” coding
  • 40. JavaScript has proven to be accessible to designers, students, and engineers
  • 41. @kinoma Scriptable is scalable • Your organization can’t implement everything itself • Interactions with other devices • Mobile experience • Interactions with cloud service • Building partnerships directly is slow, expensive, and limited • Opening your product to Apps let’s individuals and companies integrate your product with theirs • Brings new abilities, new customers, access to new markets
  • 42. @kinoma Scriptable IoT will lead us to the right standards • New “standard objects” for IoT to augment JavaScript built- ins • Common programming models • Modules / libraries that are common across devices • Perhaps enhancements to JavaScript for needs of IoT
  • 43. @kinoma Scriptable will realize potential of IoT • We can’t organize to connect all these devices and services together • This is not a central design / control problem • Organic exploration and growth • Consumers will get the magic they expect, just as the mobile app ecosystem snapped into place

Hinweis der Redaktion

  1. Developers in the IoT Space.
  2. Programmer I lead an engineering team. I don’t manage. You are have probably run my code. Apple TrueType (!) Apple QuickTime MPEG-4 Palm phones (lots of them) Sony cameras Sony Reader HP Printers (I think we can safely mention that here, without going into depth) You are likely using the standards work I helped with on MPEG-4 daily. You may well have some with you now And I’m probably running your code. And since this is IEEE, at this moment, I’m probably using standards some of you helped create.
  3. For purposes of this presentation - any thing with a CPU and radio. Halo Smoke Alarm ADT with LG security iDevices Light Socket Essence WeRHome alarm system Hunter Signal fan
  4. Most recently, Jon Bruner wrote in the O'Reilly Hardware Newsletter looking ahead to 2016 wrote "High level programming languages on embedded systems" was one of the top 4 trends this year, saying: ..writing software to control drones, vending machines, and dishwashers has become as easy as spinning up a website. Fast, efficient processors like those on the Raspberry Pi are turning JavaScript into a popular embedded programming language—unthinkable less than a decade ago.
  5. Most recently, Jon Bruner wrote in the O'Reilly Hardware Newsletter looking ahead to 2016 wrote "High level programming languages on embedded systems" was one of the top 4 trends this year, saying: ..writing software to control drones, vending machines, and dishwashers has become as easy as spinning up a website. Fast, efficient processors like those on the Raspberry Pi are turning JavaScript into a popular embedded programming language—unthinkable less than a decade ago.
  6. Modules - reusable code libraries Classes - Familiar tool for inheritance Promises - Clean, consistent asynchronous operation More concise code, faster execution
  7. (Mention other small JS engines) Lua? Hello Barbie - talking barbie from mattel
  8. UI configuration of rules
  9. IFTTT
  10. Visual programming