Signal Classes: A Mechanism for Building Synchronous and Persistent Signal Networks

Authors Tetsuo Kamina, Tomoyuki Aotani, Hidehiko Masuhara



PDF
Thumbnail PDF

File

LIPIcs.ECOOP.2021.17.pdf
  • Filesize: 0.94 MB
  • 30 pages

Document Identifiers

Author Details

Tetsuo Kamina
  • Oita University, Japan
Tomoyuki Aotani
  • Mamezou Co.,Ltd., Tokyo, Japan
Hidehiko Masuhara
  • Tokyo Institute of Technology, Japan

Cite As Get BibTex

Tetsuo Kamina, Tomoyuki Aotani, and Hidehiko Masuhara. Signal Classes: A Mechanism for Building Synchronous and Persistent Signal Networks. In 35th European Conference on Object-Oriented Programming (ECOOP 2021). Leibniz International Proceedings in Informatics (LIPIcs), Volume 194, pp. 17:1-17:30, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2021) https://doi.org/10.4230/LIPIcs.ECOOP.2021.17

Abstract

Signals are principal abstraction in reactive programming languages and constitute the basics of reactive computations in modern systems, such as the Internet of Things. Signals sometimes utilize past values, which leads to space leak, a problem where accumulated past values waste resources such as the main memory. Persistent signals, an abstraction for time-varying values with their execution histories, provide a generalized and standardized way of space leak management by leaving this management to the database system. However, the current design of persistent signals is very rudimental. For example, they cannot represent complex data structures; they can only be connected using pre-defined API methods that implicitly synchronize the persistent signal network; and they cannot be created dynamically.
In this paper, we show that these problems are derived from more fundamental one: no language mechanism is provided to group related persistent signals. To address this problem, we propose a new language mechanism signal classes. A signal class packages a network of related persistent signals that comprises a complex data structure. A signal class defines the scope of synchronization, making it possible to flexibly create persistent signal networks by methods not limited to the use of pre-defined API methods. Furthermore, a signal class can be instantiated, and this instance forms a unit of lifecycle management, which enables the dynamic creation of persistent signals. We formalize signal classes as a small core language where the computation is deliberately defined to interact with the underlying database system using relational algebra. Based on this formalization, we prove the language’s glitch freedom. We also formulate its type soundness by introducing an additional check of program well-formedness. This mechanism is implemented as a compiler and a runtime library that is based on a time-series database. The usefulness of the language is demonstrated through the vehicle tracking simulator and viewer case study. We also conducted a performance evaluation that confirms the feasibility of this case study.

Subject Classification

ACM Subject Classification
  • Software and its engineering → Object oriented languages
  • Software and its engineering → Data flow languages
  • Software and its engineering → Semantics
Keywords
  • Persistent signals
  • Reactive programming
  • Time-series databases

Metrics

  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    0
    PDF Downloads

References

  1. Michael P. Andersen and David E. Culler. BTrDB: Optimizing storage system design for timeseries processing. In 14th USENIX Conference on File and Storage Technologies (FAST'16), pages 39-52, 2016. Google Scholar
  2. M. P. Atkinson, L. Daynès, M. J. Jordan, T. Printezis, and S. Spence. An orthogonally persistent Java. SIGMOD Record, 25(4):68-75, 1996. Google Scholar
  3. Herman Banken, Erik Meijer, and Georgious Gousios. Debugging data flows in reactive programs. In ICSE'18, pages 752-763, 2018. Google Scholar
  4. Gérard Berry and Georges Gonthier. The Esterel synchronous programming language: Design, semantics, implementation. Science of Computer Programming, 19(2):87-152, 1992. URL: https://doi.org/10.1016/0167-6423(92)90005-V.
  5. Edgar F. Codd. A relational model of data for large shared data banks. Communications of the ACM, 13(6):377-387, 1970. Google Scholar
  6. Gregory H. Cooper. Integrating Dataflow Evaluation into a Practical Higher-Order Call-by-Value Language. PhD thesis, Department of Computer Science, Brown University, 2008. Google Scholar
  7. S. Dar, N.~H. Gehani, and H.~V. Jagadish. CQL++: A SQL for the Ode object-oriented DBMS. In Advances in Database Technology — EDBT '92, volume 580 of LNCS, pages 201-216, 1992. Google Scholar
  8. Luca Deri, Simone Mainardi, and Francesco Fusco. tsdb: A compressed database for time series. In TMA, 2012. Google Scholar
  9. Torbjörn Ekman and Görel Hedin. The JastAdd extensible Java compiler. In Proceedings of the 22nd annual ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA'07), pages 1-18, 2007. URL: https://doi.org/10.1145/1297105.1297029.
  10. Conal Elliott and Paul Hudak. Functional reactive animation. In Proceedings of the 2nd ACM SIGPLAN International Conference on Functional Programming (ICFP'97), pages 263-273, 1997. URL: https://doi.org/10.1145/258949.258973.
  11. Vaidas Gasiunas, Lucas Satabin, Mira Mezini, Angel Núñez, and Jacques Noyé. EScala: modular event-driven object interactions in Scala. In Proceedings of the 10th International Conference on Aspect-Oriented Software Development (AOSD'11), pages 227-240, 2011. URL: https://doi.org/10.1145/1960275.1960303.
  12. Nicholas Halbwachs, Paul Caspi, Pascal Paymond, and Daniel Pilaud. The synchronous data flow programming language Lustre. Proceedings of the IEEE, 79(9):1305-1320, 1991. URL: https://doi.org/10.1109/5.97300.
  13. Takumi Hikosaka, Tetsuo Kamina, and Katsuhisa Maruyama. Visualizing reactive execution history using propagation traces. In REBLS'18, 2018. Google Scholar
  14. Jeff Horemans and Bob Reynders. Elmsvuur: A multi-tier version of elm and its time-traveling debugger. In TFP 2017, volume 10788 of LNCS, pages 79-97, 2017. Google Scholar
  15. Atsushi Igarashi, Benjamin Pierce, and Philip Wadler. Featherweight Java: A minimal core calculus for Java and GJ. ACM Transactions on Programming Languages and Systems, 23(3):396-450, 2001. URL: https://doi.org/10.1145/503502.503505.
  16. Søren Kejser Jensen, Torben Bach Pedersen, and Christian Thomsen. Time series management systems: A survey. IEEE Transactions on Knowledge and Data Engineering, 29:2581-2600, 2018. Google Scholar
  17. Tetsuo Kamina and Tomoyuki Aotani. Harmonizing signals and events with a lightweight extension to Java. The Art, Science, and Engineering of Programming, 2(3), 2018. URL: https://doi.org/10.22152/programming-journal.org/2018/2/5.
  18. Tetsuo Kamina and Tomoyuki Aotani. An approach for persistent time-varying values. In Onward!'19, pages 17-31, 2019. Google Scholar
  19. Mohamed E. Khalefa, Ulrike Fischer, Torben Bach Pedersen, and Wolfgang Lehner. Model-based integration of past & future in TimeTravel. In Proceedings of the VLDB Endowment (PVLDB), pages 1974-1977, 2012. Google Scholar
  20. Leo A. Meyerovich, Arjun Guha, Jacob Baskin, Gregory H. Cooper, Michael Greenberg, Aleks Bromfield, and Shriram Krishnamurthi. Flapjax: A programming language for Ajax applications. In Proceedings of the 24th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Application (OOPSLA'09), pages 1-20, 2009. URL: https://doi.org/10.1145/1640089.1640091.
  21. Ragnar Mogk, Lars Baumgärtner, Guido Salvaneschi, Bernd Freisleben, and Mira Mezini. Fault-tolerant distributed reactive programming. In 32nd European Conference on Object-Oriented Programming (ECOOP 2018), volume 109 of Leibniz International Proceedings in Informatics (LIPIcs), pages 1:1-1:26, 2018. Google Scholar
  22. Ragnar Mogk, Joscha Drechsler, Guido Salvaneschi, and Mira Mezini. A fault-tolerant programming model for distributed interactive applications. Proc. ACM Program. Lang., 3(OOPSLA):144:1-144:29, 2019. Google Scholar
  23. Florian Myter, Christophe Scholliers, and Wolfgang De Meuter. Distributed reactive programming for reactive distributed systems. The Art, Science, and Engineering of Programming, 3(3):5:1-5:52, 2019. Google Scholar
  24. Henrik Nilsson, Antony Courtney, and John Peterson. Functional reactive programming, continued. In Proceedings of the 2002 ACM SIGPLAN Workshop on Haskell (Haskell'02), pages 51-64, 2002. URL: https://doi.org/10.1145/581690.581695.
  25. Laszlo Pandy. Bret Victor style reactive debugging. Elm Workshop, 2013. Google Scholar
  26. Tuomas Pelkonen, Scott Franklin, Justin Teller, Paul Cavallaro, Qi Huang, Justin Meza, and Kaushik Veeraraghavan. Gorilla: A fast, scalable, in-memory time series database. Proc. VLDB Endow., 8(12):1816-1827, 2015. Google Scholar
  27. Ivan Perez. Back to the future: time travel in FRP. In Haskell'17, pages 105-116, 2017. Google Scholar
  28. Ivan Perez and Henrik Nilsson. Testing and debugging functional reactive programming. Proceedings of the ACM on Programming Languages, 1, 2017. Google Scholar
  29. Marc Pouzet. Lucid Synchrone version 3.0: Tutorial and Reference Manual. Université Paris-Sud, LRI, April 2006. Online manual. URL: https://www.di.ens.fr/~pouzet/lucid-synchrone/lucid-synchrone-3.0-manual.pdf.
  30. Guido Salvaneschi, Gerold Hintz, and Mira Mezini. REScala: Bridging between object-oriented and functional style in reactive applications. In Proceedings of the 13th International Conference on Modularity (MODULARITY'14), pages 25-36, 2014. URL: https://doi.org/10.1145/2577080.2577083.
  31. Guido Salvaneschi and Mira Mezini. Debugging for reactive programming. In ICSE'16, pages 796-807, 2016. Google Scholar
  32. Sai Zhang and Yuyin Sun. Automatically synthesizing SQL queries from input-output examples. In ASE'13, pages 224-234, 2013. Google Scholar
  33. YungYu Zhuang. A lightweight push-pull mechanism for implicitly using signals in imperative programming. Journal of Computer Languages, 54, 2019. Google Scholar
Questions / Remarks / Feedback
X

Feedback for Dagstuhl Publishing


Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail