skip to main content
10.1145/3079368.3079383acmotherconferencesArticle/Chapter ViewAbstractPublication PagesprogrammingConference Proceedingsconference-collections
demonstration

An Elixir library for programming concurrent and distributed embedded systems

Published:03 April 2017Publication History

ABSTRACT

Development of embedded systems has been receiving in last decade a considerable attention for both academy and industry. Advances in hardware miniaturization, in particular, single-boards computers like Raspberry Pi, Beaglebone Black, allow for the use of high-level programming languages. Still, the greatest challenges when developing IoT applications are distribution and coordination. To date, mainstream languages (e.g. Java, JavaScript, Python) lack high- level abstractions to deal with distribution and coordination. For example, implementing standard leader election algorithms (e.g., Ring, Bully) with these languages, force developers to write code on top of low-level networking APIs. As a result, programmers need to write over and over, aspects like the discovery of peers, coordination, failure handling necessary for implementing distributed algorithms. Furthermore, craft and deploy such systems on embedded devices is also complex, due to hardware restrictions and software dependencies. In this demo, we show how a concurrent and distributed language with a rich macro system could in an easy and declarative way solve these problems. Our demo recreates a leader election algorithm between the nodes in an embedded environment by employing a Raspberry Pi cluster. The code for the leader election algorithm is built on top of a macro-based Elixir library which includes abstractions for distribution and coordination. Developers can use this library to translate core operations described by the Bully algorithm to declarative macro-constructs. This library also abstracts developers of communication and network concerns (e.g. service discovery and network monitoring). Furthermore, it includes an implementation of an Elixir behaviour (design pattern) to provide a base skeleton for developing leader-election applications.

References

  1. Saša Jurić. 2015. Elixir in Action. Manning Publications Co.Google ScholarGoogle Scholar
  2. Chris McCord. 2015. Metaprogramming Elixir. The Pragmatic Programmers, LLC.Google ScholarGoogle Scholar
  3. Dave Thomas. 2016. Programming Elixir 1.3. The Pragmatic Programmers, LLC.Google ScholarGoogle Scholar

Index Terms

  1. An Elixir library for programming concurrent and distributed embedded systems

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in
          • Published in

            cover image ACM Other conferences
            Programming '17: Companion Proceedings of the 1st International Conference on the Art, Science, and Engineering of Programming
            April 2017
            193 pages
            ISBN:9781450348362
            DOI:10.1145/3079368

            Copyright © 2017 Owner/Author

            Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for third-party components of this work must be honored. For all other uses, contact the Owner/Author.

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 3 April 2017

            Check for updates

            Qualifiers

            • demonstration
            • Research
            • Refereed limited
          • Article Metrics

            • Downloads (Last 12 months)6
            • Downloads (Last 6 weeks)1

            Other Metrics

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader