[Paper Review] Microservices: a Language-based Approach
This paper advocates for a language-based approach to microservices development, arguing that general-purpose languages lack native abstractions for service composition and coordination. It proposes modeling microservices using first-class language constructs like ports, interfaces, and workflows—demonstrated in the Jolie programming language—to improve modularity, reduce errors, and manage complex message-passing interactions systematically.
Microservices is an emerging development paradigm where software is obtained by composing autonomous entities, called (micro)services. However, microservice systems are currently developed using general-purpose programming languages that do not provide dedicated abstractions for service composition. Instead, current practice is focused on the deployment aspects of microservices, in particular by using containerization. In this chapter, we make the case for a language-based approach to the engineering of microservice architectures, which we believe is complementary to current practice. We discuss the approach in general, and then we instantiate it in terms of the Jolie programming language.
Motivation & Objective
- Address the lack of native abstractions for service composition in mainstream programming languages used for microservices.
- Shift focus from deployment-centric practices (e.g., containerization) to development-centric language support for microservice engineering.
- Enable modular, composable, and type-safe service coordination through first-class language constructs.
- Demonstrate that a language designed for microservices can express complex workflows and message exchange patterns more clearly than general-purpose languages.
Proposed method
- Model microservices using first-class language constructs: ports, interfaces, and workflows.
- Define service behavior via receive and send operations on input and output ports, with explicit interface definitions.
- Use workflow constructs such as sequence, conditional, loop, and parallel composition to structure service logic.
- Implement dynamic message handling using correlation sets (csets) to manage multiple concurrent client sessions.
- Introduce the 'provide-until' construct to model repetitive, event-driven interactions (e.g., shopping cart operations).
- Decouple behavior from deployment by allowing runtime dynamic configuration of port locations and protocols.
Experimental results
Research questions
- RQ1How can a programming language natively support the composition and coordination of microservices through first-class abstractions?
- RQ2What role do explicit interfaces and ports play in improving modularity and reducing errors in microservice development?
- RQ3Can a language-based approach reduce the complexity of message-passing coordination compared to ad-hoc implementations in general-purpose languages?
- RQ4How does the integration of workflow constructs (e.g., provide-until) improve the expressiveness of microservice behavior?
- RQ5To what extent can a language like Jolie support both fine-grained service composition and runtime process management without sacrificing clarity or correctness?
Key findings
- The Jolie language provides first-class support for ports and interfaces, enabling clear specification of service contracts and dependencies.
- The use of workflow constructs such as 'provide-until' allows for natural modeling of long-running, stateful interactions like customer sessions in an online shopping system.
- Correlation sets (csets) enable the runtime management of multiple concurrent processes, ensuring messages are routed to the correct session.
- The separation of behavior from deployment allows for dynamic reconfiguration of service endpoints and protocols without changing logic.
- The language-based approach reduces the risk of errors from low-level coordination logic by making communication structures explicit and composable.
- Jolie’s design enables modular, scalable, and maintainable microservice architectures by treating service composition as a first-class language concern.
Better researchstarts right now
From reading papers to final review, dramatically reduce your research time.
No credit card · Free plan available
This review was created by AI and reviewed by human editors.