the case for a functional internet of things...elixir (functional) version compared to ruby (oo)...
TRANSCRIPT
![Page 1: The Case for a Functional Internet of Things...Elixir (functional) version compared to ruby (OO) Elixir version is better in any metric, even size (50%) No bugs found till today. Key](https://reader036.vdocuments.net/reader036/viewer/2022071219/60570a93148bfa2ce52ef275/html5/thumbnails/1.jpg)
Till Hänisch, Baden Württemberg State University, www.tillh.de
The Case for a Functional Internet of Things
![Page 2: The Case for a Functional Internet of Things...Elixir (functional) version compared to ruby (OO) Elixir version is better in any metric, even size (50%) No bugs found till today. Key](https://reader036.vdocuments.net/reader036/viewer/2022071219/60570a93148bfa2ce52ef275/html5/thumbnails/2.jpg)
Till Hänisch, Baden Württemberg State University, www.tillh.de
The Case for a Functional Internet of Things
![Page 3: The Case for a Functional Internet of Things...Elixir (functional) version compared to ruby (OO) Elixir version is better in any metric, even size (50%) No bugs found till today. Key](https://reader036.vdocuments.net/reader036/viewer/2022071219/60570a93148bfa2ce52ef275/html5/thumbnails/3.jpg)
Overview of the system
![Page 4: The Case for a Functional Internet of Things...Elixir (functional) version compared to ruby (OO) Elixir version is better in any metric, even size (50%) No bugs found till today. Key](https://reader036.vdocuments.net/reader036/viewer/2022071219/60570a93148bfa2ce52ef275/html5/thumbnails/4.jpg)
Messages from the sensor nodes
Too many bugs !
• Why ?• Mostly special case/error handling• Many special cases• Complex code• Hard to test
• Solution• ???• Make it easier• But how
![Page 5: The Case for a Functional Internet of Things...Elixir (functional) version compared to ruby (OO) Elixir version is better in any metric, even size (50%) No bugs found till today. Key](https://reader036.vdocuments.net/reader036/viewer/2022071219/60570a93148bfa2ce52ef275/html5/thumbnails/5.jpg)
Stream of messages
Sensor
Graphics
Database
File
Processing data from sensor nodes = transforming, duplicating, storing messages =applying functions to messages =functional programming
![Page 6: The Case for a Functional Internet of Things...Elixir (functional) version compared to ruby (OO) Elixir version is better in any metric, even size (50%) No bugs found till today. Key](https://reader036.vdocuments.net/reader036/viewer/2022071219/60570a93148bfa2ce52ef275/html5/thumbnails/6.jpg)
Shorter, simpler
ruby version
elixir version
# = comment| = non blank line{/} = open/close block
Analogue to: Ward Cunningham, Signature Survey: A Method for Browsing Unfamiliar Code
![Page 7: The Case for a Functional Internet of Things...Elixir (functional) version compared to ruby (OO) Elixir version is better in any metric, even size (50%) No bugs found till today. Key](https://reader036.vdocuments.net/reader036/viewer/2022071219/60570a93148bfa2ce52ef275/html5/thumbnails/7.jpg)
Typical functions
Most complex function
![Page 8: The Case for a Functional Internet of Things...Elixir (functional) version compared to ruby (OO) Elixir version is better in any metric, even size (50%) No bugs found till today. Key](https://reader036.vdocuments.net/reader036/viewer/2022071219/60570a93148bfa2ce52ef275/html5/thumbnails/8.jpg)
Elixir (functional) version compared to ruby (OO)
Elixir version is better in any metric, even size (50%)No bugs found till today
![Page 9: The Case for a Functional Internet of Things...Elixir (functional) version compared to ruby (OO) Elixir version is better in any metric, even size (50%) No bugs found till today. Key](https://reader036.vdocuments.net/reader036/viewer/2022071219/60570a93148bfa2ce52ef275/html5/thumbnails/9.jpg)
Key findings ….
• Shorter, easier code by using a functional language
• lower complexity
• fewer bugs
• Elixir is production ready
• Functional programming might be a way to develop reliable IoT applications
![Page 10: The Case for a Functional Internet of Things...Elixir (functional) version compared to ruby (OO) Elixir version is better in any metric, even size (50%) No bugs found till today. Key](https://reader036.vdocuments.net/reader036/viewer/2022071219/60570a93148bfa2ce52ef275/html5/thumbnails/10.jpg)
Why is (low) complexity important
• Complexity leads to bugs
• Bugs reduce security
• Availability
• Integrity/Confidentiality
• Internet of Things is
• embedded, hard to patch
• open, easy to access
Zero defect software is needed for the IoT���No general solution ! PROBLEM !