Date post: | 06-Jan-2017 |
Category: |
Technology |
Upload: | alexandra-bowen |
View: | 214 times |
Download: | 0 times |
The Internet of Things & REST APIsAlexandra Bowen
@AlexandraABowen
I’m Alex.
Community and Developer Relations Manager at DreamFactory
IoT Enthusiast
@AlexandraABowen #Defragcon
@AlexandraABowen #Defragcon
• Part 1: Current state of IoT• Part 2: Future of IoT• Part 3: Developer perspective• Part 4: APIs and REST• Part 5: Open Source Services
Agenda
@AlexandraABowen #Defragcon
@AlexandraABowen #Defragcon
• Part 1: Current state of IoT• Part 2: Future of IoT• Part 3: Developer perspective• Part 4: APIs and REST• Part 5: Open Source Services
Current state of IoT
@AlexandraABowen #Defragcon
@AlexandraABowen #Defragcon
@AlexandraABowen #Defrag
IoT connects people to physical objects via applications.
This relationship has inherently changed to the way we engage and interact with objects.
IDC predicts that the worldwide IoT market will grow to $7.1 trillion by 2020, so it’s not going away anytime soon.
Current State
@AlexandraABowen #Defrag
IoT connects people to physical objects via applications.
This relationship has inherently changed to the way we engage and interact with objects.
IDC predicts that the worldwide IoT market will grow to $7.1 trillion by 2020, so it’s not going away anytime soon.
Current State
@AlexandraABowen #Defragcon
@AlexandraABowen #Defragcon
The Internet of Things is driven by a combination of:
These services are already connected and available on the market today as popular devices.
Diverse Applications.
The Internet of Things is driven by a combination of:
@AlexandraABowen #Defragcon
@AlexandraABowen #Defragcon
@AlexandraABowen #Defragcon
@AlexandraABowen #Defragcon
Lord Kelvin
“If you can’t measure it you can’t improve it.”
@AlexandraABowen #Defragcon
1. Hardware is becoming extremely cheap. 2. Connectivity.3. Development is becoming easier .
Why now?
@AlexandraABowen #Defragcon
@AlexandraABowen #Defragcon
Everything should talk to everything else.
@AlexandraABowen #Defragcon
Daily data generation 2020 @AlexandraABowen #Defragcon
Internet of useless things.
@AlexandraABowen #Defragcon
• Part 1: Current state of IoT• Part 2: Future of IoT• Part 3: Developer perspective• Part 4: APIs and REST• Part 5: Open Source Services
Future of IoT
@AlexandraABowen #Defragcon
The IoT has the greatest potential to advance society since the Industrial Revolution: a world where all kinds of things are interconnected, smart, communicating, and improving our quality of life.
Future State
@AlexandraABowen #Defragcon
Interoperability & InterconnectednessInteroperability is the ability of different information technology systems and
software applications to communicate, exchange data, and use the information that has been exchanged.
Interconnectedness is part of the terminology of a worldview which sees a oneness in all things.
@AlexandraABowen #Defragcon
Law and Order. Coming up:• Nielen’s Law• Moore’s Law• Metcalfe’s Law
@AlexandraABowen #Defragcon
Nielen’s LawUsers' bandwidth grows by 50% per year
@AlexandraABowen #Defragcon
Moore’s LawComputers double in capabilities every 18 months: this corresponds
to about 60% annual growth
@AlexandraABowen #Defragcon
Comparing the two Laws shows that: Bandwidth grows slower than computer power.
@AlexandraABowen #Defragcon
“The value of a network is proportional to the square of the number of connected users of the system.” -Robert Metcalfe
@AlexandraABowen #Defragcon
Connected ≠ SmartBy 2020, Cisco predicts there will be 37 billion “intelligent” things.
@AlexandraABowen #Defragcon
Connected things 2020 @AlexandraABowen #Defragcon
Doug Fisher, Intel@AlexandraABowen #Defragcon
Value of Interconnectedness/InteroperabilityTotal economic value to be generated by the IoT in 2025 is $11.1 Trillion. 47%
of the value — $5.2 Trillion — will be unlocked by Interoperability.
McKinsey 2015 IoT study @AlexandraABowen #Defragcon
The Zettabyte EraWe are nearly in the Zettabyte Era. Global IP traffic will reach the Zettabyte
threshold in 2016. 1 Zettabyte (ZB) = 1024 Exabytes (EB). Wherein 1 Exabyte = 1 million Terabytes (TB) of data.
@AlexandraABowen #Defragcon
Humans turning Data into Wisdom.
Every minute…• 72 hours of videos are uploaded to Youtube• 204 million emails are sent• Google receives over 4 million search queries• Facebook users share close to 2.5 million pieces of content• Over 300,000 photos are being shared through whatsapp• Tinder users swipe more than 416,667 times
@AlexandraABowen #Defragcon
Thresholds reached by 2020• Global IP traffic has increased five fold over the past 5 years and will and
will reach 2.3 ZB per year• The number of devices connected to IP networks will be more than three
times the global population• There will be 3.4 networked devices per capita by 2020. Smartphone
traffic will exceed PC traffic
@AlexandraABowen #Defragcon
Fog computing involves pushing intelligence and processing capabilities down closer to where the data originates, from pumps, motors, sensors, relays…
Fog computingFog computing is an extension of cloud computing that is:• Adding process and memory resources to Edge devices• Pre-processing collected data at the Edge• Sending aggregated results to the cloud
@AlexandraABowen #Defragcon
• Part 1: Current state of IoT• Part 2: Future of IoT• Part 3: Developer perspective• Part 4: APIs and REST• Part 5: Open Source Services
Dev Perspective
@AlexandraABowen #Defragcon
Dev Perspective
Building blocks of IoT development• Devices, endpoints• Device management — collecting information, storing it and extracting it• Filtering — information filtered out, event handling and notifications• User management- Permissions — users, access, roles
@AlexandraABowen #Defragcon
• Hold your data in unstructured schemas• Choose a device agnostic platform, don’t model for certain kind of
device.• Interoperability
• Aggregation is not done in silo. Be open.• Optimize for small packets in high volumes
• You may have constrained networks and resources. Offer ways to pass in information in a structured and minimalist way.
Do’s and don’ts when developing
@AlexandraABowen #Defragcon
• Handle failure conditions• Make sure you have good testing and error handling.
• Documentation• Don’t neglect Documentation!
• Start small• Reduce TTFHW (time to first hello world).
Do’s and don’ts when developing
@AlexandraABowen #Defragcon
Do’s and don’ts when developing• Security matters
• Provide transport layer encryption, provide a permissions model for you to secure access and allow you to encrypt messages with public private keys.
• Context matters• Don’t think that only one person, or device will be consuming. Keep in mind
that devices have different form factors and computational power.• State matters
• Decide whether a Pull or Push state makes more sense for your project.• REST (polling) works for most developers and if you have low(er) time
sensitivity. Keep in mind, it can be as low as milliseconds.@AlexandraABowen #Defragcon
Standards and collaboration are required to enable this massively smart and interconnected world.
@AlexandraABowen #Defragcon
Standards will unlock the massive opportunity in the IoT market, accelerate industry innovation and help developers and companies create solutions
that map to a single open specification.
@AlexandraABowen #Defragcon
What will it look like?• Open• Royalty free• Seamless• Technology agnostic• Fair and accessible• Cross industry• More secure• Structured @AlexandraABowen #Defragcon
Standards and collaboration drive adoption.• Wifi: $90 B in annual economic value in the US• OSS 31 billion lines of code. 3.8 million OS contributors• Mobile 2015 4 billion unique subs. Contributing $3.7 to global GOP• Web: 1995 <1% of the world connected. 2016 — over 40% connected
@AlexandraABowen #Defragcon
• Part 1: Current state of IoT• Part 2: Future of IoT• Part 3: Developer perspective• Part 4: APIs and REST• Part 5: Open Source Services
API’s and REST
@AlexandraABowen #Defragcon
“Software is eating the world.” And it’s not just any software that’s eating the world, it’s API-driven
and Javascript in particular.
@AlexandraABowen #Defragcon
RESTREST is the architecture of the web, and if you’re going to be building applications
on the web — shouldn’t you work with the architecture not against it?
@AlexandraABowen #Defragcon
REST Addresses• Performance• Scalability• Simplicity of interfaces• Modifiability• Visibility• Portability• Reliability
@AlexandraABowen #Defragcon
Why APIs matter to IoT
• APIs provide the ability to glue and integrate services• APIs allow developers to build context based applications• APIs are a set of routines, protocols, and tools for building software
applications
@AlexandraABowen #Defragcon
• Part 1: Current state of IoT• Part 2: Future of IoT• Part 3: Developer perspective• Part 4: APIs and REST• Part 5: Open Source Services
Open Source
@AlexandraABowen #Defragcon
Open Source Resources: Hardware
• Arduino — Electronics platform based on easy-to-use hardware and software. It’s intended for anyone making interactive projects.
• BeagleBoard — Low-power open-source hardware single-board computer produced by Texas Instruments in association with Digi-Key and Newark element14.
• Microduino — Powerful, small, stackable electronic hardware to makers, designers, engineers, students and curious tinkerers of all ages. Build open-source projects or create innovative new ones.
• Node MCU (ESP 8266) — IoT platform. It uses the Lua scripting language. It is based on the eLua project, and built on the ESP8266 SDK 0.9.5.
• OLinuXino — Software and Hardware low cost (EUR 30) Linux Industrial grade single board computer with GPIOs capable of operating from -25°C to +85°C.
• Raspberry Pi — Low cost, credit-card sized computer that plugs into a computer monitor or TV, and uses a standard keyboard and mouse. It’s capable of doing everything you’d expect a desktop computer to do.
• Tessel — Community-driven IoT and robotics development platform. It encompasses development boards, hardware module add-ons, and the software that runs on them.
@AlexandraABowen #Defragcon
Open Source Resources: Software, operating systems• Contiki — Operating system for the Internet of Things. Contiki connects tiny
low-cost, low-power microcontrollers to the Internet.• OpenWrt — Operating system (in particular, an embedded operating system)
based on the Linux kernel, primarily used on embedded devices to route network traffic. The main components are the Linux kernel, util-linux, uClibc or musl, and BusyBox. All components have been optimized for size, to be small enough for fitting into the limited storage and memory available in home routers.
• Tiny OS — Operating system designed for low-power wireless devices, such as those used in sensor networks, ubiquitous computing, personal area networks, smart buildings, and smart meters.
• Linux @AlexandraABowen #Defragcon
Open Source Resources: Frameworks• AllJoyn — Software framework that makes it easy for devices and apps to
discover and communicate with each other.• Countly IoT Analytics — General purpose analytics platform for mobile and
IoT devices, available as open source.• Iotivity — Software framework enabling seamless device-to-device connectivity
to address the emerging needs of the Internet of Things.• Kura — Java/OSGi-based container for M2M applications running in service
gateways. Kura provides or, when available, aggregates open source implementations for the most common services needed by M2M applications.
• OpenHAB — The openHAB runtime is a set of OSGi bundles deployed on an OSGi framework (Equinox). It is therefore a pure Java solution and needs a JVM to run.
@AlexandraABowen #Defragcon
Open Source Resources: Middleware• Kaa — Middleware platform for rapid creation of IoT solutions.• Losant —Developer platform designed to help you quickly and securely build
complex connected solutions. Losant uses open communication standards like REST and MQTT to provide connectivity from one to millions of devices. Losant provides powerful data collection, aggregation, and visualization features to help understand and quantify vast amounts of sensor data. Losant’s drag-and-drop workflow editor allows you to trigger actions, notifications, and machine-to-machine communication without programming.
• DreamFactory — Free open source REST API Platform for mobile, web and IoT Applications.
@AlexandraABowen #Defragcon
DreamFactory• An API Platform that allows you to build IoT Applications• Open Source• Automatically generates REST APIs• Low code platform, with custom scripting support• Automatically creates Documentation, through Swagger, for your APIs• Maximizes the reliability, scalability, and security
@AlexandraABowen #Defragcon
DreamFactory Platform
Instant APIs• SQL, NoSQL, File Storage• External REST/SOAP
Instant Dev Environments• Automatic platform generation• Interactive documentation• Server-side scripting• Orchestration of 3rd party services• Custom API construction• Role-based access controls• SSO, AD, LDAP, OAuth• Multi-tenant sandboxes
Run on any server or cloud• JWT for massive scalability
@AlexandraABowen #Defragcon
Let’s break it down (quickly)
@AlexandraABowen #Defragcon
Install on any server
● Infrastructure as a Service (IaaS)● Platform as a Service (PaaS)● On Premises Data Center● Desktop Installer
@AlexandraABowen #Defragcon
Connect to any database
● SQL● NoSQL● File Storage● External Web Services
@AlexandraABowen #Defragcon
Develop for any device
● HTML5● Native Apps● Browser Websites● Internet of Things● Server to Server
@AlexandraABowen #Defragcon
API Automation Approach• Reusable APIs for any new project• Customization for special cases• Focus on front-end app development• Decouple client-side from server-side• Flexible backend infrastructure• Flexible backend data sources• Automatically documented• Scalable, reliable, portable, secure
@AlexandraABowen #Defragcon
DreamFactory IoT stack offers MQTT integration• Existing support for a variety of data sources• Developers are able to build end-to-end IoT applications that take advantage
of MQTT and REST• Using DreamFactory’s Server Side Scripts, developers can write rules
(Javascript, PHP, Python…)• We integrated Mosca, an open source MQTT broker, with DreamFactory to
complement the RESTful API.
@AlexandraABowen #Defragcon
DreamFactory IoT Building Blocks
@AlexandraABowen #Defragcon
Take Aways• IoT is already here, and we need developers to help us harmonize on data
models, on APIs, on device classes across industries.• Standards will help ensure secure interoperability for consumers, business,
and industry.• IoT is the next evolution of the internet.• IoT is changing the way we engage and interact with devices and people.• There are many hurdles in IoT before we start to see smart, connected
devices and interoperability.• IoT is a great opportunity, making things smart and connected only makes
sense if it’s useful and done well.• The premise is, that everything should talk to everything else. APIs and
standards help with this. @AlexandraABowen #Defragcon
@AlexandraABowen #Defragcon
Thank you!
@AlexandraABowen #Defragcon