skip to main content
research-article

Could Tierless Languages Reduce IoT Development Grief?

Published: 23 February 2023 Publication History

Abstract

Internet of Things (IoT) software is notoriously complex, conventionally comprising multiple tiers. Traditionally an IoT developer must use multiple programming languages and ensure that the components interoperate correctly. A novel alternative is to use a single tierless language with a compiler that generates the code for each component and ensures their correct interoperation.
We report a systematic comparative evaluation of two tierless language technologies for IoT stacks: one for resource-rich sensor nodes (Clean with iTask) and one for resource-constrained sensor nodes (Clean with iTask and mTask). The evaluation is based on four implementations of a typical smart campus application: two tierless and two Python-based tiered.
(1) We show that tierless languages have the potential to significantly reduce the development effort for IoT systems, requiring 70% less code than the tiered implementations. Careful analysis attributes this code reduction to reduced interoperation (e.g., two embedded domain-specific languages and one paradigm versus seven languages and two paradigms), automatically generated distributed communication, and powerful IoT programming abstractions. (2) We show that tierless languages have the potential to significantly improve the reliability of IoT systems, describing how Clean iTask/mTask maintains type safety, provides higher-order failure management, and simplifies maintainability. (3) We report the first comparison of a tierless IoT codebase for resource-rich sensor nodes with one for resource-constrained sensor nodes. The comparison shows that they have similar code size (within 7%), and functional structure. (4) We present the first comparison of two tierless IoT languages, one for resource-rich sensor nodes and the other for resource-constrained sensor nodes.

References

[1]
Peter Achten. 2007. Clean for Haskell98 Programmers—A Quick Reference Guide. Retrieved from http://www.st.cs.ru.nl/papers/2007/CleanHaskellQuickGuide.pdf.
[2]
Nada Alhirabi, Omer Rana, and Charith Perera. 2021. Security and privacy requirements for the internet of things: A survey. ACM Trans. Internet Things 2, 1, Article 6 (February2021), 37 pages. DOI:
[3]
Artem Alimarine and Rinus Plasmeijer. 2002. A generic programming extension for clean. In Implementation of Functional Languages, Thomas Arts and Markus Mohnen (Eds.). Springer, Berlin, 168–185.
[4]
Kalev Alpernas, Yotam M. Y. Feldman, and Hila Peleg. 2020. The wonderful wizard of LoC: Paying attention to the man behind the curtain of lines-of-code metrics. In Proceedings of the ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software (Onward!’20). Association for Computing Machinery, New York, NY, 146–156. DOI:
[5]
Mandla Alphonsa. 2021. A review on IOT technology stack, architecture and its cloud applications in recent trends. In Proceedings of the International Conference on Communications and Cyber-Physical Engineering (ICCCE’20), Amit Kumar and Stefan Mozar (Eds.). Springer Singapore, Singapore, 703–711. DOI:
[6]
Manos Antonakakis, Tim April, Michael Bailey, Matt Bernhard, Elie Bursztein, Jaime Cochran, Zakir Durumeric, J. Alex Halderman, Luca Invernizzi, Michalis Kallitsis, Deepak Kumar, Chaz Lever, Zane Ma, Joshua Mason, Damian Menscher, Chad Seaman, Nick Sullivan, Kurt Thomas, and Yi Zhou. 2017. Understanding the mirai botnet. In Proceedings of the 26th USENIX Security Symposium (USENIX Security’17). USENIX Association, 1093–1110. https://www.usenix.org/conference/usenixsecurity17/technical-sessions/presentation/antonakakis.
[7]
Emmanuel Baccelli, Joerg Doerr, Ons Jallouli, Shinji Kikuchi, Andreas Morgenstern, Francisco Acosta Padilla, Kaspar Schleiser, and Ian Thomas. 2018. Reprogramming low-end IoT devices from the cloud. In Proceedings of the 3rd Cloudification of the Internet of Things (CIoT’18). IEEE, 1–6. DOI:
[8]
Vincent Balat. 2006. Ocsigen: Typing web interaction with objective caml. In Proceedings of the Workshop on Machine Learning (ML’06) . Association for Computing Machinery, New York, NY, 84–94. DOI:
[9]
Erik Barendsen and Sjaak Smetsers. 1996. Uniqueness typing for functional languages with graph rewriting semantics. Math. Struct. Comput. Sci. 6, 6 (1996), 579–612. DOI:
[10]
Alvine Boaye Belle, Ghizlane El-Boussaidi, Christian Desrosiers, and Hafedh Mili. 2013. The layered architecture revisited: Is it an optimization problem? In Proceedings of the 25th International Conference on Software Engineering & Knowledge E, Vol. 1. KSI Research Inc, Boston, MA, 344–349.
[11]
Joel Bjornson, Anton Tayanovskyy, and Adam Granicz. 2011. Composing reactive GUIs in f# using websharper. In Implementation and Application of Functional Languages, Jurriaan Hage and Marco T. Morazán (Eds.). Springer, Berlin, 203–216. DOI:
[12]
Michel Boer, de. 2020. Secure Communication Channels for the mTask System. Bachelor’s thesis. Radboud University, Nijmegen.
[13]
Stephen Cass. 2020. The top programming languages: Our latest rankings put python on top-again-[careers]. IEEE Spectr. 57, 8 (2020), 22–22. DOI:
[14]
Stephen Chong, Jed Liu, Andrew C. Myers, Xin Qi, Krishnaprasad Vikram, Lantian Zheng, and Xin Zheng. 2007. Secure web applications via automatic partitioning. ACM SIGOPS Operat. Syst. Rev. 41, 6 (2007), 31–44. DOI:
[15]
Ezra Cooper, Sam Lindley, Philip Wadler, and Jeremy Yallop. 2007. Links: Web programming without tiers. In Formal Methods for Components and Objects, Frank S. de Boer, Marcello M. Bonsangue, Susanne Graf, and Willem-Paul de Roever (Eds.). Springer, Berlin, 266–296. DOI:
[16]
Sjoerd Crooijmans. 2021. Reducing the Power Consumption of IoT Devices in Task-Oriented Programming. Master’s thesis Radboud University, Nijmegen. DOI:
[17]
László Domoszlai, Bas Lijnse, and Rinus Plasmeijer. 2014. Parametric lenses: Change notification for bidirectional lenses. In Proceedings of the 26th International Symposium on Implementation and Application of Functional Languages (IFL’14). Association for Computing Machinery, New York, NY. DOI:
[18]
Danny Dubé. 2000. BIT: A very compact scheme system for embedded applications. In Proceedings of the Workshop on Scheme and Functional Programming.
[19]
Anton Ekblad and Koen Claessen. 2014. A seamless, client-centric programming model for type safe web applications. SIGPLAN Not. 49, 12 (September 2014), 79–89. DOI:
[20]
Trevor Elliott, Lee Pike, Simon Winwood, Pat Hickey, James Bielman, Jamey Sharp, Eric Seidel, and John Launchbury. 2015. Guilt free ivory. In Proceedings of the ACM SIGPLAN Symposium on Haskell (Haskell’15). Association for Computing Machinery, New York, NY, 189–200. DOI:
[21]
Jeff Epstein, Andrew P. Black, and Simon Peyton-Jones. 2011. Towards haskell in the cloud. In Proceedings of the 4th ACM Symposium on Haskell (Haskell’11). Association for Computing Machinery, New York, NY, 118–129. DOI:
[22]
Marc Feeley and Danny Dubé. 2003. PICBIT: A scheme system for the PIC microcontroller. In Proceedings of the 4th Workshop on Scheme and Functional Programming. 7–15.
[23]
Michael Furr and Jeffrey S. Foster. 2005. Checking type safety of foreign function calls. SIGPLAN Not. 40, 6 (June 2005), 62–72. DOI:
[24]
Dominique Guinard and Vlad Trifa. 2016. Building the Web of Things: With Examples in Node.Js and Raspberry Pi (1st ed.). Manning Publications Co., Shelter Island, NY.
[25]
Munish Gupta. 2012. Akka Essentials. Packt Publishing, Birmingham, England.
[26]
Cordelia Hall, Kevin Hammond, Will Partain, Simon L. Peyton Jones, and Philip Wadler. 1993. The glasgow haskell compiler: A retrospective. In Functional Programming (Workshops in Computing). Springer, Berlin, 62–71. DOI:
[27]
Natascha Harth, Christos Anagnostopoulos, and Dimitrios Pezaros. 2018. Predictive intelligence to the edge: Impact on edge analytics. Evolv. Syst. 9, 2 (2018), 95–118. DOI:
[28]
HaskellWiki. 2020. Introduction to IO—HaskellWiki. Retrieved January 19, 2021 from https://wiki.haskell.org/index.php?title=Introduction_to_IO&oldid=63493.
[29]
Kristian Hentschel, Dejice Jacob, Jeremy Singer, and Matthew Chalmers. 2016. Supersensors: Raspberry pi devices for smart campus infrastructure. In Proceedings of the 4th International Conference on Future Internet of Things and Cloud (FiCloud’16), Muhammad Younas, Irfan Awan, and Winston Seah (Eds.). IEEE, 58–62. DOI:
[30]
Stephen Herwig, Katura Harvey, George Hughey, Richard Roberts, and Dave Levin. 2019. Measurement and analysis of hajime, a peer-to-peer IoT botnet. In Proceedings of the Network and Distributed Systems Security Symposium (NDSS’19). Internet Society, Reston, VA, 15. DOI:
[31]
Joey Hess. 2020. arduino-copilot: Arduino programming in haskell using the Copilot stream DSL. Retrieved from https//hackage.haskell.org/package/arduino-copilot.
[32]
Ralf Hinze. 2000. A new approach to generic functional programming. In Proceedings of the 27th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’00). Association for Computing Machinery, New York, NY, 119–132. DOI:
[33]
John Hughes. 1989. Why functional programming matters. Comput. J. 32, 2 (1989), 98–107. DOI:
[34]
Christopher Ireland, David Bowers, Michael Newton, and Kevin Waugh. 2009. A classification of object-relational impedance mismatch. In Proceedings of the 1st International Confernce on Advances in Databases, Knowledge, and Data Applications. IEEE, 36–43. DOI:
[35]
David Johnson-Davies. 2020. Lisp for Microcontrollers. Retrieved from https://ulisp.com.
[36]
P. S. Kochhar, D. Wijedasa, and D. Lo. 2016. A large scale study of multiple programming languages and code quality. In Proceedings of the 23rd International Conference on Software Analysis, Evolution, and Reengineering. IEEE, 563–573. DOI:
[37]
Ravi Kishore Kodali and Kopulwar Shishir Mahesh. 2016. Low cost ambient monitoring using ESP8266. In Proceedings of the 2nd International Conference on Contemporary Computing and Informatics (IC3I’16). IEEE, 779–782. DOI:
[38]
Pieter Koopman, Mart Lubbers, and Rinus Plasmeijer. 2018. A task-based DSL for microcomputers. In Proceedings of the Real World Domain Specific Languages Workshop (RWDSL20’). ACM Press, New York, NY, 1–11. DOI:
[39]
Byeongcheol Lee, Ben Wiedermann, Martin Hirzel, Robert Grimm, and Kathryn S. McKinley. 2010. Jinn: Synthesizing dynamic bug detectors for foreign language interfaces. SIGPLAN Not. 45, 6 (June 2010), 36–49. DOI:
[40]
Jong Kook Lee, Seung Jae Jung, Soo Dong Kim, Woo Hyun Jang, and Dong Han Ham. 2001. Component identification method with coupling and cohesion. In Proceedings of the 8th Asia-Pacific Software Engineering Conference. IEEE, IEEE, 79–86. DOI:
[41]
Philip Levis and David Culler. 2002. Maté: A tiny virtual machine for sensor networks. ACM SIGPLAN Not. 37, 10 (2002), 85–95. DOI:
[42]
Roger Light. 2017. Mosquitto: Server and client implementation of the MQTT protocol. J. Open Source Softw. 2, 13 (2017), 265.
[43]
Mart Lubbers, Pieter Koopman, and Rinus Plasmeijer. 2019. Interpreting task oriented programs on tiny computers. In Proceedings of the 31st Symposium on Implementation and Application of Functional Languages (IFL’19), Jurriën Stutterheim and Wei Ngan Chin (Eds.). Association for Computing Machinery, New York, NY, 1–12. DOI: event-place: Singapore, Singapore.
[44]
Mart Lubbers, Pieter Koopman, and Rinus Plasmeijer. 2019. Multitasking on microcontrollers using task oriented programming. In Proceedings of the 42nd International Convention on Information and Communication Technology, Electronics and Microelectronics (MICRO’19). IEEE, 1587–1592. DOI:
[45]
Mart Lubbers, Pieter Koopman, and Rinus Plasmeijer. 2019. Writing internet of things applications with task oriented programming. In Proceedings of the Central European Functional Programming School: 8th Summer School (CEFP’19), Revised Selected Papers. Springer International Publishing, 51. DOI:
[46]
Mart Lubbers, Pieter Koopman, Adrian Ramsingh, Jeremy Singer, and Phil Trinder. 2020. Tiered versus tierless IoT stacks: Comparing smart campus software architectures. In Proceedings of the 10th International Conference on the Internet of Things (IoT’20). Association for Computing Machinery, New York, NY, Article 21, 9 pages. DOI:
[47]
Alan MacCormack, John Rusnak, and Carliss Y. Baldwin. 2007. The Impact of Component Modularity on Design Evolution: Evidence from the Software Industry. Technical Report 08-038. Harvard Business School Technology and Operations Management Unit, Boston, MA. DOI:
[48]
Philip Mayer and Alexander Bauer. 2015. An empirical analysis of the utilization of multiple programming languages in open source projects. In Proceedings of the 19th International Conference on Evaluation and Assessment in Software Engineering (EASE’15). Association for Computing Machinery, New York, NY, Article 4, 10 pages. DOI:
[49]
Philip Mayer, Michael Kirsch, and Minh Anh Le. 2017. On multi-language software development, cross-language links and accompanying tools: A survey of professional software developers. J. Softw. Eng. Res. Dev. 5, 1 (2017), 1. DOI:
[50]
Daniele Mazzei, Giacomo Baldi, Gabriele Montelisciani, and Gualtiero Fantoni. 2018. A full stack for quick prototyping of IoT solutions. Ann. Telecommun. 73, 7-8 (2018), 439–449. DOI:
[51]
Rebeca C. Motta, Káthia M. de Oliveira, and Guilherme H. Travassos. 2018. On challenges in engineering IoT software systems. In Proceedings of the XXXII Brazilian Symposium on Software Engineering (SBES’18). Association for Computing Machinery, New York, NY, USA, 42–51. DOI:
[52]
Henry Muccini and Mahyar Tourchi Moghaddam. 2018. IoT architectural styles. In Software Architecture, Carlos E. Cuesta, David Garlan, and Jennifer Pérez (Eds.). Springer International Publishing, Cham, 68–85. DOI:
[53]
Henrik Nilsson, Antony Courtney, and John Peterson. 2002. Functional reactive programming, continued. In Proceedings of theACM SIGPLAN Workshop on Haskell (Haskell’02). Association for Computing Machinery, New York, NY, 51–64. DOI:
[54]
Arjan Oortgiese, John van Groningen, Peter Achten, and Rinus Plasmeijer. 2017. A distributed dynamic architecture for task oriented programming. In Proceedings of the 29th Symposium on Implementation and Application of Functional Programming Languages. ACM, New York, NY, 7.
[55]
Simon L. Peyton Jones and Philip Wadler. 1993. Imperative functional programming. In Proceedings of the 20th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’93). Association for Computing Machinery, New York, NY, 71–84. DOI:
[56]
Laure Philips, Coen De Roover, Tom Van Cutsem, and Wolfgang De Meuter. 2014. Towards tierless web development without tierless languages. In Proceedings of the ACM International Symposium on New Ideas, New Paradigms, and Reflections on Programming & Software (Onward!’14). Association for Computing Machinery, New York, NY, 69–81. DOI:
[57]
Sebastian Plamauer and Martin Langer. 2017. Evaluation of micropython as application layer programming language on cubesats. In Proceedings of the 30th International Conference on Architecture of Computing Systems(ARCS’17). VDE, Vienna, Austria, 1–9.
[58]
Rinus Plasmeijer, Peter Achten, and Pieter Koopman. 2007. iTasks: Executable specifications of interactive work flow systems for the web. In Proceedings of the 12th ACM SIGPLAN International Conference on Functional Programming (ICFP’07). ACM, New York, NY, 141–152.
[59]
Rinus Plasmeijer, Bas Lijnse, Steffen Michels, Peter Achten, and Pieter Koopman. 2012. Task-oriented programming in a pure functional language. In Proceedings of the 14th Symposium on Principles and Practice of Declarative Programming (PPDP’12). Association for Computing Machinery, New York, NY, 195–206. DOI:
[60]
Arvind Ravulavaru. 2018. Enterprise Internet of Things Handbook: Build End-to-end IoT Solutions using Popular IoT Platforms. Packt Publishing, Birmingham, UK.
[61]
Clean 3.0 Language Report. 2020. Uniqueness Typing. Retrieved February 2, 2021 from https://cloogle.org/doc/#_9.
[62]
Alexey Rodriguez, Johan Jeuring, Patrik Jansson, Alex Gerdes, Oleg Kiselyov, and Bruno C. d. S. Oliveira. 2008. Comparing libraries for generic programming in haskell. In Proceedings of the 1st ACM SIGPLAN Symposium on Haskell (Haskell’08). Association for Computing Machinery, New York, NY, 111–122. DOI:
[63]
Jarrett Rosenberg. 1997. Some misconceptions about lines of code. In Proceedings of the 4th International Software Metrics Symposium. IEEE, Los Alamitos, CA, 137–142. DOI:
[64]
Abhiroop Sarkar and Mary Sheeran. 2020. Hailstorm: A statically-typed, purely functional language for IoT applications. In Proceedings of the 22nd International Symposium on Principles and Practice of Declarative Programming (PPDP’20). Association for Computing Machinery, New York, NY. DOI:
[65]
Kensuke Sawada and Takuo Watanabe. 2016. Emfrp: A functional reactive programming language for small-scale embedded systems. In Companion Proceedings of the 15th International Conference on Modularity. Association for Computing Machinery, New York, NY, 36–44. DOI:
[66]
Manuel Serrano, Erick Gallesio, and Florian Loitsch. 2006. Hop: A language for programming the web 2.0. In Companion to the Proceedings of the Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA Companion’06). ACM, Portland, Oregon, USA, 975–985.
[67]
Pallavi Sethi and Smruti R. Sarangi. 2017. Internet of things: Architectures, protocols, and applications. J. Electr. Comput. Eng. 2017 (2017), 25 pages. DOI:
[68]
Steven D. Sheetz, David Henderson, and Linda Wallace. 2009. Understanding developer and manager perceptions of function points and source lines of code. J. Syst. Softw. 82, 9 (2009), 1540–1549. DOI:
[69]
Kazuhiro Shibanai and Takuo Watanabe. 2018. Distributed functional reactive programming on actor-based runtime. In Proceedings of the 8th ACM SIGPLAN International Workshop on Programming Based on Actors, Agents, and Decentralized Control (AGERE’18). Association for Computing Machinery, New York, NY, 13–22. DOI: event-place: Boston, MA, USA.
[70]
Alessandro Sivieri, Luca Mottola, and Gianpaolo Cugola. 2012. Drop the phone and talk to the physical world: Programming the internet of things with erlang. In Proceedings of the 3rd International Workshop on Software Engineering for Sensor Network Applications (SESENA’12). IEEE Press, Los Alamitos, CA, 8–14. DOI:
[71]
Vincent St-Amour and Marc Feeley. 2009. PICOBIT: A compact scheme system for microcontrollers. In Proceedings of the International Symposium on Implementation and Application of Functional Languages. Springer, South Orange, NJ, USA, 1–17.
[72]
Tim Steenvoorden, Nico Naus, and Markus Klinik. 2019. TopHat: A formal foundation for task-oriented programming. In Proceedings of the 21st International Symposium on Principles and Practice of Declarative Programming (Porto, Portugal) (PPDP’19). Association for Computing Machinery, New York, NY, USA, Article 17, 13 pages. DOI:
[73]
Isaac Strack. 2015. Getting Started with Meteor.js JavaScript Framework (2nd ed.). Packt Publishing, Birmingham, England.
[74]
Jurriën Stutterheim, Peter Achten, and Rinus Plasmeijer. 2018. Maintaining separation of concerns through task oriented software development. In Trends in Functional Programming, Meng Wang and Scott Owens (Eds.), Vol. 10788. Springer, Cham, 19–38. DOI:
[75]
Jurriën Stutterheim, Peter Achten, and Rinus Plasmeijer. 2018. Maintaining separation of concerns through task oriented software development. In Trends in Functional Programming, Meng Wang and Scott Owens (Eds.). Springer International Publishing, Cham, 19–38. DOI:
[76]
Ryan Suchocki and Sara Kalvala. 2015. Microscheme: Functional programming for the arduino. In Proceedings of the 2014 Scheme and Functional Programming Workshop. University of Indiana, Washington DC, USA, 9.
[77]
Giacomo Tanganelli, Carlo Vallati, and Enzo Mingozzi. 2015. CoAPthon: Easy development of CoAP-based IoT applications with python. In Proceedings of the IEEE 2nd World Forum on Internet of Things (WF-IoT). IEEE, Milan, Italy, 63–68. DOI:
[78]
CircuitPython Team. 2022. CircuitPython. https://circuitpython.org/. [Online; accessed 2-March-2022].
[79]
Christophe de Troyer, Jens Nicolay, and Wolfgang de Meuter. 2018. Building IoT systems using distributed first-class reactive programming. In Proceedings of the IEEE International Conference on Cloud Computing Technology and Science (CloudCom). IEEE, Nicosia, Cyprus, 185–192. DOI:
[80]
Nachiappan Valliappan, Robert Krook, Alejandro Russo, and Koen Claessen. 2020. Towards secure IoT programming in haskell. In Proceedings of the 13th ACM SIGPLAN International Symposium on Haskell. Association for Computing Machinery, New York, NY, 136–150. DOI:
[81]
Micropython Official Website. 2022. MicroPython Differences from CPython. https://docs.micropython.org/en/latest/genrst/index.html.
[82]
Pascal Weisenburger, Johannes Wirth, and Guido Salvaneschi. 2020. A survey of multitier programming. ACM Computing Surveys (CSUR) 53, 4 (2020), 1–35. DOI:
[83]
Mark Wijkhuizen. 2018. Security Analysis of the iTasks Framework. Bachelor’s thesis. Radboud University, Nijmegen.
[84]
Steve Zdancewic, Lantian Zheng, Nathaniel Nystrom, and Andrew C. Myers. 2002. Secure program partitioning. ACM Trans. Comput. Syst. 20, 3 (2002), 283–328. DOI:

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Transactions on Internet of Things
ACM Transactions on Internet of Things  Volume 4, Issue 1
February 2023
226 pages
EISSN:2577-6207
DOI:10.1145/3582892
Issue’s Table of Contents

Publisher

Association for Computing Machinery

New York, NY, United States

Journal Family

Publication History

Published: 23 February 2023
Online AM: 30 November 2022
Accepted: 23 October 2022
Revised: 25 July 2022
Received: 30 September 2021
Published in TIOT Volume 4, Issue 1

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Tierless languages
  2. IoT stacks

Qualifiers

  • Research-article

Funding Sources

  • Royal Netherlands Navy, the Radboud-Glasgow Collaboration Fund and UK EPSRC
  • STARDUST

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 290
    Total Downloads
  • Downloads (Last 12 months)97
  • Downloads (Last 6 weeks)6
Reflects downloads up to 20 Jan 2025

Other Metrics

Citations

Cited By

View all

View Options

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Full Text

View this article in Full Text.

Full Text

HTML Format

View this article in HTML Format.

HTML Format

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media