SlideShare a Scribd company logo
APIsforthe
InternetofThings
PeterHoddie
@phoddie

@kinoma
@APICraftSF
February25,2016
@kinoma
Overview
1. IoT is the modernization of embedded computing, defined by
connectivity
2. How IoT devices are programmed needs to change
3. The unique challenges, demands, and priorities of IoT
4. Why Kinoma uses JavaScript together with C
5. Three areas of API functionality that are central to IoT
6. How Kinoma is building a set of APIs for IoT
@kinoma
@kinoma
WhyJavaScriptforIoT
• 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.
JavaScriptforIoT
@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
Securefoundation
@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
JavaScript6thEdition–FeaturesforIoT
@kinoma
@kinoma
HowsmallasystemcanrunJavaScript?
• 512 KB RAM
• 200 MHz ARM Cortex M4
• Wi-Fi b/g
• Most complete ES6 implementation anywhere
• Open source
WhatdoesJavaScriptfor

IoTdeviceslooklike?
@kinoma
HTTPClient
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
HTTPServer
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
I2CAccelerometer
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
AddingES6toyourproduct
• 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
HelloWorld
/* test.js */

trace("Hello, world!n");
@kinoma
Hostingscriptsinyourcode
#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;
}
Readingenvironmentvariables
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
Avoidthe“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
JavaScripthasproventobeaccessibleto
designers,students,andengineers
@kinoma
Scriptableisscalable
• 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
ScriptableIoTwillleadustothe

rightstandards
• 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
ScriptablewillrealizepotentialofIoT
• 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
@kinoma
[InClosing]
• [Review your main ideas in summary form; repetition is important for
comprehension and recall, so repeat your important points. This also indicates
to the audience that your talk is coming to an end and they can start to
formulate their questions.]
• Calls to action:
• [Additional resources to point them to]
• [Recommended reading]
• [Where to dig into Kinoma APIs]
• Final statement before opening up to questions; what you want your audience
to remember after it has forgotten everything else from your talk.
Thankyou!
PeterHoddie
@phoddie

@kinoma
kinoma.com

More Related Content

What's hot

20140708 - Jeremy Edberg: How Netflix Delivers Software
20140708 - Jeremy Edberg: How Netflix Delivers Software20140708 - Jeremy Edberg: How Netflix Delivers Software
20140708 - Jeremy Edberg: How Netflix Delivers SoftwareDevOps Chicago
 
How to win skeptics to aggregated logging using Vagrant and ELK
How to win skeptics to aggregated logging using Vagrant and ELKHow to win skeptics to aggregated logging using Vagrant and ELK
How to win skeptics to aggregated logging using Vagrant and ELKSkelton Thatcher Consulting Ltd
 
Monitoring as Code - Ignite
Monitoring as Code - IgniteMonitoring as Code - Ignite
Monitoring as Code - IgniteIcinga
 
«Real Time» Web Applications with SignalR in ASP.NET
«Real Time» Web Applications with SignalR in ASP.NET«Real Time» Web Applications with SignalR in ASP.NET
«Real Time» Web Applications with SignalR in ASP.NETAlessandro Giorgetti
 
Livy: A REST Web Service for Spark
Livy: A REST Web Service for SparkLivy: A REST Web Service for Spark
Livy: A REST Web Service for SparkAshish kumar
 
Real world serverless - architecture, patterns and lessons learned
Real world serverless - architecture, patterns and lessons learnedReal world serverless - architecture, patterns and lessons learned
Real world serverless - architecture, patterns and lessons learnedDavid Schmitz
 
Alfresco DevCon 2019 - Do you know what the Alfresco heartbeat is?
Alfresco DevCon 2019 - Do you know what the Alfresco heartbeat is?Alfresco DevCon 2019 - Do you know what the Alfresco heartbeat is?
Alfresco DevCon 2019 - Do you know what the Alfresco heartbeat is?Francesco Corti
 
Docker Cambridge: Serverless Functions Made Simple with OpenFaaS
Docker Cambridge: Serverless Functions Made Simple with OpenFaaSDocker Cambridge: Serverless Functions Made Simple with OpenFaaS
Docker Cambridge: Serverless Functions Made Simple with OpenFaaSAlex Ellis
 
Webhooks do's and dont's: what we learned after integrating +100 APIs - Giuli...
Webhooks do's and dont's: what we learned after integrating +100 APIs - Giuli...Webhooks do's and dont's: what we learned after integrating +100 APIs - Giuli...
Webhooks do's and dont's: what we learned after integrating +100 APIs - Giuli...Codemotion
 
Building REST APIs using gRPC and Go
Building REST APIs using gRPC and GoBuilding REST APIs using gRPC and Go
Building REST APIs using gRPC and GoAlvaro Viebrantz
 
Application Monitoring using Datadog
Application Monitoring using DatadogApplication Monitoring using Datadog
Application Monitoring using DatadogMukta Aphale
 
Ruby performance - The low hanging fruit
Ruby performance - The low hanging fruitRuby performance - The low hanging fruit
Ruby performance - The low hanging fruitBruce Werdschinski
 
Monitoring Big Data Systems Done "The Simple Way" - Codemotion Milan 2017 - D...
Monitoring Big Data Systems Done "The Simple Way" - Codemotion Milan 2017 - D...Monitoring Big Data Systems Done "The Simple Way" - Codemotion Milan 2017 - D...
Monitoring Big Data Systems Done "The Simple Way" - Codemotion Milan 2017 - D...Demi Ben-Ari
 
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
 
Livy: A REST Web Service For Apache Spark
Livy: A REST Web Service For Apache SparkLivy: A REST Web Service For Apache Spark
Livy: A REST Web Service For Apache SparkJen Aman
 
OpenFaaS 2019 Project Update
OpenFaaS 2019 Project UpdateOpenFaaS 2019 Project Update
OpenFaaS 2019 Project UpdateAlex Ellis
 
How Shopify Scales Rails
How Shopify Scales RailsHow Shopify Scales Rails
How Shopify Scales Railsjduff
 

What's hot (20)

Infra for startup
Infra for startupInfra for startup
Infra for startup
 
20140708 - Jeremy Edberg: How Netflix Delivers Software
20140708 - Jeremy Edberg: How Netflix Delivers Software20140708 - Jeremy Edberg: How Netflix Delivers Software
20140708 - Jeremy Edberg: How Netflix Delivers Software
 
How to win skeptics to aggregated logging using Vagrant and ELK
How to win skeptics to aggregated logging using Vagrant and ELKHow to win skeptics to aggregated logging using Vagrant and ELK
How to win skeptics to aggregated logging using Vagrant and ELK
 
Testing at Stream-Scale
Testing at Stream-ScaleTesting at Stream-Scale
Testing at Stream-Scale
 
Monitoring as Code - Ignite
Monitoring as Code - IgniteMonitoring as Code - Ignite
Monitoring as Code - Ignite
 
«Real Time» Web Applications with SignalR in ASP.NET
«Real Time» Web Applications with SignalR in ASP.NET«Real Time» Web Applications with SignalR in ASP.NET
«Real Time» Web Applications with SignalR in ASP.NET
 
Livy: A REST Web Service for Spark
Livy: A REST Web Service for SparkLivy: A REST Web Service for Spark
Livy: A REST Web Service for Spark
 
Real world serverless - architecture, patterns and lessons learned
Real world serverless - architecture, patterns and lessons learnedReal world serverless - architecture, patterns and lessons learned
Real world serverless - architecture, patterns and lessons learned
 
Alfresco DevCon 2019 - Do you know what the Alfresco heartbeat is?
Alfresco DevCon 2019 - Do you know what the Alfresco heartbeat is?Alfresco DevCon 2019 - Do you know what the Alfresco heartbeat is?
Alfresco DevCon 2019 - Do you know what the Alfresco heartbeat is?
 
Docker Cambridge: Serverless Functions Made Simple with OpenFaaS
Docker Cambridge: Serverless Functions Made Simple with OpenFaaSDocker Cambridge: Serverless Functions Made Simple with OpenFaaS
Docker Cambridge: Serverless Functions Made Simple with OpenFaaS
 
Webhooks do's and dont's: what we learned after integrating +100 APIs - Giuli...
Webhooks do's and dont's: what we learned after integrating +100 APIs - Giuli...Webhooks do's and dont's: what we learned after integrating +100 APIs - Giuli...
Webhooks do's and dont's: what we learned after integrating +100 APIs - Giuli...
 
Building REST APIs using gRPC and Go
Building REST APIs using gRPC and GoBuilding REST APIs using gRPC and Go
Building REST APIs using gRPC and Go
 
Application Monitoring using Datadog
Application Monitoring using DatadogApplication Monitoring using Datadog
Application Monitoring using Datadog
 
Wongnai Engineering Story
Wongnai Engineering StoryWongnai Engineering Story
Wongnai Engineering Story
 
Ruby performance - The low hanging fruit
Ruby performance - The low hanging fruitRuby performance - The low hanging fruit
Ruby performance - The low hanging fruit
 
Monitoring Big Data Systems Done "The Simple Way" - Codemotion Milan 2017 - D...
Monitoring Big Data Systems Done "The Simple Way" - Codemotion Milan 2017 - D...Monitoring Big Data Systems Done "The Simple Way" - Codemotion Milan 2017 - D...
Monitoring Big Data Systems Done "The Simple Way" - Codemotion Milan 2017 - D...
 
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
 
Livy: A REST Web Service For Apache Spark
Livy: A REST Web Service For Apache SparkLivy: A REST Web Service For Apache Spark
Livy: A REST Web Service For Apache Spark
 
OpenFaaS 2019 Project Update
OpenFaaS 2019 Project UpdateOpenFaaS 2019 Project Update
OpenFaaS 2019 Project Update
 
How Shopify Scales Rails
How Shopify Scales RailsHow Shopify Scales Rails
How Shopify Scales Rails
 

Viewers also liked

волшебные пальчики
волшебные пальчики волшебные пальчики
волшебные пальчики pilegina
 
Pl instalaciones ab
Pl instalaciones abPl instalaciones ab
Pl instalaciones abcale66
 
พฤติกรรมการเล่นเกมของนักเรียนชั้นมัธยมศึกษาปีที่ 1 โรงเรียนสวนกุหลาบวิทยาลัย
พฤติกรรมการเล่นเกมของนักเรียนชั้นมัธยมศึกษาปีที่ 1 โรงเรียนสวนกุหลาบวิทยาลัยพฤติกรรมการเล่นเกมของนักเรียนชั้นมัธยมศึกษาปีที่ 1 โรงเรียนสวนกุหลาบวิทยาลัย
พฤติกรรมการเล่นเกมของนักเรียนชั้นมัธยมศึกษาปีที่ 1 โรงเรียนสวนกุหลาบวิทยาลัยSupawit Kunakornbodin
 
Estructuras sistemas-estructurales
Estructuras sistemas-estructuralesEstructuras sistemas-estructurales
Estructuras sistemas-estructuralesalbamarina bolivar
 
Presentació escoles del parc
Presentació escoles del parcPresentació escoles del parc
Presentació escoles del parcLola Anglada
 
Creating Custom Slack Integrations with Vapor
Creating Custom Slack Integrations with VaporCreating Custom Slack Integrations with Vapor
Creating Custom Slack Integrations with Vapor🔴 Keli'i Martin
 
Anaesthesia for MRI, ECT, Cardioversion
Anaesthesia for MRI, ECT, CardioversionAnaesthesia for MRI, ECT, Cardioversion
Anaesthesia for MRI, ECT, Cardioversionanishaiswarya
 
HARVEY PIERRE RESUME REVISED
HARVEY PIERRE RESUME REVISEDHARVEY PIERRE RESUME REVISED
HARVEY PIERRE RESUME REVISEDHarvey Pierre
 
Aspectos de la arquitectura colonial venezolana
Aspectos de la arquitectura colonial venezolanaAspectos de la arquitectura colonial venezolana
Aspectos de la arquitectura colonial venezolanaJesus Mendez
 

Viewers also liked (10)

волшебные пальчики
волшебные пальчики волшебные пальчики
волшебные пальчики
 
Pl instalaciones ab
Pl instalaciones abPl instalaciones ab
Pl instalaciones ab
 
พฤติกรรมการเล่นเกมของนักเรียนชั้นมัธยมศึกษาปีที่ 1 โรงเรียนสวนกุหลาบวิทยาลัย
พฤติกรรมการเล่นเกมของนักเรียนชั้นมัธยมศึกษาปีที่ 1 โรงเรียนสวนกุหลาบวิทยาลัยพฤติกรรมการเล่นเกมของนักเรียนชั้นมัธยมศึกษาปีที่ 1 โรงเรียนสวนกุหลาบวิทยาลัย
พฤติกรรมการเล่นเกมของนักเรียนชั้นมัธยมศึกษาปีที่ 1 โรงเรียนสวนกุหลาบวิทยาลัย
 
Estructuras sistemas-estructurales
Estructuras sistemas-estructuralesEstructuras sistemas-estructurales
Estructuras sistemas-estructurales
 
Presentació escoles del parc
Presentació escoles del parcPresentació escoles del parc
Presentació escoles del parc
 
Creating Custom Slack Integrations with Vapor
Creating Custom Slack Integrations with VaporCreating Custom Slack Integrations with Vapor
Creating Custom Slack Integrations with Vapor
 
Anaesthesia for MRI, ECT, Cardioversion
Anaesthesia for MRI, ECT, CardioversionAnaesthesia for MRI, ECT, Cardioversion
Anaesthesia for MRI, ECT, Cardioversion
 
Aida
AidaAida
Aida
 
HARVEY PIERRE RESUME REVISED
HARVEY PIERRE RESUME REVISEDHARVEY PIERRE RESUME REVISED
HARVEY PIERRE RESUME REVISED
 
Aspectos de la arquitectura colonial venezolana
Aspectos de la arquitectura colonial venezolanaAspectos de la arquitectura colonial venezolana
Aspectos de la arquitectura colonial venezolana
 

Similar to APIs for the Internet of Things

Scaling application with RabbitMQ
Scaling application with RabbitMQScaling application with RabbitMQ
Scaling application with RabbitMQNahidul Kibria
 
Make the Shift from Manual to Automation with Open Source
Make the Shift from Manual to Automation with Open SourceMake the Shift from Manual to Automation with Open Source
Make the Shift from Manual to Automation with Open SourcePerfecto by Perforce
 
Spring and Pivotal Application Service - SpringOne Tour - Boston
Spring and Pivotal Application Service - SpringOne Tour - BostonSpring and Pivotal Application Service - SpringOne Tour - Boston
Spring and Pivotal Application Service - SpringOne Tour - BostonVMware Tanzu
 
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020Matt Raible
 
IoT with SignalR & .NET Gadgeteer - NetMF@Work
IoT with SignalR & .NET Gadgeteer - NetMF@WorkIoT with SignalR & .NET Gadgeteer - NetMF@Work
IoT with SignalR & .NET Gadgeteer - NetMF@WorkMirco Vanini
 
O365Con18 - Automate your Tasks through Azure Functions - Elio Struyf
O365Con18 - Automate your Tasks through Azure Functions - Elio StruyfO365Con18 - Automate your Tasks through Azure Functions - Elio Struyf
O365Con18 - Automate your Tasks through Azure Functions - Elio StruyfNCCOMMS
 
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
 
Serverless, oui mais pour quels usages ?
Serverless, oui mais pour quels usages ?Serverless, oui mais pour quels usages ?
Serverless, oui mais pour quels usages ?VMware Tanzu
 
Internet of things the salesforce lego machine cloud
Internet of things   the salesforce lego machine cloudInternet of things   the salesforce lego machine cloud
Internet of things the salesforce lego machine cloudandyinthecloud
 
AWS Summit Auckland - Application Delivery Patterns for Developers
AWS Summit Auckland - Application Delivery Patterns for DevelopersAWS Summit Auckland - Application Delivery Patterns for Developers
AWS Summit Auckland - Application Delivery Patterns for DevelopersAmazon Web Services
 
Project Flogo: An Event-Driven Stack for the Enterprise
Project Flogo: An Event-Driven Stack for the EnterpriseProject Flogo: An Event-Driven Stack for the Enterprise
Project Flogo: An Event-Driven Stack for the EnterpriseLeon Stigter
 
Advanced technic for OS upgrading in 3 minutes
Advanced technic for OS upgrading in 3 minutesAdvanced technic for OS upgrading in 3 minutes
Advanced technic for OS upgrading in 3 minutesHiroshi SHIBATA
 
ITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignal
ITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignalITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignal
ITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignalITCamp
 
Programmable infrastructure with FlyScript
Programmable infrastructure with FlyScriptProgrammable infrastructure with FlyScript
Programmable infrastructure with FlyScriptRiverbed Technology
 
An Introduction to Web Components
An Introduction to Web ComponentsAn Introduction to Web Components
An Introduction to Web ComponentsRed Pill Now
 
Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Enginecatherinewall
 

Similar to APIs for the Internet of Things (20)

Signal R 2015
Signal R 2015Signal R 2015
Signal R 2015
 
[Struyf] Automate Your Tasks With Azure Functions
[Struyf] Automate Your Tasks With Azure Functions[Struyf] Automate Your Tasks With Azure Functions
[Struyf] Automate Your Tasks With Azure Functions
 
Scaling application with RabbitMQ
Scaling application with RabbitMQScaling application with RabbitMQ
Scaling application with RabbitMQ
 
Make the Shift from Manual to Automation with Open Source
Make the Shift from Manual to Automation with Open SourceMake the Shift from Manual to Automation with Open Source
Make the Shift from Manual to Automation with Open Source
 
Spring and Pivotal Application Service - SpringOne Tour - Boston
Spring and Pivotal Application Service - SpringOne Tour - BostonSpring and Pivotal Application Service - SpringOne Tour - Boston
Spring and Pivotal Application Service - SpringOne Tour - Boston
 
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
 
IoT with SignalR & .NET Gadgeteer - NetMF@Work
IoT with SignalR & .NET Gadgeteer - NetMF@WorkIoT with SignalR & .NET Gadgeteer - NetMF@Work
IoT with SignalR & .NET Gadgeteer - NetMF@Work
 
O365Con18 - Automate your Tasks through Azure Functions - Elio Struyf
O365Con18 - Automate your Tasks through Azure Functions - Elio StruyfO365Con18 - Automate your Tasks through Azure Functions - Elio Struyf
O365Con18 - Automate your Tasks through Azure Functions - Elio Struyf
 
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
 
Serverless, oui mais pour quels usages ?
Serverless, oui mais pour quels usages ?Serverless, oui mais pour quels usages ?
Serverless, oui mais pour quels usages ?
 
Internet of things the salesforce lego machine cloud
Internet of things   the salesforce lego machine cloudInternet of things   the salesforce lego machine cloud
Internet of things the salesforce lego machine cloud
 
Meetup callback
Meetup callbackMeetup callback
Meetup callback
 
AWS Summit Auckland - Application Delivery Patterns for Developers
AWS Summit Auckland - Application Delivery Patterns for DevelopersAWS Summit Auckland - Application Delivery Patterns for Developers
AWS Summit Auckland - Application Delivery Patterns for Developers
 
Project Flogo: An Event-Driven Stack for the Enterprise
Project Flogo: An Event-Driven Stack for the EnterpriseProject Flogo: An Event-Driven Stack for the Enterprise
Project Flogo: An Event-Driven Stack for the Enterprise
 
Advanced technic for OS upgrading in 3 minutes
Advanced technic for OS upgrading in 3 minutesAdvanced technic for OS upgrading in 3 minutes
Advanced technic for OS upgrading in 3 minutes
 
ITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignal
ITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignalITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignal
ITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignal
 
Programmable infrastructure with FlyScript
Programmable infrastructure with FlyScriptProgrammable infrastructure with FlyScript
Programmable infrastructure with FlyScript
 
Javantura v6 - Just say it v2 - Pavao Varela Petrac
Javantura v6 - Just say it v2 - Pavao Varela PetracJavantura v6 - Just say it v2 - Pavao Varela Petrac
Javantura v6 - Just say it v2 - Pavao Varela Petrac
 
An Introduction to Web Components
An Introduction to Web ComponentsAn Introduction to Web Components
An Introduction to Web Components
 
Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Engine
 

Recently uploaded

Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomCzechDreamin
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka DoktorováCzechDreamin
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀DianaGray10
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...Product School
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCzechDreamin
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoTAnalytics
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1DianaGray10
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityScyllaDB
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backElena Simperl
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Alison B. Lowndes
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...CzechDreamin
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaCzechDreamin
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxDavid Michel
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...CzechDreamin
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekCzechDreamin
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2DianaGray10
 

Recently uploaded (20)

Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 

APIs for the Internet of Things

  • 2. @kinoma Overview 1. IoT is the modernization of embedded computing, defined by connectivity 2. How IoT devices are programmed needs to change 3. The unique challenges, demands, and priorities of IoT 4. Why Kinoma uses JavaScript together with C 5. Three areas of API functionality that are central to IoT 6. How Kinoma is building a set of APIs for IoT
  • 4. @kinoma WhyJavaScriptforIoT • JavaScript is the closest thing we have to a 
 universal programming language Web (Desktop) Mobile (Apps and Web) Server Embedded
  • 5. @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.
  • 6. JavaScriptforIoT @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
  • 7. Securefoundation @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
  • 8. 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 JavaScript6thEdition–FeaturesforIoT @kinoma
  • 9. @kinoma HowsmallasystemcanrunJavaScript? • 512 KB RAM • 200 MHz ARM Cortex M4 • Wi-Fi b/g • Most complete ES6 implementation anywhere • Open source
  • 11. @kinoma HTTPClient 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();
  • 12. @kinoma HTTPServer 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(); };
  • 13. @kinoma I2CAccelerometer 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);
  • 14. @kinoma AddingES6toyourproduct • 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
  • 16. @kinoma Hostingscriptsinyourcode #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; }
  • 17. Readingenvironmentvariables 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
  • 18. Avoidthe“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
  • 20. @kinoma Scriptableisscalable • 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
  • 21. @kinoma ScriptableIoTwillleadustothe
 rightstandards • 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
  • 22. @kinoma ScriptablewillrealizepotentialofIoT • 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
  • 23. @kinoma [InClosing] • [Review your main ideas in summary form; repetition is important for comprehension and recall, so repeat your important points. This also indicates to the audience that your talk is coming to an end and they can start to formulate their questions.] • Calls to action: • [Additional resources to point them to] • [Recommended reading] • [Where to dig into Kinoma APIs] • Final statement before opening up to questions; what you want your audience to remember after it has forgotten everything else from your talk.