Skip to main content
Log in

Decentralized runtime verification of message sequences in message-based systems

  • Original Article
  • Published:
Acta Informatica Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11

Similar content being viewed by others

Notes

  1. Available at https://github.com/MbhSamadi/RVTestCaseGenerator.

  2. Available at https://github.com/MbhSamadi/RVSimulator.

References

  1. Aceto, L., Attard, D., Francalanza, A., Ingólfsdóttir, A.: On benchmarking for concurrent runtime verification. In: Conference on FASE. Springer (2021)

  2. 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)

    Google Scholar 

  3. Agha, G.: ACTORS—a model of concurrent computation in distributed systems. MIT Press Series in Artificial Intelligence (1990)

  4. Akka. https://akka.io. Accessed: 2021-04-06

  5. Armstrong, J., Virding, R., Williams, M.: Concurrent Programming in Erlang. Prentice-Hall Press (1993)

  6. Attard, D., Francalanza, A.: Trace partitioning and local monitoring for asynchronous components. In: Proceedings of SEFM. Springer (2017)

  7. Barbanera, F., Lanese, I., Tuosto, E.: Choreography automata. In: Conference on Coordination. Springer (2020)

  8. Barringer, H., Goldberg, A., Havelund, K., Sen, K.: Rule-based runtime verification. In: Proceedings of VMCAI. Springer (2004)

  9. Basin, D., Klaedtke, F., Zalinesu, E.: Failure-aware runtime verification of distributed systems. In: Proceedings of FSTTCS. LIPIcs (2015)

  10. Basin, D., Klaedtke, F., Muller, S.: Monitoring metric first-order temporal properties. J. ACM 62(2), 1–15 (2015)

    Article  MathSciNet  MATH  Google Scholar 

  11. Basin, D., Klaedtke, F., Zalinesu, E.: Runtime verification over out-of-order streams. Trans. TOCL 21(1), 1–43 (2019)

    MathSciNet  Google Scholar 

  12. Bauer, A., Falcone, Y.: Decentralized LTL monitoring. In: Proceedings of FM. Springer (2012)

  13. Bauer, A., Leucker, M., Schallhart, C.: Runtime verification for LTL and TLTL. Trans. TOSEM, ACM, 20(4):1–14 (2011)

  14. Bocchi, L., Chen, T., et al.: Monitoring networks through multiparty session types. J. Theor. Comput. Sci. 669, 33–58 (2017)

    Article  MathSciNet  MATH  Google Scholar 

  15. Chauhan, H., Garg, V., Natarajan, A., Mittal, N.: A distributed abstraction algorithm for online predicate detection. In: Symposium on SRDS. IEEE (2013)

  16. Colombo, C., Falcone, Y.: Organising LTL monitors over distributed systems with a global clock. J. FMSD 42(1), 109–158 (2016)

    MATH  Google Scholar 

  17. El-Hokayem, A., Falcone, Y.: On the monitoring of decentralized specifications: semantics, properties, analysis and simulation. Trans. TOSEM, ACM, 29(1):1–57 (2020)

  18. Elixir. https://elixir-lang.org/. Accessed: 2021-04-06

  19. Falcone, Y., Cornebize, T., Fernandez, J.: Efficient and generalized decentralized monitoring of regular languages. In: Proceedings of FORTE. Springer (2014)

  20. Falcone, Y., Jaber, M., Nguyen, T., Bozga, M., Bensalem, S.: Runtime verification of component-based systems. In: Conference on SEFM. Springer (2011)

  21. Falcone, Yliès, Shostak, Robert, Pease, Marshall: The byzantine generals problem. J. TOPLAS 4(3), 382–401 (1982)

    Article  MATH  Google Scholar 

  22. Fifge, C.: Timestamps in message-passing systems that preserve partial ordering. In: Proceedings of ACSC (1988)

  23. Francalanza, A., Mezzina, C., Tuosto, E.: Towards Choreographic-Based Monitoring. In: Conference on RC. Springer (2020)

  24. Francalanza, A., Pérez, J., Sánchez, C.: Runtime Verification for Decentralised and Distributed Systems. In: Conference on RV. Springer (2018)

  25. Francalanza, A., Seychell, A.: Synthesising correct concurrent runtime monitors. J. FMSD 46(3), 226–261 (2015)

    MATH  Google Scholar 

  26. Francalanza, A., Gauci, A., Pace, G.: Distributed system contract monitoring. J. Log. Algebraic Methods Program 82(7), 186–215 (2013)

    Article  MathSciNet  MATH  Google Scholar 

  27. Frittelli, L., Maldonado, F., Melgratti, M., Tuosto, E.: A choreography-driven approach to APIs: the OpenDXL case study. In: Conference on Coordination. Springer (2020)

  28. Github. https://github.com. Accessed: 2021-04-06

  29. Hurfin, M., Plouzeau, N., Raynal, M.: Detecting atomic sequences of predicates in distributed computations. In: Proceedings on Parallel and Distributed Debugging. ACM (1993)

  30. Kolchinsky, I., Schuster, A.: Efficient adaptive detection of complex event patterns. In: Proceedings of VLDB. ACM (2018)

  31. Lamport, L.: Time, clocks, and the ordering of events in a distributed system. J. ACM 21(7), 558–565 (1978)

    Article  MATH  Google Scholar 

  32. Leucker, M., Schallhart, C.: A brief account of runtime verification. J. Log. Algebraic Methods Program 78(5), 293–303 (2009)

    Article  MATH  Google Scholar 

  33. Long, Y., Bagherzadeh, M., et al.: On ordering problems in message passing software. In: Proceedings of Modularity. ACM (2016)

  34. 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)

  35. Mattern, F.: Virtual Time and Global States of Distributed Systems. Parallel and Distributed Algorithms. North-Holland Press, Amsterdam (1988)

    MATH  Google Scholar 

  36. Meredith, P., Jin, D., Griffith, D., Chen, F., Rosu, G.: An overview of the MOP runtime verification framework. J. STTT 14(3) (2012)

  37. Miller, B., Choi, J.: Breakpoints and halting in distributed programs. In Proceedings of ICDCS. IEEE (1988)

  38. Mirzaei, N., Bagheri, H., Mahmood, R., Malek, S.: Sig-Droid:automated system input generation for android applications. In: Symposium on ISSRE. IEEE (2015)

  39. Mostafa, M., Bonakdarpour, B.: Decentralized runtime verification of LTL specifications in distributed systems. In: Proceedings of IPDPS. IEEE (2015)

  40. Natarajan, A., Mittal, N., Garg, V.: Online algorithms to generate slices for regular temporal logic predicates. In: Conference on ICDCN. Springer (2014)

  41. Nazarpour, H., Falcone, Y., Jaber, M., Bensalem, S., Bozga, M.: Monitoring distributed component-based systems. In: CoRR (2017)

  42. Ogale, V., Garg, V.: Detecting temporal logic predicates on distributed computations. In: Symposium on DS. Springer (2007)

  43. 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)

  44. Qi, Y., Cao, L., Ray, M., Rundensteiner, E.: Complex event analytics: online aggregation of stream sequence patterns. In: Proceedings of SIGMOD. ACM (2014)

  45. Reger, G., Rydeheard, D.: From first-order temporal logic to parametric trace slicing. In: Conferece on RV. Springer (2015)

  46. Samadi, M., Ghassemi, F., Khosravi, R.: Decentralized runtime enforcement of message sequences in message-based systems. In: Conference on OPODIS. LIPIcs (2020)

  47. 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)

  48. Schafer, J., Poetzsch, A.: JCoBox: generalizing active objects to concurrent components. In: Conference on ECOOP. Springer (2010)

  49. Scheel, T., Schmitz, M.: Three-valued asynchronous distributed runtime verification. In: Conferene on MEMOCODE. IEEE (2014)

  50. Sen, A., Garg, V.: Detecting temporal logic predicates in distributed programs using computation slicing. In: Conference on PODC. Springer (2003)

  51. Sen, A., Garg, V.: Detecting temporal logic predicates on the happened-before model. In: Proceedings of IPDPS. IEEE (2002)

  52. Sen, K., Vardhan, A., Agha, G., Rosu, G.: Efficient decentralized monitoring of safety in distributed systems. In: Proceedings of SE. IEEE (2004)

  53. Shafiei, N., Havelund, K., Mehlitz, P.: Actor-based runtime verification with MESA. In: Conference on RV. Springer (2020)

  54. Shafiei, N., Tkachuk, O., Mehlitz, P.: MESA: Message-based system analysis using runtime verification. In: ntrs.nasa.gov publication (2017)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Fatemeh Ghassemi.

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.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

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

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00236-022-00435-z

Navigation