iot is something to figure out

52
IoT is Something to Figure Out Client technologies Peter Hoddie @phoddie Founder, Kinoma Advisor to IoTracks and Douzen IoT World 2016

Upload: peter-hoddie

Post on 14-Apr-2017

2.482 views

Category:

Software


0 download

TRANSCRIPT

Page 1: IoT is Something to Figure Out

IoT is Something to Figure OutClient technologies

Peter Hoddie@phoddie

Founder, Kinoma Advisor to IoTracks and Douzen

IoT World 2016

Page 2: IoT is Something to Figure Out

Hallelujah the Hills A Band is Something to Figure Out

@JahHills

Page 3: IoT is Something to Figure Out

• Engineer and entrepreneur

• Focus on the objects we own (aka “the client”)

• Closest to the user, biggest opportunity for impact

• Hand crafted software optimized for size and speed

• Tools for developers and users

• Working for interoperability of data and devices

About me

@phoddie

Page 4: IoT is Something to Figure Out

What do the people want? The people don't know what they want.

@JahHills

Page 5: IoT is Something to Figure Out

@phoddie

Connected devices

Page 6: IoT is Something to Figure Out

• Every trade show presentation begins by defining it

• We don’t know

• The user doesn’t know

• Well, they do…. once you show them your product working

• They like the object

• They just want a different behavior……for their life, their home, their car.For them.

IoT is shrouded in mystery

@phoddie

Page 7: IoT is Something to Figure Out

I've seen this in a movie (but never without a soundtrack of folk music)

@JahHills

Page 8: IoT is Something to Figure Out

• We’ve seen the future

• Seen it in movies

• Binge watched it on TV

• Read about it in books

• We all have a sense of what connected future should be

• Just can’t explain it beyond lights automatically turning on when you arrive home

What IoT should do is obvious

@phoddie

Page 9: IoT is Something to Figure Out

• We expect it

• Our devices should be able to communicate with the cloud and each other

• That’s the premise of the “I” in IoT

• Great products that work well together

• Too many products consider interoperability an“interesting idea for a future update”

Interoperability

@phoddie

Page 10: IoT is Something to Figure Out

I'm a beacon for true conspiracy

@JahHills

Page 11: IoT is Something to Figure Out

@kinoma

IoT Interoperability – 2017

Page 12: IoT is Something to Figure Out

What's the point of all this noise? Who can say where it moves you and I?

@JahHills

Page 13: IoT is Something to Figure Out

Standards

Page 14: IoT is Something to Figure Out

@phoddie

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

Page 15: IoT is Something to Figure Out

@phoddie

Standards in IoT• Industry impulse is to create

a new standard • Define boundaries of

new product categories • Ensure interoperability

Page 16: IoT is Something to Figure Out

@phoddie

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

Page 17: IoT is Something to Figure Out

@phoddie

Need time to figure out IoT• 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

Page 18: IoT is Something to Figure Out

The dangers are double, they told me but I couldn't hear a single world

@JahHills

Page 19: IoT is Something to Figure Out

IoT’s diversity makes traditional software development impractical

• network connectivity • cloud services • sensors • power requirements • business rules • security

Different

@phoddie

Page 20: IoT is Something to Figure Out

Popular Frameworks Aren’t IoT Ready• Browser-based solutions: Too heavy for IoT devices

• Node.js: Server solution being shoehorned into the embedded space

• Qt: Designed for desktop, too much of a catch-all of features

• Lua: Less popular than assembly and COBOL, so difficult to find talent and no significant ecosystem

@phoddie

Page 21: IoT is Something to Figure Out

It is what it isbut it's not what we thought

@JahHills

Page 22: IoT is Something to Figure Out

Learning JavaScript used to mean you weren’t a serious software developer.

Today, not learning JavaScript means the same thing.

”James Governor, RedMonk

@phoddie

Page 23: IoT is Something to Figure Out

I was once blessed with a good idea

@JahHills

Page 24: IoT is Something to Figure Out

JavaScript as standard (to figure out IoT)

Page 25: IoT is Something to Figure Out

@phoddie

Nearly universal programming language

Web (Desktop)

Mobile (Apps and Web)

Server

Embedded / IoT

Page 26: IoT is Something to Figure Out

JavaScript for Embedded / IoT

@phoddie

• JSON built in – de facto data format of the web

• Exceptionally portable – OS independent • Helps eliminate memory leaks and

fragmentation so devices can run for a very long time – garbage collector

Page 27: IoT is Something to Figure Out

JavaScript 2015 (aka ES6) is first truly major enhancement to the language.

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

@phoddie

Page 28: IoT is Something to Figure Out

@phoddie

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.

Page 29: IoT is Something to Figure Out

Secure foundation

@phoddie

• 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 non-existent

• Uninitialized memory • Stack overflow • Buffer overruns • Mal-formed data injection

Page 30: IoT is Something to Figure Out

There's angels in the source code if you know where to look for them

@JahHills

Page 31: IoT is Something to Figure Out

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

@phoddie

Page 32: IoT is Something to Figure Out

@kinoma

How small a system can run JavaScript?• 512 KB RAM • 200 MHz ARM Cortex M4 • Wi-Fi b/g • XS6 VM - most complete ES6 implementation anywhere • Open source – Apache license

Page 33: IoT is Something to Figure Out

I couldn't suspend my disbelief

@JahHills

Page 34: IoT is Something to Figure Out

• Two key constraints to address

• CPU performance

• Single core

• ARM Cortex – thumb instructions only

• 200 MHz or less is common

• Memory

• RAM is limited, Flash storage is much less of an issue

XS6 – JavaScript optimized for embedded

@phoddie

Page 35: IoT is Something to Figure Out

• No JIT

• Requires much more memory

• Significantly increases complexity of JavaScript engine

• Takes time to manage

• Performance critical functions can be coded in C directly

• Even faster

• No security risk as native code is installed “at the factory”

XS6 – JavaScript optimized for embedded

@phoddie

Page 36: IoT is Something to Figure Out

• Memory efficient strings

• JavaScript defines strings as Unicode 16, requires 2 bytes per character

• XS6 uses UTF-8, which uses 1 byte for most common characters

• Tuned garbage collector

• Small memory size allows use of simple garbage collector, fast, single threaded, and compact

XS6 – JavaScript optimized for embedded

@phoddie

Page 37: IoT is Something to Figure Out

• Precompiled byte code

• JavaScript can be compiled on desktop

• Eliminates parse and code generation on device

• Execute-in-place for byte code

• JavaScript byte code stored in flash storage can be executed directly

• Eliminates JavaScript code from RAM

XS6 – JavaScript optimized for embedded

@phoddie

Page 38: IoT is Something to Figure Out

• “Threaded” dispatch

• Byte code instructions are dispatched using a computed goto, fastest way to implement byte code interpreter

• JavaScript module unloading

• Extends ES6 to allow code modules loaded at runtime to be unloaded when no longer in use

XS6 – JavaScript optimized for embedded

@phoddie

Page 39: IoT is Something to Figure Out

Going deeper• JavaScript is also great for building the product

• App logic • Communication

• Network protocols • Hardware

@phoddie

Page 40: IoT is Something to Figure Out

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

to work on your project @phoddie

Page 41: IoT is Something to Figure Out

Wide engineering talent poolC/C++

Front end, full stack, and node.js developers

Embedded programmers

@phoddie

Page 42: IoT is Something to Figure Out

Don't believe them when they say it's true It's not remotely a matter of fact

@JahHills

Page 43: IoT is Something to Figure Out

Openness

Open toall apps.

Extensible OS.Open to

some apps

Computers

Not open at all

Phones Things

@phoddie

Page 44: IoT is Something to Figure Out

• People know the behaviors they want from their devices

• Many people can code in one way or another

• Let them

• That’s how the computer and mobile grew

• That’s where the ideas come from

• Traditional embedded development doesn’t scale

• JavaScript is proven for growing developer communities

Make scriptable things

@phoddie

Page 45: IoT is Something to Figure Out

• You can’t implement every feature for every market

• Really.

• Apple, Microsoft, Google, and Cisco can’t.

• You can’t either.

• Individual products seldom win

• Products that connect to a larger ecosystem have more leverage

Good business

@phoddie

Page 46: IoT is Something to Figure Out

• Gives customers a stake in the product

• Gives customers a sense of being in control of their products

• Allows products to address features and connect to cloud services the manufacturer chooses not to support

• Extends product life

• Long after manufacturer stops issuing updates, the market can continue to enhance

Good for customers

@phoddie

Page 47: IoT is Something to Figure Out
Page 48: IoT is Something to Figure Out

• Open source is used to build closed devices

• Doesn’t give the customer the ability to change the behavior of their objects

• Doesn’t give ecosystem the ability to enhance the object

• Doesn’t ensure interoperability in any way

Open source isn’t enough

@phoddie

Page 49: IoT is Something to Figure Out

She speaks her private thoughtsdirectly into microphones

@JahHills

Page 50: IoT is Something to Figure Out

• One word: JavaScript

• The flexibility to change the behavior of the objects in our world

• The foundation to discover the potential of IoT

• The only practical way to achieve the interoperability we dream about

How we figure out IoT

@phoddie

Page 51: IoT is Something to Figure Out

• Kinoma – selected slides and images

• Hallelujah the Hills – intriguing quotes

• Playground Global – room to play

• IoTracks and Param Singh – invitation to speak

Acknowledgements

@phoddie

Page 52: IoT is Something to Figure Out

Fin

@phoddie