1 Programming IoT Applications with Ravel Laurynas Riliskis & - - PowerPoint PPT Presentation

1 programming iot applications with ravel
SMART_READER_LITE
LIVE PREVIEW

1 Programming IoT Applications with Ravel Laurynas Riliskis & - - PowerPoint PPT Presentation

1 Programming IoT Applications with Ravel Laurynas Riliskis & Philip Levis, with others 2 IoT: complex applications 3 Yet, we use ancient methods 4 Three tiers to rule them all Data& Gateway& Cloud& Sensor&


slide-1
SLIDE 1

1

slide-2
SLIDE 2

Programming IoT Applications with Ravel

Laurynas Riliskis & Philip Levis, with others

2

slide-3
SLIDE 3

IoT: complex applications

3

slide-4
SLIDE 4

Yet, we use ancient methods

4

slide-5
SLIDE 5

Three tiers to rule them all

Views&

Sensor& Gateway& Cloud& Data& Analy5cs&

Transforms&

Data&Buffering,& Compression,& Encryp5on& Bluetooth&LE,& Data&Forwarding,&& App&Tracking& Data&Storage,&& Decryp5on,& Acknowledgment& Sta5s5cs,&& Experimenta5on,& Inference& 1Hz&Flow&and& Temperature& Sampling&

GATT/BLE& HTTPS/REST& SQL/R/Python&

Models&

Flow%Rate% Temperature% Shower%Data% Shower%Data% Reliable% Comms.% Reliable% Comms.% Fine8Grained% Water%Usage%

EndNtoNEnd&Ack& Encrypted&Data&

Controllers&

Current%Water% usage%

5

slide-6
SLIDE 6

LED Control - synchronized

482/3 1929/31 146/8

LoC/files

6

slide-7
SLIDE 7

LED Control - Synchronized durable

488/3 3270/47 146/8

LoC/files

7

slide-8
SLIDE 8

LED Control - replicated durable

505/3 3515/56 295/15

LoC/files

8

slide-9
SLIDE 9

An IoT framework should have

  • Unified model – entire high-level application in a

single language and a single framework

  • Flexible partitioning – reconfigure where data

processing and storage occurs

  • Interaction everywhere – easy to develop

interaction

  • Deployment ready – real code

9

slide-10
SLIDE 10

programing paradigms

  • 1. Enabling SQL-like queries over a group of nodes (Tag,

Tinydb).

  • 2. Macroprogramming, a high-level abstraction for apps over

a set of nodes (Cosmos, Envirosuite).

  • 3. Stream-based programming, higher level development on

the sensory data flow (MISSA, SPITFIRE).

  • 4. Process-based development, where the user programs

the network as virtually-connected devices (BPMN4WSN).

  • 5. A prototyping frameworks for rapid development of IoT

applications (Fabryq, Exemplar).

  • 6. Model-View-Controller (MVC)

10

slide-11
SLIDE 11

MVC - basics

  • MVC - emerged for user interfaces, adopted by

web community (Ruby-on-Rails, Django, Meteor).

  • Models: manages data, logic and rules of

application.

  • Views: output representation of the data.
  • Controllers: converts inputs to commands for

models and views.

11

slide-12
SLIDE 12

DMVC for Iot

  • Distributed Model View Controller
  • Models: manages data, logic and rules of

application across all tiers of application.

  • Views: multiple fundamentally different

representations, still same data.

  • Controllers: moving data between tiers, views

and interactions on radically different platforms.

12

slide-13
SLIDE 13

DMVC challenges

Models are distributed across different devices:

  • We need powerful yet simple mechanisms for

automatically managing the data, storage, views, computation. The applications must be secure:

  • Need some reasoning to suggest appropriate

security policy and selection of encryption mechanisms.

13

slide-14
SLIDE 14

DMVC - models

  • Supporting Distributed models:
  • Synchronized: data is streamed from source to sink.

Data is not mutable.

  • Replicated: same data across all tiers. Data is always

mutable.

  • Naturally, there is more model types f ex real-time.
  • Spaces: distributing primitives to tiers.
  • Automated controllers: for networking, storage, computation.

14

slide-15
SLIDE 15

DMVC - models

15

slide-16
SLIDE 16

DMVC - models

16

slide-17
SLIDE 17

DMVC - additional Primitives

  • Space: describe the properties and configuration
  • f underlaying tier. Contains means to generate

device specific code.

  • Transform: takes a model, computes on it and
  • utputs a different model. Often boolean, filters,

aggregators, basic math (avg, max, min, compare).

17

slide-18
SLIDE 18

From 4300+

505/3 3515/56 295/15

LoC/files

18

slide-19
SLIDE 19

to just few

19

slide-20
SLIDE 20

additionally

  • Deriving possible security policies
  • DMVC allows analyze where data is accessed

and what operations are used on it.

  • This knowledge let’s us reason about which

existing protocols can be use.

20

slide-21
SLIDE 21

Many benefits

  • Distributed Model View Controller
  • Higher level reasoning about the application and data
  • Abstracting complexity:
  • we do the heavy lifting
  • we eliminate a subset of programing errors: type

cast, null pointers

  • One framework rather than multiple languages

21

slide-22
SLIDE 22

Thank you!

Questions?

Laurynas Riliskis lauril@CS.stanford.edu

22