SlideShare a Scribd company logo
1 of 22
Download to read offline
Drop the Phone and Talk to the Physical World:
Programming the Internet of Things with Erlang



  Alessandro Sivieri     Luca Mottola         Gianpaolo Cugola
                          DEEPSE Group
             Dipartimento di Elettronica e Informazione
                       Politecnico di Milano

            Third International Workshop on
  Software Engineering for Sensor Network Applications
                     June 2nd , 2012
Scenario




   Internet of Things
       Sensing and actuation systems
       Massively decentralized
       Heterogeneous devices

   Wireless Sensor Networks
       Forerunner and key component of IoT
       WSN community was the rst to tackle the IoT issues




     A. Sivieri, L. Mottola, G. Cugola   ErLang for the Internet of Things   2
Motivation




   Current approaches
       Low-level frameworks (i.e., TinyOS, Contiki): full control of
       resources vs. diculties in testing and maintaining applications
       High-level frameworks (i.e., Regiment, Flask): ease of
       programming vs. generality and performance




     A. Sivieri, L. Mottola, G. Cugola     ErLang for the Internet of Things   3
ErLang meets IoT


   Why Erlang

      Actor-like concurrency
      model
      Declarative programming
      ...
   ELIoT
       Dedicated libraries and customized syntax for many-to-many
       IPC
       Reduced hardware requirements for the run-time system
       Dedicated simulator (full and mixed congurations)


     A. Sivieri, L. Mottola, G. Cugola   ErLang for the Internet of Things   4
Outline




   Erlang


   ELIoT


   Preliminary results


   Conclusions




      A. Sivieri, L. Mottola, G. Cugola   ErLang for the Internet of Things   5
Erlang




   Main characteristics
         Concurrent execution without shared memory, side-eects free
         computation
         Transparency of the network distribution
         Single-assignment semantics, improving testing and debugging
         Libraries for fault detection
         Code hot-swap




     A. Sivieri, L. Mottola, G. Cugola     ErLang for the Internet of Things   6
Erlang - A Brief Example




                                            Creating processes

   1    start (X ) -
   2        Pid = spawn(fun operations/0),
   3        Pid ! { self () , X} ,
   4        receive
   5              { Sender , Result } -
   6                   Result
   7        end .
   8
   9    operations () -
   10       receive
   11             { Sender , Number } -
   12                  Sender ! { self () , Number * Number };
   13             { Sender , Number1 , Number2 } -
   14                  Sender ! { self () , Number1 * Number2 }
   15       end .




        A. Sivieri, L. Mottola, G. Cugola                   ErLang for the Internet of Things   7
Erlang - A Brief Example




                                            Sending messages

   1    start (X ) -
   2        Pid = spawn ( fun operations /0) ,
   3        Pid ! {self(), X},
   4        receive
   5              { Sender , Result } -
   6                   Result
   7        end .
   8
   9    operations () -
   10       receive
   11             { Sender , Number } -
   12                  Sender ! { self () , Number * Number };
   13             { Sender , Number1 , Number2 } -
   14                  Sender ! { self () , Number1 * Number2 }
   15       end .




        A. Sivieri, L. Mottola, G. Cugola                  ErLang for the Internet of Things   7
Erlang - A Brief Example




                      Receiving messages using pattern matching

   1    start (X ) -
   2        Pid = spawn ( fun operations /0) ,
   3        Pid ! { self () , X} ,
   4        receive
   5              { Sender , Result } -
   6                   Result
   7        end .
   8
   9    operations () -
   10       receive
   11             {Sender, Number} -
   12                  Sender ! {self(), Number * Number};
   13             { Sender , Number1 , Number2 } -
   14                  Sender ! { self () , Number1 * Number2 }
   15       end .




        A. Sivieri, L. Mottola, G. Cugola                  ErLang for the Internet of Things   7
Outline




   Erlang


   ELIoT


   Preliminary results


   Conclusions




      A. Sivieri, L. Mottola, G. Cugola   ErLang for the Internet of Things   8
ELIoT
The library




            Processes must be explicitly allowed to receive messages from
            other devices
            The send operator (!) also supports broadcast operations
      1    myprocess () -
      2        erlang : register ( somename , self ()) ,
      3        erlang : export ( somename ),
      4        Data = eliot_gpio : get (? TEMPERATURE ) ,
      5        { somename , all } ! { temperature , Data }.




          A. Sivieri, L. Mottola, G. Cugola                   ErLang for the Internet of Things   9
ELIoT
The library


           Processes can be spawned on other nodes of the network,
           nodes can specify properties that can be used to choose on
           which of them these processes will be executed


    mysensor_init() -
         eliot:put(room, 301).

    mysink_update () -
        Cnd = fun () -
              eliot : get ( room ) == 301
        end ,
        eliot : spawn ( fun newfunction /0 , Cnd ).




         A. Sivieri, L. Mottola, G. Cugola            ErLang for the Internet of Things   10
ELIoT
The library


           Processes can be spawned on other nodes of the network,
           nodes can specify properties that can be used to choose on
           which of them these processes will be executed


    mysensor_init () -
        eliot : put ( room , 301).

    mysink_update() -
         Cnd = fun() -
              eliot:get(room) == 301
         end,
         eliot:spawn(fun newfunction/0, Cnd).




         A. Sivieri, L. Mottola, G. Cugola      ErLang for the Internet of Things   10
ELIoT
The interpreter

          Removed all functionalities integrated in the platform but not
          required for IoT applications
          Support for sensing and actuation devices
          Support for broadcast operations directly integrated in the
          interpreter


                                            Microprocessor      Ralink RT3050
                                            RAM                 32 MB
                                            ROM                 8 MB
                                            Freq.               320 MHz
                                            Networking          Ethernet, WiFi
                                            Interfaces          GPIO/SPI/I2C/Serial



        A. Sivieri, L. Mottola, G. Cugola      ErLang for the Internet of Things      11
ELIoT
The simulator




          Leverage Erlang native transparency of the network distribution
          Full simulation using virtual nodes and unmodied code,
          model the virtual communication using dierent techniques
          Mixed simulation using virtual and real nodes at the same time
        A. Sivieri, L. Mottola, G. Cugola     ErLang for the Internet of Things   12
ELIoT
The simulator




        A. Sivieri, L. Mottola, G. Cugola   ErLang for the Internet of Things   13
Outline




   Erlang


   ELIoT


   Preliminary results


   Conclusions




      A. Sivieri, L. Mottola, G. Cugola   ErLang for the Internet of Things   14
Preliminary results


   Example applications
        Trickle, a propagation algorithm
        Opportunistic ooder, another propagation algorithm
        Collection Tree Protocol, a data collection algorithm

   Some numbers
            Algorithm                     TinyOS Contiki ELIoT % gained
            Opportunistic ooder          495     187          178        5-64%
            Trickle                       219     194          148        24-32%
            CTP                           2169    1470         450        70-80%

                                          Lines of code




      A. Sivieri, L. Mottola, G. Cugola                   ErLang for the Internet of Things   15
A. Sivieri, L. Mottola, G. Cugola   ErLang for the Internet of Things   16
Outline




   Erlang


   ELIoT


   Preliminary results


   Conclusions




      A. Sivieri, L. Mottola, G. Cugola   ErLang for the Internet of Things   17
Conclusions
    Leverage Erlang native characteristics, introduce new
    mechanisms required by IoT
    Single node programming, reprogramming of the entire
    network
    Testing and simulation in full or mixed congurations

Future Works
    Integration of IoT idioms into the language
    Further customization of the interpreter
    Formal verication (correctness) of applications



  A. Sivieri, L. Mottola, G. Cugola     ErLang for the Internet of Things   18
Thank You




                                        Questions?

    A. Sivieri, L. Mottola, G. Cugola                ErLang for the Internet of Things   19

More Related Content

Viewers also liked

Welcome to the Foodiesphere
Welcome to the FoodiesphereWelcome to the Foodiesphere
Welcome to the Foodiesphere
Alexandra Tursi
 
introduction to experience it
introduction to experience itintroduction to experience it
introduction to experience it
experience it inc
 

Viewers also liked (16)

Tesi magistrale
Tesi magistraleTesi magistrale
Tesi magistrale
 
Vermont Small Business Summit Social Media Presentation
Vermont Small Business Summit Social Media PresentationVermont Small Business Summit Social Media Presentation
Vermont Small Business Summit Social Media Presentation
 
Strategic Planning
Strategic PlanningStrategic Planning
Strategic Planning
 
Songs For Worship
Songs For WorshipSongs For Worship
Songs For Worship
 
Personal Branding in the DIgital Age for Vermont Women in HIgher Education
Personal Branding in the DIgital Age for Vermont Women in HIgher EducationPersonal Branding in the DIgital Age for Vermont Women in HIgher Education
Personal Branding in the DIgital Age for Vermont Women in HIgher Education
 
Conferenza LyX - Introduzione a LaTeX
Conferenza LyX - Introduzione a LaTeXConferenza LyX - Introduzione a LaTeX
Conferenza LyX - Introduzione a LaTeX
 
Conferenza Embedded - Arduino
Conferenza Embedded - ArduinoConferenza Embedded - Arduino
Conferenza Embedded - Arduino
 
Welcome to the Foodiesphere
Welcome to the FoodiesphereWelcome to the Foodiesphere
Welcome to the Foodiesphere
 
Computertan case study
Computertan case studyComputertan case study
Computertan case study
 
What Is SCS
What Is SCSWhat Is SCS
What Is SCS
 
La importancia de integrar en la Gestión Pública Sistemas de Monitoreo y Eva...
La importancia de integrar en la Gestión Pública Sistemas de Monitoreo y Eva...La importancia de integrar en la Gestión Pública Sistemas de Monitoreo y Eva...
La importancia de integrar en la Gestión Pública Sistemas de Monitoreo y Eva...
 
Observatorio Social Amazonico Junio 2009 UNFV
Observatorio Social Amazonico Junio 2009 UNFVObservatorio Social Amazonico Junio 2009 UNFV
Observatorio Social Amazonico Junio 2009 UNFV
 
Doctoral Studies In UK
Doctoral Studies In UKDoctoral Studies In UK
Doctoral Studies In UK
 
introduction to experience it
introduction to experience itintroduction to experience it
introduction to experience it
 
KDE @ Corsi Linux 2011
KDE @ Corsi Linux 2011KDE @ Corsi Linux 2011
KDE @ Corsi Linux 2011
 
LaTeX: gli editor
LaTeX: gli editorLaTeX: gli editor
LaTeX: gli editor
 

Similar to Sesena 2012

Introduction To Erlang Final
Introduction To Erlang   FinalIntroduction To Erlang   Final
Introduction To Erlang Final
SinarShebl
 

Similar to Sesena 2012 (20)

Getting Started with the Internet of Things - Allianz Hackrisk Hackathon 29/...
Getting Started with the Internet of Things  - Allianz Hackrisk Hackathon 29/...Getting Started with the Internet of Things  - Allianz Hackrisk Hackathon 29/...
Getting Started with the Internet of Things - Allianz Hackrisk Hackathon 29/...
 
IoT ppt(004).pptx
IoT ppt(004).pptxIoT ppt(004).pptx
IoT ppt(004).pptx
 
An introduction to erlang
An introduction to erlangAn introduction to erlang
An introduction to erlang
 
Introduction to Arduino Hardware and Programming
Introduction to Arduino Hardware and ProgrammingIntroduction to Arduino Hardware and Programming
Introduction to Arduino Hardware and Programming
 
Pre meetup intel® roadshow london
Pre meetup intel® roadshow londonPre meetup intel® roadshow london
Pre meetup intel® roadshow london
 
Arduino 101
Arduino 101Arduino 101
Arduino 101
 
Arduino: Arduino starter kit
Arduino: Arduino starter kitArduino: Arduino starter kit
Arduino: Arduino starter kit
 
Introduction To Erlang Final
Introduction To Erlang   FinalIntroduction To Erlang   Final
Introduction To Erlang Final
 
Internet of things - The Present & The Future
Internet of things - The Present & The FutureInternet of things - The Present & The Future
Internet of things - The Present & The Future
 
Physical Computing and IoT
Physical Computing and IoTPhysical Computing and IoT
Physical Computing and IoT
 
Arduino Information by Arpit Sharma
Arduino Information by Arpit SharmaArduino Information by Arpit Sharma
Arduino Information by Arpit Sharma
 
Erlang
ErlangErlang
Erlang
 
Exploring the Internet of Things Using Ruby
Exploring the Internet of Things Using RubyExploring the Internet of Things Using Ruby
Exploring the Internet of Things Using Ruby
 
Fullstack IoT Development
Fullstack IoT DevelopmentFullstack IoT Development
Fullstack IoT Development
 
Cisco Certified Network Associate
Cisco Certified Network AssociateCisco Certified Network Associate
Cisco Certified Network Associate
 
Erlang real time
Erlang real timeErlang real time
Erlang real time
 
Microsoft's view of the Internet of Things (IoT) by Imran Shafqat
Microsoft's view of the Internet of Things (IoT) by Imran ShafqatMicrosoft's view of the Internet of Things (IoT) by Imran Shafqat
Microsoft's view of the Internet of Things (IoT) by Imran Shafqat
 
Internet of Things (IoT) reference architecture using Azure -MIC - Lahore
Internet of Things (IoT) reference architecture using Azure -MIC - LahoreInternet of Things (IoT) reference architecture using Azure -MIC - Lahore
Internet of Things (IoT) reference architecture using Azure -MIC - Lahore
 
OVERVIEW OF ICT LAB RESEARCH
OVERVIEW OF ICT LAB RESEARCHOVERVIEW OF ICT LAB RESEARCH
OVERVIEW OF ICT LAB RESEARCH
 
Road to Republic of IoT - IoT Technologies & Machine Learning
Road to Republic of IoT - IoT Technologies & Machine LearningRoad to Republic of IoT - IoT Technologies & Machine Learning
Road to Republic of IoT - IoT Technologies & Machine Learning
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Recently uploaded (20)

DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 

Sesena 2012

  • 1. Drop the Phone and Talk to the Physical World: Programming the Internet of Things with Erlang Alessandro Sivieri Luca Mottola Gianpaolo Cugola DEEPSE Group Dipartimento di Elettronica e Informazione Politecnico di Milano Third International Workshop on Software Engineering for Sensor Network Applications June 2nd , 2012
  • 2. Scenario Internet of Things Sensing and actuation systems Massively decentralized Heterogeneous devices Wireless Sensor Networks Forerunner and key component of IoT WSN community was the rst to tackle the IoT issues A. Sivieri, L. Mottola, G. Cugola ErLang for the Internet of Things 2
  • 3. Motivation Current approaches Low-level frameworks (i.e., TinyOS, Contiki): full control of resources vs. diculties in testing and maintaining applications High-level frameworks (i.e., Regiment, Flask): ease of programming vs. generality and performance A. Sivieri, L. Mottola, G. Cugola ErLang for the Internet of Things 3
  • 4. ErLang meets IoT Why Erlang Actor-like concurrency model Declarative programming ... ELIoT Dedicated libraries and customized syntax for many-to-many IPC Reduced hardware requirements for the run-time system Dedicated simulator (full and mixed congurations) A. Sivieri, L. Mottola, G. Cugola ErLang for the Internet of Things 4
  • 5. Outline Erlang ELIoT Preliminary results Conclusions A. Sivieri, L. Mottola, G. Cugola ErLang for the Internet of Things 5
  • 6. Erlang Main characteristics Concurrent execution without shared memory, side-eects free computation Transparency of the network distribution Single-assignment semantics, improving testing and debugging Libraries for fault detection Code hot-swap A. Sivieri, L. Mottola, G. Cugola ErLang for the Internet of Things 6
  • 7. Erlang - A Brief Example Creating processes 1 start (X ) - 2 Pid = spawn(fun operations/0), 3 Pid ! { self () , X} , 4 receive 5 { Sender , Result } - 6 Result 7 end . 8 9 operations () - 10 receive 11 { Sender , Number } - 12 Sender ! { self () , Number * Number }; 13 { Sender , Number1 , Number2 } - 14 Sender ! { self () , Number1 * Number2 } 15 end . A. Sivieri, L. Mottola, G. Cugola ErLang for the Internet of Things 7
  • 8. Erlang - A Brief Example Sending messages 1 start (X ) - 2 Pid = spawn ( fun operations /0) , 3 Pid ! {self(), X}, 4 receive 5 { Sender , Result } - 6 Result 7 end . 8 9 operations () - 10 receive 11 { Sender , Number } - 12 Sender ! { self () , Number * Number }; 13 { Sender , Number1 , Number2 } - 14 Sender ! { self () , Number1 * Number2 } 15 end . A. Sivieri, L. Mottola, G. Cugola ErLang for the Internet of Things 7
  • 9. Erlang - A Brief Example Receiving messages using pattern matching 1 start (X ) - 2 Pid = spawn ( fun operations /0) , 3 Pid ! { self () , X} , 4 receive 5 { Sender , Result } - 6 Result 7 end . 8 9 operations () - 10 receive 11 {Sender, Number} - 12 Sender ! {self(), Number * Number}; 13 { Sender , Number1 , Number2 } - 14 Sender ! { self () , Number1 * Number2 } 15 end . A. Sivieri, L. Mottola, G. Cugola ErLang for the Internet of Things 7
  • 10. Outline Erlang ELIoT Preliminary results Conclusions A. Sivieri, L. Mottola, G. Cugola ErLang for the Internet of Things 8
  • 11. ELIoT The library Processes must be explicitly allowed to receive messages from other devices The send operator (!) also supports broadcast operations 1 myprocess () - 2 erlang : register ( somename , self ()) , 3 erlang : export ( somename ), 4 Data = eliot_gpio : get (? TEMPERATURE ) , 5 { somename , all } ! { temperature , Data }. A. Sivieri, L. Mottola, G. Cugola ErLang for the Internet of Things 9
  • 12. ELIoT The library Processes can be spawned on other nodes of the network, nodes can specify properties that can be used to choose on which of them these processes will be executed mysensor_init() - eliot:put(room, 301). mysink_update () - Cnd = fun () - eliot : get ( room ) == 301 end , eliot : spawn ( fun newfunction /0 , Cnd ). A. Sivieri, L. Mottola, G. Cugola ErLang for the Internet of Things 10
  • 13. ELIoT The library Processes can be spawned on other nodes of the network, nodes can specify properties that can be used to choose on which of them these processes will be executed mysensor_init () - eliot : put ( room , 301). mysink_update() - Cnd = fun() - eliot:get(room) == 301 end, eliot:spawn(fun newfunction/0, Cnd). A. Sivieri, L. Mottola, G. Cugola ErLang for the Internet of Things 10
  • 14. ELIoT The interpreter Removed all functionalities integrated in the platform but not required for IoT applications Support for sensing and actuation devices Support for broadcast operations directly integrated in the interpreter Microprocessor Ralink RT3050 RAM 32 MB ROM 8 MB Freq. 320 MHz Networking Ethernet, WiFi Interfaces GPIO/SPI/I2C/Serial A. Sivieri, L. Mottola, G. Cugola ErLang for the Internet of Things 11
  • 15. ELIoT The simulator Leverage Erlang native transparency of the network distribution Full simulation using virtual nodes and unmodied code, model the virtual communication using dierent techniques Mixed simulation using virtual and real nodes at the same time A. Sivieri, L. Mottola, G. Cugola ErLang for the Internet of Things 12
  • 16. ELIoT The simulator A. Sivieri, L. Mottola, G. Cugola ErLang for the Internet of Things 13
  • 17. Outline Erlang ELIoT Preliminary results Conclusions A. Sivieri, L. Mottola, G. Cugola ErLang for the Internet of Things 14
  • 18. Preliminary results Example applications Trickle, a propagation algorithm Opportunistic ooder, another propagation algorithm Collection Tree Protocol, a data collection algorithm Some numbers Algorithm TinyOS Contiki ELIoT % gained Opportunistic ooder 495 187 178 5-64% Trickle 219 194 148 24-32% CTP 2169 1470 450 70-80% Lines of code A. Sivieri, L. Mottola, G. Cugola ErLang for the Internet of Things 15
  • 19. A. Sivieri, L. Mottola, G. Cugola ErLang for the Internet of Things 16
  • 20. Outline Erlang ELIoT Preliminary results Conclusions A. Sivieri, L. Mottola, G. Cugola ErLang for the Internet of Things 17
  • 21. Conclusions Leverage Erlang native characteristics, introduce new mechanisms required by IoT Single node programming, reprogramming of the entire network Testing and simulation in full or mixed congurations Future Works Integration of IoT idioms into the language Further customization of the interpreter Formal verication (correctness) of applications A. Sivieri, L. Mottola, G. Cugola ErLang for the Internet of Things 18
  • 22. Thank You Questions? A. Sivieri, L. Mottola, G. Cugola ErLang for the Internet of Things 19