The IoT: POLYGOT Programming

Author Topic: The IoT: POLYGOT Programming  (Read 1283 times)

Offline Mst. Eshita Khatun

  • Full Member
  • ***
  • Posts: 149
    • View Profile
The IoT: POLYGOT Programming
« on: May 20, 2019, 12:32:30 PM »
Polyglot programming is also called multilingual programming. It is an art of developing simpler solutions by combining the best possible solutions using different programming languages and paradigms. This is based on the observation that there is no single programming paradigm or a programming language which can suit all the facets of modern day programming or software requirements. It is also called poly paradigm programming (PPP), to appreciate the fact that many modern day software combines a subset of imperative, functional, logical, object-oriented, concurrent, parallel, and reactive programming paradigms.

One of the oldest examples of polyglot programming is Emacs, which is a combination of parts written in both C and eLisp (dialect of Lisp). Web applications are generally based on three-tier architecture to promote loose coupling and modularity, and they are also a representation of polyglot software systems. Polyglot programming has been observed to have increased programmer productivity and software maintainability in web development.

Although the word “Polyglot” has been used in software development since 2002, the definition of Polyglot programming is not standardized yet. Many different definitions by polyglot practitioners have been documented.

One of the definitions says “programming in more than one language within the same context.”

Another one says “using multiple programming languages on the same managed run-time.”

Fjeldberg extends the definition, taking into account the developers’ perspective, as: “programming in more than one language within the same context, where the context is either within one team, or several teams where the integration between the resulting applications require knowledge of the languages involved.”

In a Polyglot programming environment, the platform used for the integration, and the different programming languages supported by the given platform are the two essential aspects. An Inverse pyramid



can be used to categorize the programming languages in a polyglot software system. The Inverse pyramid has three layers: stable, dynamic, and domain, as shown in the figure.

Statically typed programming-languages such as Java and C that provide well-tested and stable functionality settle toward the stable layer.

The less powerful general-purpose technologies, such as HTML and CSS, which are tightly coupled to a specific part of the application, bubble up to the top layer, and the dynamic layer in the middle consists of a variety of programming languages such as Groovy and Clojure, which are more flexible and aid rapid functionality development.

The inverse pyramid signifies the fact that it is the single stable language, which supports all of the previously described layers and various languages in a bedrock fashion.

Since IoT is characterized by heterogeneity in various forms, a single programming language or a single programming model may not be able to provide complete support for the application development in IoT. As we have already argued, at least a coordination language and a computa – tional language is required in a unified programming model for IoT, which, in a way, is polyglot programming.

Programming for IoT is usually a polyglot (multiple languages) effort since the Internet-of-Things (IoT) is a system of inter-related computing devices that are provided with unique identifiers and the ability to transfer data over a network. The choice of programming-language depends on the capability and purpose of the device. IoT encompasses a variety of devices including edge devices, gateways, and cloud servers.

The most popular languages in IoT are Java, C, C++, Python, Javascript, Node.js, Assembler, PHP, C#, Lua, R, Go, Ruby, Swift and Rust in descending order of popularity. This is from a 2017 online survey co-sponsored by Eclipse IoT Working Group, IEEE IoT, AGILE IoT and IoT Council in which 713 individuals participated.

Other languages include Parasail, Microsoft P, Eclipse Mita, Kotlin, Dart, MicroPython, and B#.

IDEs and tools for IoT are many but i list some of them below:

Eclipse IOT project (Kura) – This is a Java-based development framework for IoT applications.

Arduino IDE – This IDE includes support for the C and C++ programming languages for programmable microcontrollers. It’s a complete package with many examples and pre-loaded libraries.

Raspbian – This IDE comes with many packages and examples created specifically for the Raspberry Pi boards.

OpenSCADA – This project is a part of Eclipse IOT Industry Working Group along with Eclipse SCADA (Supervisory Control and Data Acquisition). It provides several libraries, interface apps, and configuration tools.

PlatformIO – This is a cross-platform IDE that supports over 400 embedded boards, and several development platforms and frameworks.

Macchina.io – This is a toolkit for building embedded applications for IoT using POCO C++ libraries and the V8 JavaScript engine. The core is implemented in C++. JavaScript is used for application development. It enables dynamically extensible modular applications using the plug-in and services model similar to OSGi in Java.
Mst. Eshita Khatun
Senior Lecturer
Dept. of Computer Science & Engineering
Daffodil International University
102, Sukrabad, Mirpur Rd, Dhanmondi, Dhaka 1207, Bangladesh
eshita.cse@diu.edu.bd