280
R. Hamers and S.-S. Jongmans
metric is a dimensionless number that indicates the factor by which monitoring
slows down the implementation.
The normalized means are shown in Figs. 14-15; the raw data (including
standard deviations) are included in our artifact. We summarize the findings:
– For Chess, for three workloads, slowdowns are <1. As the number of instructions per channel action is, objectively, higher with monitoring than without,
we suspect these observed speedups might be an artifact of the variability in
the measurements. That said, the general trend suggests both usage types
of Discourje (page 277) are very well possible for Chess.
– For FT and IS, the slowdowns are low: less than 5% and 2% respectively. This
seems low enough not only for Discourje’s usage type A (testing/debugging
in development), but even usage type B (fail-safe mechanism in production).
– For CG and MG, the slowdowns are higher: less than 5× and 2.5× respectively. Although this might be too much for Discourje’s usage type B, it
seems low enough for usage type A (cf. the industrial-strength Valgrind tool
for memory debugging [35], which typically inflicts a ≥10× slowdown).
The difference in performance between {FT, IS} and {CG, MG} may be
explained by the fact the latter are more communication-intensive than the
former, so the overhead of monitoring communications is more pronounced.
– For CG, FT, IS, and MG, the slowdowns grow only linearly as the number of
threads increases. This shows that the super-linear scalability we observed
under the adversarial microbenchmark conditions for the one-all-one pattern, does not manifest in these real programs.
To conclude, we believe it is encouraging to see that even (extended versions
of) the specification that scaled poorest in our microbenchmarks, can give well
enough performance in real concurrent programs for both usage types A and B.
6 Related Work
Expressiveness issues of multiparty session types (MPST) have received some
attention, but efforts have primarily been geared towards adding more advanced
features (e.g., time [5,36], security [7,8,9,13], and parametrisation [14,20,39]); in
contrast, restrictions on the usage of core features like choice and interleaving
have remained, even though they limit MPST’s applicability in practice (e.g.,
our Tic-Tac-Toe specification cannot be expressed; Fig. 5). Recently, work has
been done to improve MPST’s expressiveness in this regard using static techniques [31], but our specification language in this paper is still more expressive.
Closest to our work, then, are hybrid MPST approaches that combine static
type-checking with a form of distributed runtime monitoring and/or assertion
checking [3,4,19,36,37]. In contrast to this paper, however, these dynamic techniques still rely on projection, which limits expressiveness (Sect. 1); none of the
specifications in this paper are supported.
Projection-free MPST has also been explored by L´ opez et al. [34,43]. Their
idea is to specify MPI communication protocols in an MPI-tailored DSL, inspired
R. Hamers and S.-S. Jongmans
metric is a dimensionless number that indicates the factor by which monitoring
slows down the implementation.
The normalized means are shown in Figs. 14-15; the raw data (including
standard deviations) are included in our artifact. We summarize the findings:
– For Chess, for three workloads, slowdowns are <1. As the number of instructions per channel action is, objectively, higher with monitoring than without,
we suspect these observed speedups might be an artifact of the variability in
the measurements. That said, the general trend suggests both usage types
of Discourje (page 277) are very well possible for Chess.
– For FT and IS, the slowdowns are low: less than 5% and 2% respectively. This
seems low enough not only for Discourje’s usage type A (testing/debugging
in development), but even usage type B (fail-safe mechanism in production).
– For CG and MG, the slowdowns are higher: less than 5× and 2.5× respectively. Although this might be too much for Discourje’s usage type B, it
seems low enough for usage type A (cf. the industrial-strength Valgrind tool
for memory debugging [35], which typically inflicts a ≥10× slowdown).
The difference in performance between {FT, IS} and {CG, MG} may be
explained by the fact the latter are more communication-intensive than the
former, so the overhead of monitoring communications is more pronounced.
– For CG, FT, IS, and MG, the slowdowns grow only linearly as the number of
threads increases. This shows that the super-linear scalability we observed
under the adversarial microbenchmark conditions for the one-all-one pattern, does not manifest in these real programs.
To conclude, we believe it is encouraging to see that even (extended versions
of) the specification that scaled poorest in our microbenchmarks, can give well
enough performance in real concurrent programs for both usage types A and B.
6 Related Work
Expressiveness issues of multiparty session types (MPST) have received some
attention, but efforts have primarily been geared towards adding more advanced
features (e.g., time [5,36], security [7,8,9,13], and parametrisation [14,20,39]); in
contrast, restrictions on the usage of core features like choice and interleaving
have remained, even though they limit MPST’s applicability in practice (e.g.,
our Tic-Tac-Toe specification cannot be expressed; Fig. 5). Recently, work has
been done to improve MPST’s expressiveness in this regard using static techniques [31], but our specification language in this paper is still more expressive.
Closest to our work, then, are hybrid MPST approaches that combine static
type-checking with a form of distributed runtime monitoring and/or assertion
checking [3,4,19,36,37]. In contrast to this paper, however, these dynamic techniques still rely on projection, which limits expressiveness (Sect. 1); none of the
specifications in this paper are supported.
Projection-free MPST has also been explored by L´ opez et al. [34,43]. Their
idea is to specify MPI communication protocols in an MPI-tailored DSL, inspired
