Implementing a Language for Distributed Systems: Choices and Experiences with Type Level and Macro Programming in Scala
Year: 2020
Type: article
Abstract: Multitier programming languages reduce the complexity of developing distributed software by developing the distributed system within a single coherent code base.In multitier languages, the compiler or the runtime takes care of separating the code into the components of the distributed system.This approach enables abstraction over low level implementation details such as data representation, serialization and network protocols.The ScalaLoci programming language allows developers to declare the components of the system and their architectural relation at the type level, enabling static reasoning about distribution and remote communication and guaranteeing static type safety for data transfer across components.As the compiler automatically generates the communication boilerplate among components, data transfer among components can be modeled declaratively, by specifying the data flows in the reactive programming style.In this paper, we report on the ScalaLoci implementation and on our experience with embedding ScalaLoci's language features into Scala as a host language.We show how a combination of Scala's advanced type level programming and of Scala's macro system enable enriching the language with new abstractions for distributed systems.We describe the challenges we encountered for the implementation and report on the solutions we developed.Finally, we outline suggestions for improving the Scala macro system to better support embedding domain-specific abstractions.
Authors: Pascal Weisenburger, Guido Salvaneschi
Institution: Technische Universität Darmstadt
Language: English
Subfield: Artificial Intelligence
Field: Computer Science
Domain: Physical Sciences
Open Access status: bronze
Awards: ReDOOP: Reaktives Design für objektorientierte Programmierung, G4158655670, G4269364176, Entwicklung verteilter Systeme mit Multitier Reactive Programming, G5883876326, SFB 1119: CROSSING Kryptographiebasierte Sicherheitslösungen als Grundlage für Vertrauen in heutigen und zukünftigen ITSystemen, SFB 1053: MAKI MultiMechanismenAdaption für das künftige Internet
OpenAlex ID: W3006196819
