Abstract
Message-based systems are usually distributed in nature, and distributed components collaborate via asynchronous message passing. In some cases, particular ordering among the messages may lead to violation of the desired properties such as data confidentiality. Due to the absence of a global clock and usage of off-the-shelf components, such unwanted orderings can be neither statically inspected nor verified by revising their codes at design time. We propose a choreography-based runtime verification algorithm that given an automata-based specification of unwanted message sequences detects the formation of the unwanted sequences. Our algorithm is fully decentralized in the sense that each component is equipped with a monitor, as opposed to having a centralized monitor, and also the specification of the unwanted sequences is decomposed among monitors. In this way, when a component sends a message, its monitor inspects if there is a possibility for the formation of unwanted message sequences. As there is no global clock in message-based systems, monitors cannot determine the exact ordering among messages. In such cases, they decide conservatively and declare a sequence formation even if that sequence has not been formed. We prevent such conservative declarations in our algorithm as much as possible and then characterize its operational guarantees. We evaluate the efficiency and scalability of our algorithm in terms of the communication overhead, the memory consumption, and the latency of the result declaration through simulation.
Similar content being viewed by others
Notes
Available at https://github.com/MbhSamadi/RVTestCaseGenerator.
Available at https://github.com/MbhSamadi/RVSimulator.
References
Aceto, L., Attard, D., Francalanza, A., Ingólfsdóttir, A.: On benchmarking for concurrent runtime verification. In: Conference on FASE. Springer (2021)
Aceto, L., Achilleos, A., Francalanza, A., et al.: An operational guide to monitorability with applications to regular properties. J. SoSyM 20(1), 335–361 (2021)
Agha, G.: ACTORS—a model of concurrent computation in distributed systems. MIT Press Series in Artificial Intelligence (1990)
Akka. https://akka.io. Accessed: 2021-04-06
Armstrong, J., Virding, R., Williams, M.: Concurrent Programming in Erlang. Prentice-Hall Press (1993)
Attard, D., Francalanza, A.: Trace partitioning and local monitoring for asynchronous components. In: Proceedings of SEFM. Springer (2017)
Barbanera, F., Lanese, I., Tuosto, E.: Choreography automata. In: Conference on Coordination. Springer (2020)
Barringer, H., Goldberg, A., Havelund, K., Sen, K.: Rule-based runtime verification. In: Proceedings of VMCAI. Springer (2004)
Basin, D., Klaedtke, F., Zalinesu, E.: Failure-aware runtime verification of distributed systems. In: Proceedings of FSTTCS. LIPIcs (2015)
Basin, D., Klaedtke, F., Muller, S.: Monitoring metric first-order temporal properties. J. ACM 62(2), 1–15 (2015)
Basin, D., Klaedtke, F., Zalinesu, E.: Runtime verification over out-of-order streams. Trans. TOCL 21(1), 1–43 (2019)
Bauer, A., Falcone, Y.: Decentralized LTL monitoring. In: Proceedings of FM. Springer (2012)
Bauer, A., Leucker, M., Schallhart, C.: Runtime verification for LTL and TLTL. Trans. TOSEM, ACM, 20(4):1–14 (2011)
Bocchi, L., Chen, T., et al.: Monitoring networks through multiparty session types. J. Theor. Comput. Sci. 669, 33–58 (2017)
Chauhan, H., Garg, V., Natarajan, A., Mittal, N.: A distributed abstraction algorithm for online predicate detection. In: Symposium on SRDS. IEEE (2013)
Colombo, C., Falcone, Y.: Organising LTL monitors over distributed systems with a global clock. J. FMSD 42(1), 109–158 (2016)
El-Hokayem, A., Falcone, Y.: On the monitoring of decentralized specifications: semantics, properties, analysis and simulation. Trans. TOSEM, ACM, 29(1):1–57 (2020)
Elixir. https://elixir-lang.org/. Accessed: 2021-04-06
Falcone, Y., Cornebize, T., Fernandez, J.: Efficient and generalized decentralized monitoring of regular languages. In: Proceedings of FORTE. Springer (2014)
Falcone, Y., Jaber, M., Nguyen, T., Bozga, M., Bensalem, S.: Runtime verification of component-based systems. In: Conference on SEFM. Springer (2011)
Falcone, Yliès, Shostak, Robert, Pease, Marshall: The byzantine generals problem. J. TOPLAS 4(3), 382–401 (1982)
Fifge, C.: Timestamps in message-passing systems that preserve partial ordering. In: Proceedings of ACSC (1988)
Francalanza, A., Mezzina, C., Tuosto, E.: Towards Choreographic-Based Monitoring. In: Conference on RC. Springer (2020)
Francalanza, A., Pérez, J., Sánchez, C.: Runtime Verification for Decentralised and Distributed Systems. In: Conference on RV. Springer (2018)
Francalanza, A., Seychell, A.: Synthesising correct concurrent runtime monitors. J. FMSD 46(3), 226–261 (2015)
Francalanza, A., Gauci, A., Pace, G.: Distributed system contract monitoring. J. Log. Algebraic Methods Program 82(7), 186–215 (2013)
Frittelli, L., Maldonado, F., Melgratti, M., Tuosto, E.: A choreography-driven approach to APIs: the OpenDXL case study. In: Conference on Coordination. Springer (2020)
Github. https://github.com. Accessed: 2021-04-06
Hurfin, M., Plouzeau, N., Raynal, M.: Detecting atomic sequences of predicates in distributed computations. In: Proceedings on Parallel and Distributed Debugging. ACM (1993)
Kolchinsky, I., Schuster, A.: Efficient adaptive detection of complex event patterns. In: Proceedings of VLDB. ACM (2018)
Lamport, L.: Time, clocks, and the ordering of events in a distributed system. J. ACM 21(7), 558–565 (1978)
Leucker, M., Schallhart, C.: A brief account of runtime verification. J. Log. Algebraic Methods Program 78(5), 293–303 (2009)
Long, Y., Bagherzadeh, M., et al.: On ordering problems in message passing software. In: Proceedings of Modularity. ACM (2016)
Lopez, C., Marr, S., Gonzalez, E., Mössenböck, H.: A Study of Concurrency Bugs and Advanced Development Support for Actor-based Programs. Programming with Actors, Programming with Actors (2018)
Mattern, F.: Virtual Time and Global States of Distributed Systems. Parallel and Distributed Algorithms. North-Holland Press, Amsterdam (1988)
Meredith, P., Jin, D., Griffith, D., Chen, F., Rosu, G.: An overview of the MOP runtime verification framework. J. STTT 14(3) (2012)
Miller, B., Choi, J.: Breakpoints and halting in distributed programs. In Proceedings of ICDCS. IEEE (1988)
Mirzaei, N., Bagheri, H., Mahmood, R., Malek, S.: Sig-Droid:automated system input generation for android applications. In: Symposium on ISSRE. IEEE (2015)
Mostafa, M., Bonakdarpour, B.: Decentralized runtime verification of LTL specifications in distributed systems. In: Proceedings of IPDPS. IEEE (2015)
Natarajan, A., Mittal, N., Garg, V.: Online algorithms to generate slices for regular temporal logic predicates. In: Conference on ICDCN. Springer (2014)
Nazarpour, H., Falcone, Y., Jaber, M., Bensalem, S., Bozga, M.: Monitoring distributed component-based systems. In: CoRR (2017)
Ogale, V., Garg, V.: Detecting temporal logic predicates on distributed computations. In: Symposium on DS. Springer (2007)
Palanisamy, S., Dürr, F., Tariq, M., Rothermel, K.: Preserving privacy and quality of service in complex event processing through event reordering. In: Proceedings of DEBS. Springer (2018)
Qi, Y., Cao, L., Ray, M., Rundensteiner, E.: Complex event analytics: online aggregation of stream sequence patterns. In: Proceedings of SIGMOD. ACM (2014)
Reger, G., Rydeheard, D.: From first-order temporal logic to parametric trace slicing. In: Conferece on RV. Springer (2015)
Samadi, M., Ghassemi, F., Khosravi, R.: Decentralized runtime enforcement of message sequences in message-based systems. In: Conference on OPODIS. LIPIcs (2020)
Sánchez, C., Schneider, G., Ahrendt, W., et al.: A survey of challenges for runtime verification from advanced application domains (beyond software). J. FMSD 54(3), 273–335 (2018)
Schafer, J., Poetzsch, A.: JCoBox: generalizing active objects to concurrent components. In: Conference on ECOOP. Springer (2010)
Scheel, T., Schmitz, M.: Three-valued asynchronous distributed runtime verification. In: Conferene on MEMOCODE. IEEE (2014)
Sen, A., Garg, V.: Detecting temporal logic predicates in distributed programs using computation slicing. In: Conference on PODC. Springer (2003)
Sen, A., Garg, V.: Detecting temporal logic predicates on the happened-before model. In: Proceedings of IPDPS. IEEE (2002)
Sen, K., Vardhan, A., Agha, G., Rosu, G.: Efficient decentralized monitoring of safety in distributed systems. In: Proceedings of SE. IEEE (2004)
Shafiei, N., Havelund, K., Mehlitz, P.: Actor-based runtime verification with MESA. In: Conference on RV. Springer (2020)
Shafiei, N., Tkachuk, O., Mehlitz, P.: MESA: Message-based system analysis using runtime verification. In: ntrs.nasa.gov publication (2017)
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Samadi, M., Ghassemi, F. & Khosravi, R. Decentralized runtime verification of message sequences in message-based systems. Acta Informatica 60, 145–178 (2023). https://doi.org/10.1007/s00236-022-00435-z
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00236-022-00435-z