Mario Bravetti’s research while affiliated with University of Bologna and other places

What is this page?


This page lists works of an author who doesn't have a ResearchGate profile or hasn't added the works to their profile yet. It is automatically generated from public (personal) data to further our legitimate goal of comprehensive and accurate scientific recordkeeping. If you are this author and want this page removed, please let us know.

Publications (142)


Fair Asynchronous Session Subtyping
  • Article

October 2024

Logical Methods in Computer Science

Mario Bravetti

·

·

Gianluigi Zavattaro

Session types are widely used as abstractions of asynchronous message passing systems. Refinement for such abstractions is crucial as it allows improvements of a given component without compromising its compatibility with the rest of the system. In the context of session types, the most general notion of refinement is asynchronous session subtyping, which allows message emissions to be anticipated w.r.t. a bounded amount of message consumptions. In this paper we investigate the possibility to anticipate emissions w.r.t. an unbounded amount of consumptions: to this aim we propose to consider fair compliance over asynchronous session types and fair refinement as the relation that preserves it. This allows us to propose a novel variant of session subtyping that leverages the notion of controllability from service contract theory and that is a sound characterisation of fair refinement. In addition, we show that both fair refinement and our novel subtyping are undecidable. We also present a sound algorithm which deals with examples that feature potentially unbounded buffering. Finally, we present an implementation of our algorithm and an empirical evaluation of it on synthetic benchmarks.



Integrated Timed Architectural Modeling/Execution Language

January 2024

·

5 Reads

Lecture Notes in Computer Science

We discuss an integrated approach for the design, specification, automatic deployment and simulation of microservice-based applications based on the ABS language. In particular, the integration of architectural modeling inspired by TOSCA (component types/port dependencies/architectural invariants) into the ABS language (static and dynamic aspects of ABS, including component properties, e.g., speed, and their use in timed/probabilistic simulations) via dedicated annotations. This is realized by the integration of the ABS toolchain with a dedicated tool, called Timed SmartDepl. Such a tool, at ABS code compile time, solves (starting from the provided architectural specification) the optimal deployment problem and produces ABS deployment orchestrations to be used in the context of timed simulations. Moreover, the potentialities and the expressive power of this approach are confirmed by further integration with external tools, e.g.: the Zephyrus tool, used by Timed SmartDepl to solve the optimal deployment problem via constraint solving, and a machine learning-based predictive module, that generates in advance data to be used in a timed ABS simulation exploiting such predicted data (e.g., simulating the usage, during the day, of predicted data generated during the preceding night).



Proactive-Reactive Global Scaling, with Analytics

November 2022

·

25 Reads

·

1 Citation

Lecture Notes in Computer Science

In this work, we focus on by-design global scaling, a technique that, given a functional specification of a microservice architecture, orchestrates the scaling of all its components, avoiding cascading slowdowns typical of uncoordinated, mainstream autoscaling. State-of-the-art by-design global scaling adopts a reactive approach to traffic fluctuations, undergoing inefficiencies due to the reaction overhead. Here, we tackle this problem by proposing a proactive version of by-design global scaling able to anticipate future scaling actions. We provide four contributions in this direction: i) a platform able to host both reactive and proactive global scaling; ii) a proactive implementation based on data analytics; iii) a hybrid solution that mixes reactive and proactive scaling; iv) use cases and empirical benchmarks, obtained through our platform, that compare reactive, proactive, and hybrid global scaling performance. From our comparison, proactive global scaling consistently outperforms reactive, while the hybrid solution is the best-performing one.


Low-Latency Anomaly Detection on the Edge-Cloud Continuum for Industry 4.0 Applications: the SEAWALL Case Study

September 2022

·

29 Reads

·

11 Citations

IEEE Internet of Things Magazine

Several emerging Industry 4.0 applications related to the monitoring and fault diagnostic of critical equipment introduce strict bounds on the latency of the data processing. Edge computing has emerged as a viable approach to mitigate the latency by offloading tasks to nodes nearby the data sources; at the same time, few industrial case studies have been reported so far. In this paper, we describe the design, implementation and evaluation of the SEAWALL platform for the heterogeneous data acquisition and low-latency processing in Industry 4.0 scenarios. The framework has been developed within the homonymous project founded by the Italian BIREX industrial consortium and involving both academic and industrial partners. The proposed framework supports data collection from heterogeneous production line machines mapped to different IoT protocols. In addition, it enables the seamless orchestration of workloads in the edge-cloud continuum so that the latency of the alerting service is minimized requirement of the processing task is continuously met, while taking into account the constrained resources of the edge servers. We evaluate the SEAWALL framework in a small-case industrial testbed and quantify the performance gain provided by the dynamic workload allocation on the continuum.


A Java typestate checker supporting inheritance

July 2022

·

13 Reads

·

6 Citations

Science of Computer Programming

Detecting programming errors in software is increasingly important, and building tools that help developers with this task is a crucial area of investigation on which the industry depends. Leveraging on the observation that in Object-Oriented Programming (OOP) it is natural to define stateful objects where the safe use of methods depends on their internal state, we present Java Typestate Checker (JATYC), a tool that verifies Java source code with respect to typestates. A typestate defines the object's states, the methods that can be called in each state, and the states resulting from the calls. The tool statically verifies that when a Java program runs: sequences of method calls obey to object's protocols; objects' protocols are completed; null-pointer exceptions are not raised; subclasses' instances respect the protocol of their superclasses. To the best of our knowledge, this is the first OOP tool that simultaneously tackles all these aspects.



A Session Subtyping Tool

June 2021

·

19 Reads

·

4 Citations

Lecture Notes in Computer Science

Session types are becoming popular and have been integrated in several mainstream programming languages. Nevertheless, while many programming languages consider asynchronous fifo channel communication, the notion of subtyping used in session type implementations is the one defined by Gay and Hole for synchronous communication. This might be because there are several notions of asynchronous session subtyping, these notions are usually undecidable, and only recently sound (but not complete) algorithmic characterizations for these subtypings have been proposed. But the fact that the definition of asynchronous session subtyping and the theory behind related algorithms are not easily accessible to non-experts may also prevent further integration. The aim of this paper, and of the tool presented therein, is to make the growing body of knowledge about asynchronous session subtyping more accessible, thus promoting its integration in practical applications of session types.


Microservice Dynamic Architecture-Level Deployment Orchestration

June 2021

·

15 Reads

·

7 Citations

Lecture Notes in Computer Science

We develop a novel approach for run-time global adaptation of microservice applications, based on synthesis of architecture-level reconfiguration orchestrations. More precisely, we devise an algorithm for automatic reconfiguration that reaches a target system Maximum Computational Load by performing optimal deployment orchestrations. To conceive and simulate our approach, we introduce a novel integrated timed architectural modeling/execution language based on an extension of the actor-based object-oriented Abstract Behavioral Specification (ABS) language. In particular, we realize a timed extension of SmartDeployer, whose ABS code annotations make it possible to express architectural properties. Our Timed SmartDeployer tool fully integrates time features of ABS and architectural annotations by generating timed deployment orchestrations. We evaluate the applicability of our approach on a realistic microservice application taken from the literature: an Email Pipeline Processing System. We prove its effectiveness by simulating such an application and by comparing architecture-level reconfiguration with traditional local scaling techniques (which detect scaling needs and enact replications at the level of single microservices). Our comparison results show that our approach avoids cascading slowdowns and consequent increased message loss and latency, which affect traditional local scaling.


Citations (63)


... Further emphasizing the importance of low-latency processing, Bacchiani et al. [12] discussed the SEAWALL platform, which is designed for low-latency anomaly detection in Industry 4.0 environments. This platform highlights the benefits of edge computing in reducing alert service latency, underscoring its critical role in maintaining timely and effective responses in industrial applications. ...

Reference:

Enhancing Real-Time Processing in Industry 4.0 Through the Paradigm of Edge Computing
Low-Latency Anomaly Detection on the Edge-Cloud Continuum for Industry 4.0 Applications: the SEAWALL Case Study
  • Citing Article
  • September 2022

IEEE Internet of Things Magazine

... In particular, we have started integrating our algorithm into the Java checker [22], which is based on [8]. Finally, we plan to extend the syntax of session types managed by our tool, e.g. by including passing of data/channels and, possibly, by also encompassing preemption mechanisms [10,4], which are often used in communication protocols. ...

Axiomatizing Maximal Progress and Discrete Time
  • Citing Article
  • Full-text available
  • January 2021

Logical Methods in Computer Science

... Asynchronous subtyping was shown to be undecidable for both binary and multiparty session types [6,35]. Existing works are thus either restricted to binary protocols [1,5,6,35], prohibit non-deterministic choice involving multiple receivers [7,27], or make strong fairness assumptions on the network [7]. ...

A Session Subtyping Tool
  • Citing Chapter
  • June 2021

Lecture Notes in Computer Science

... Constraint reasoning was first used to optimally deploy multiservice applications on Cloud resources in [1,9,14], with [14] focusing on service dependencies, and [1,9] focusing on services' hardware, software, and availability requirements. More recently, constraint reasoning has also been exploited to generate containerized MSA deployments, with [5,6] adapting [1] to work with MSAs, while [24] enabling to schedule containers running on Kubernetes based on their QoS requirements. [10] instead focuses on deploying MSAs on Cloud VMs, encoding their services' hardware/software requirements as constraints, and aiming to minimize the overall deployment cost. ...

Microservice Dynamic Architecture-Level Deployment Orchestration
  • Citing Chapter
  • June 2021

Lecture Notes in Computer Science

... Asynchronous subtyping was shown to be undecidable for both binary and multiparty session types [6,35]. Existing works are thus either restricted to binary protocols [1,5,6,35], prohibit non-deterministic choice involving multiple receivers [7,27], or make strong fairness assumptions on the network [7]. ...

Fair Refinement for Asynchronous Session Types

Lecture Notes in Computer Science

... As a result, these subtyping relations eagerly reject subtypes that are viable for the specific global type at hand. In addition, existing implementation models are restricted to local types with directed choice for branching, or equivalent representations thereof [9], which prohibit a role from sending messages to or receiving messages from different participants in a choice. This restrictiveness undermines the flexibility that subtyping is fundamentally designed to provide. ...

Asynchronous session subtyping as communicating automata refinement

Software and Systems Modeling

... In [10], the planning problem of the deployment and redeployment of microservice architectures is considered. Real-world microservice architecture is modelled using the abstract behavioral specification language (ABS) [21] to allow for proving formal properties and realizing a set of deployment plans. ...

A Formal Approach to Microservice Architecture Deployment *
  • Citing Book
  • January 2020

... These method orderings, or protocols, are often defined in varying degrees of formality through documentation or comments, which makes the process difficult and error-prone. Work has been undertaken to include these protocols in the program itself with the introduction of typestates for object-oriented languages [1,3,8,20]. ...

Behavioural Types for Memory and Method Safety in a Core Object-Oriented Language
  • Citing Chapter
  • November 2020

Lecture Notes in Computer Science