presentation for iot workshop at sinhagad university (feb 4, 2016) - 1/2

50
Internet of Things

Upload: bhavin-chandarana

Post on 15-Apr-2017

348 views

Category:

Technology


1 download

TRANSCRIPT

Internet of Things

HELLO!I am BhavinI am here because I love technologyYou can find me at @BhvainIoT

IIT Madras - grad. May 2014: M.Tech (Dual Degree)Co-founder AviPulse - Jan 2014 - presentCo-founder Phaneron Inc. - Launching in Apr 2016

Logistics

Takeoff Session (Protocols): Introduction to IoTProtocols: MQTT, CoAP, HTTPMQTT in depth: Headers, QoS, Topics, Persistence & WillConclusion: Comparison of protocols

Consolidation Session (Implementation): Hardware: Arduino, ESP8266 & NodeMCU, Raspberry Pi, UDOOSoftware: Brokers, APIs, FrameworksPractices: Cloud, Battery Life, Mobile Apps, SecuritFuture: Smart Cities, Mission 2020

Hands-on Session (Demo): The Participants will form groups and make a hands on “Minimal Viable Prototype” demo using lean principles and concepts learned in the above sessions

120 mins 10 mins 30 mins 60 mins 20 mins

120 mins 40 mins 40 mins 30 mins 10 mins

120 mins

1. IntroductionLet’s start with the basics

Big PictureWhat is IoT really?

The Internet of Things (IoT) is the network of physical objects, devices, vehicles, buildings and other items which are embedded with electronics, software, sensors, and network connectivity, which enables these objects to collect and exchange data.[1] The Internet of Things allows objects to be sensed and controlled remotely across existing network infrastructure,[2] creating opportunities for more-direct integration between the physical world and computer-based systems, and resulting in improved efficiency, accuracy and economic benefit

"Things," in the IoT sense, can refer to a wide variety of devices such as heart monitoring implants, biochip transponders on farm animals, electric clams in coastal waters,[15] automobiles with built-in sensors, DNA analysis devices for environmental/food/pathogen monitoring[16] or field operation devices that assist firefighters in search and rescue operations.[17] These devices collect useful data with the help of various existing technologies and then autonomously flow the data between other devices

Source: Wikipedia

→ Hardware agnostic→ Software agnostic→ Protocols matter !→ Concerns:

↠ Battery life, energy consumption↠ Connectivity vs Security↠ Processing Power & Memory

Ideal IoT solution

2. ProtocolsHTTP, MQTT, CoAP

OSI Model

Bits & Frames - Wireshark

Protocols in Transport Layer

Protocols in Transport Layer

TCP/IP and UDP

→ (Slightly more than) Transport Layer Protocols↠ TCP/UDP contain functions such as graceful close

that OSI assigns to Session Layer↠ They are closest to class 4 (TP4) of OSITCP: Reliability over Latency UDP: Latency over Reliability

TCP

→ TCP provides reliable, ordered, and error-checked delivery of a stream of octets between applications running on hosts communicating over an IP network

→ The sequence (SEQ) of octets matters→ Receiver has to acknowledge (ACK) and

synchronize (SYN) the sequence with the transmitter

TCP

TCP

UDP

→ With UDP, computer applications can send messages, in this case referred to as datagrams, to other hosts on an Internet Protocol (IP) network without prior communications to set up special transmission channels or data paths

→ Un-sequenced data with no ACK or error handling

UDP

TCP→ Reliable→ Ordered→ Heavyweight→ Slow(er)→ Streaming→ Congestion Control→ Unicast (1 to 1)

TCP vs UDP

UDP→ Unreliable→ Unordered→ Lightweight→ Fast(er)→ Datagrams→ No Congestion Control→ Broadcast (1 to many)

Multicast (many to many)

Protocol Stacks

→ HTTP: TCP like session on top of TCP

→ MQTT: UDP like session on top of TCP

→ CoAP: TCP like session on top of UDP (also, it has binary headers)

This is a slide title

→ Here you have a list of items→ And some text→ But remember not to overload your slides

with content

You audience will listen to you or read the content, but won’t do both.

HTTP

→ The Hypertext Transfer Protocol (HTTP) is a protocol for distributed, collaborative, hypermedia information systems

→ HTTP functions as a request response protocol in a client-server computing model

→ HTTP resources are identified and located on the network by uniform resource locators (URLs), using the uniform resource identifier (URI) schemes http and https. URIs and hyperlinks in HTML documents form inter-linked hypertext documents

→ URI:

HTTP

HTTP

Methods/Verbs→ GET*$

→ POST$

→ PUT$

→ DELETE$

→ HEAD*→ CONNECT→ PATCH→ TRACE*→ OPTIONS*

* No changes to database $: REST API

HTTP

→ HTTP is a stateless protocol. A stateless protocol does not require the HTTP server to retain information or status about each user for the duration of multiple requests.

→ However, some (read: most) web applications implement states or server side sessions using for instance HTTP cookies or hidden variables within web forms

MQTT

→ MQTT is Client-Server publish/subscribe messaging transport protocol

→ It is lightweight, simple, open, and designed to be as easy to implement

→ It runs over TCP/IP but can be implemented over any stack that provides ordered, lossless, bi-directional connections

→ MQTT is an OASIS standard since v3.1.1 (current version)

Note: MQTT = MQ Telemetry Transport. MQ doesn’t stand for message queue. Infact there’s NO queuing in MQTT

MQTT

MQTT

CoAP

→ Constrained Application Protocol→ Works over UDP. Has Binary Headers→ Provides a RESTful API over UDP→ CoAP was the de-facto “IoT” protocols since before IoT

was mainstream→ It is especially useful in embedded devices with limited

processing power and memory→ But it hasn’t aged well with Moore’s law→ With competition in IoT hardware market, a lot powerful

devices are available for cheap

CoAP

CoAP

3. Diving into MQTTAll about MQTT Protocol

MQTT

MQTT

MQTT

MQTT

MQTT

MQTT

MQTT

MQTT

MQTT

MQTT

MQTT

MQTT

MQTT

MQTT

4. ConclusionAn Overview of what we’ve covered

Comparisons: MQTT vs HTTP

Comparisons: MQTT vs CoAP

THANKS!Any questions?See you in the next session!I’m Bhavin Chandarana, find me at→ @BhavinIoT→ [email protected]→ +91-8380013130 | +91-9840425583

Do Checkout:http://www.meetup.com/Internet-Of-Things-Pune-IoTPune