@phdthesis {restalk:phd:ana.ivanchikj, title = {RESTalk: A Visual and Textual DSL for Modelling RESTful Conversations}, year = {2021}, month = {January}, school = {USI}, type = {PhD}, address = {Lugano}, 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{\textquoteright} 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. }, keywords = {REST, RESTalk}, author = {Ana Ivanchikj} } @inbook {2020:restalk:ms, title = {Modeling Microservice Conversations with RESTalk}, booktitle = {Microservices}, year = {2020}, pages = {129--146}, publisher = {Springer}, organization = {Springer}, abstract = {Microservices are characterized by their small size and low degree of coupling. As a consequence, building microservice architectures requires composing multiple microservices and determine how they interact to achieve a given client{\textquoteright}s goal. In this chapter we introduce the concept of RESTful conversation, whereby clients or API gateways perform multiple basic HTTP request/response interactions with one or more microservice APIs. To represent possible sequences of interactions, we introduce the RESTalk visual notation, as well as its textual DSL, and the corresponding metamodel, and show how it can be used to complement existing structural approaches to represent RESTful APIs, such as the OpenAPI Specification. To reveal the degree of coupling between clients and microservices, the language supports the concept of hyperlink flow, showing whether, within a conversation, the links embedded into responses provided by a microservice are used by the client/API gateway to form the subsequent requests.}, keywords = {API, conversation, Microservices, RESTalk}, doi = {10.1007/978-3-030-31646-4_6}, author = {Ana Ivanchikj and Cesare Pautasso} } @inproceedings {2018:restalk:dsldi, title = {Modeling REST API Behaviour with Text, Graphics or Both?}, year = {2018}, month = {November}, address = {Boston, USA}, abstract = {The dissemination of domain specific modeling languages in the software engineering world can be challenging as developers love to code and frequently look at graphical modeling as unnecessary and inefficient. This is less true when they are developing business facing software as the end users are non-technical people, and models become a common language to facilitate the communication with them, which explains the diffusion of modeling languages such as for example the Business Process Modeling Notation (BPMN). However, in Application Programming Interface (API) design, where both the creators and the users of the API are developers, the perceived benefits of modeling using a visual notation can be less evident for the developers. When developing APIs adhering to the REpresentation State Transfer (REST) architectural style, the documentation best practices of the structure of the API, i.e., the exposed resources and the HTTP methods that they support together with the corresponding media types, has been evolving in the past decade across a number of textual Domain Specific Languages (DSLs) currently being standardized within the Open API initiative. However, modeling the dynamics of the REST API showing the request-response interactions leading to conversations between clients and one or more resources exposed within the API is not yet a common practice. Thus, we have been working on designing RESTalk, a visual DSL for modeling RESTful conversations, i.e., sequences of client-server interactions aimed at achieving a certain goal. We have conducted a short exploratory survey where, regardless of the positive feedback on the usefulness of such a DSL and the cognitive characteristics of RESTalk, many of the respondents conditioned the adoption of the language to the existence of a suitable modeling tool. Faced with the challenge of developing such a tool, in this talk we would like to pinpoint a critical issue within the design space concerning the input modalities supported by a modeling tool tailored for RESTful APIs. Our goal is to encourage further discussions and empirical studies on what are the pros and cons of different approaches to modeling tools{\textquoteright} design and whether and how the targeted users of the modeling tool (e.g, business people, software architects, developers) affect the design choices.}, keywords = {dsl, RESTalk}, url = {https://2018.splashcon.org/event/dsldi-2018-talks-modeling-rest-api-behaviour-with-text-graphics-or-both-}, author = {Ana Ivanchikj and Cesare Pautasso} } @demo {2018:icsoc:demo:restalk, title = {RESTalk Miner: Mining RESTful Conversations, Pattern Discovery and Matching}, year = {2018}, month = {November}, publisher = {Springer}, address = {Hangzhou, Zhejiang, China}, abstract = {REST has become the architectural style of choice for APIs, where clients need to instantiate a potentially lengthy sequence of requests to the server in order to achieve their goal, effectively leading to a RESTful conversation between the client and the server. Mining the logs of such RESTful conversations can facilitate knowledge sharing among API designers regarding design best practices as well as API usage and optimization. In this demo paper, we present the RESTalk Miner, which takes logs from RESTful services as an input and uses RESTalk, a domain specific language, to visualize them. It provides interactive coloring to facilitate graph reading, as well as statistics to compare the relative frequency of conversations performed by different clients. Furthermore, it supports searching for predefined patterns as well as pattern discovery. }, keywords = {conversation patterns, mining, RESTalk, RESTful conversation}, author = {Ana Ivanchikj and Cesare Pautasso} } @article {restalk:2016:jssm, title = {Visual modeling of RESTful conversations with RESTalk}, journal = {Journal of Software \& Systems Modeling}, volume = {17}, year = {2018}, month = {July}, pages = {1031-1051}, abstract = {The cost savings introduced by Web services through code re-use and integration opportunities have motivated many businesses to develop Web APIs, with ever increasing numbers opting for the REST architectural style. RESTful Web APIs are decomposed in multiple resources, which the client can manipulate through HTTP interactions with well defined semantics. Getting the resource in the desired state might require multiple client-server interactions, what we define as a RESTful conversation. RESTful conversations are dynamically guided by hypermedia controls, such as links. Thus, when deciding whether and how to use a given RESTful service, the client might not be aware of all the interactions which are necessary to achieve its goal. This is because existing documentation of RESTful APIs describe the static structure of the interface, exposing low-level HTTP details, while little attention has been given to conceptual, high-level, modeling of the dynamics of RESTful conversations. Low-level HTTP details can be abstracted from during the design phase of the API, or when deciding which API to use. We argue that, in these situations, visual models of the required client-server interactions might increase developers{\textquoteright} efficiency and facilitate their understanding. Thus, to capture all possible interaction sequences in a given RESTful conversation, we propose RESTalk, an extension to the BPMN Choreography diagrams to render them more concise and yet sufficiently expressive in the specific REST domain. We also report on the results obtained from an exploratory survey we have conducted to assess the maturity of the field for a domain specific language, and to obtain feedback for future improvements of RESTalk.}, keywords = {RESTalk, RESTful conversation}, issn = {1619-1366}, doi = {10.1007/s10270-016-0532-2}, url = {http://link.springer.com/article/10.1007/s10270-016-0532-2}, author = {Ana Ivanchikj and Cesare Pautasso and Silvia Schreier} } @conference {restalk:2016:europlop, title = {A Pattern Language for RESTful Conversations}, booktitle = {Proceedings of the 21st European Conference on Pattern Languages of Programs (EuroPLoP)}, year = {2016}, month = {July}, pages = {4:1{\textendash}4:22}, publisher = {ACM}, organization = {ACM}, address = {Kloster Irsee, Germany}, abstract = {As a good user interface design is important for the success of an app, so is a good API for the success of a Web service. Within the RESTful Web services community there is a need for a systematic approach in knowledge sharing, for which patterns are particularly suitable. Using a RESTful service to achieve a certain goal often requires multiple client-server interactions, i.e., to have a conversation. While patterns of such RESTful conversations can be uncovered from existing APIs{\textquoteright} usage scenarios, or the service engineering literature, they have never been gathered in a pattern language, nor properly visualized with a Domain Specific Modeling Language (DSML). These patterns provide valuable input for API designers, as well as API consumers, by establishing a common vocabulary to describe recurring conversations. To do so, this paper uses RESTalk, a DSML, to model the basic RESTful conversation patterns structured around the life cycle of a resource (create, discover, read, edit, delete, protect) by showing the corresponding sequences of HTTP request-response interactions. We show how the resulting pattern language can be applied to individual resources, or also collections of resources.}, keywords = {conversation composition, conversation patterns, pattern language, RESTalk, RESTful conversation, RESTful web services}, isbn = {978-1-4503-4074-8}, doi = {10.1145/3011784.3011788}, url = {http://doi.acm.org/10.1145/3011784.3011788}, author = {Cesare Pautasso and Ana Ivanchikj and Silvia Schreier} }