RESTalk: A Visual and Textual DSL for Modelling RESTful Conversations

TitleRESTalk: A Visual and Textual DSL for Modelling RESTful Conversations
Publication TypePhDThesis
Year of Publication2021
AuthorsIvanchikj, A.
Academic DepartmentSoftware Institute, Faculty of Informatics
MonthJanuary
UniversityUSI
CityLugano
DegreePhD
KeywordsREST, RESTalk
Abstract

Digitalization is all around us, even more so in pandemic times where substantial part of our lives has been moved online. One of the key enablers of digitalization are the Application Programming Interfaces (APIs) which enable the communication and exchange of data between different systems. They abstract from the implementation details of the underlying systems and allow for the monetization of digital assets paving the way to innovative services, bringing together different business partners, even in traditionally closed sectors such as banking.

In this dissertation we focus on a particular type of APIs which conform to the REpresentation State Transfer (REST) architectural style constraints due to their dominance in the API landscape. Although Fielding defined REST as architectural style back in 2000, our state of the art review has identified a gap when it comes to modeling the behaviour of REST APIs. Existing approaches are not domain specific and as such fail to emphasise important facets in RESTful interactions. Since APIs need to satisfy multiple clients, it is not always possible to provide them with operations dedicated to achieving the specific goals of individual clients. Instead, clients often need to perform multiple interactions in a specific order to achieve their goals. We call the set of possible sequences of interactions to achieve a goal a RESTful conversation.

Visualizing complex RESTful conversations in a domain specific model can help streamline their design by facilitating discussion and common knowledge sharing, but also by constraining the supported API behavior from the combinatorial set of all possible interaction sequences. This enables service providers to maintain and evolve their APIs. Visual models can also facilitate client developers' understanding of a given API, and speed up the identification of the correct sequence of calls to be made given a goal. Based on our study of the characteristics of RESTful conversations, we introduce the design of RESTalk: a Domain Specific Language (DSL) for modelling the behaviour of REST APIs. The language supports single client to single server conversations, but also multiple clients talking to the same server in order to achieve a common goal, as well as composite layered conversations. We have designed RESTalk iteratively with a frequent feedback from users while modelling different use-cases. Since its targeted users are developers, we propose both a graphical and a textual syntax for the language. We take an innovative approach in the design of the textual grammar, which leverages on a mining algorithm to generate the alternative control flow of the RESTful conversation and on a graph layout algorithm to automatically produce the visual diagram. Thus, the textual DSL has a log-like form with a minimal use of keywords. It aims at decreasing the cognitive load of the modeler while increasing the efficiency of model generation. Further evaluations are necessary to verify the actual benefits of the textual DSL over the graphical DSL. We have evaluated the expressiveness of RESTalk with real-world examples of RESTful conversations and patterns, and performed controlled experiments to attempt to determine the effectiveness and efficiency of the visual diagrams in facilitating the understanding of a given API.

Citation Keyrestalk:phd:ana.ivanchikj