Implementing a Language for Distributed Systems: Choices and Experiences with Type Level and Macro Programming in Scala

02/14/2020
by   Pascal Weisenburger, et al.
0

Multitier programming languages reduce the complexity of developing distributed systems by developing the distributed system in a single coherent code base. The compiler or the runtime separate the code for the components of the distributed system, enabling abstraction over low level implementation details such as data representation, serialization and network protocols. Our ScalaLoci language allows developers to declare the different components and their architectural relation at the type level, allowing static reasoning about about distribution and remote communication and guaranteeing static type safety across components. The compiler splits the multitier program into the component-specific code and automatically generates the communication boilerplate. Communication between components can be modeled by declaratively specifying data flows between components using reactive programming. In this paper, we report on the implementation of our design and our experience with embedding our language features into Scala as a host language. We show how a combination of Scala's advanced type level programming and its macro system can be used to enrich the language with new abstractions. We comment on the challenges we encountered and the solutions we developed for our current implementation and outline suggestions for an improved macro system to support the such use cases of embedding of domain-specific abstractions.

READ FULL TEXT

page 6

page 9

page 14

page 15

research
03/31/2017

A Domain-Specific Language and Editor for Parallel Particle Methods

Domain-specific languages (DSLs) are of increasing importance in scienti...
research
01/28/2020

Beyond Notations: Hygienic Macro Expansion for Theorem Proving Languages

In interactive theorem provers (ITPs), extensible syntax is not only cru...
research
01/24/2018

Choreographies for Reactive Programming

Modular programming is a cornerstone in software development, as it allo...
research
01/23/2023

Modal Reactors

Complex software systems often feature distinct modes of operation, each...
research
01/04/2021

New Directions in Cloud Programming

Nearly twenty years after the launch of AWS, it remains difficult for mo...
research
05/04/2022

Babel: A Framework for Developing Performant and Dependable Distributed Protocols

Prototyping and implementing distributed algorithms, particularly those ...

Please sign up or login with your details

Forgot password? Click here to reset