Quality-Aware Reactive Programming for the Internet of Things

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10522)

Abstract

The reactive paradigm recently became very popular in user-interface development: updates — such as the ones from the mouse, keyboard, or from the network — can trigger a chain of computations organised in a dependency graph, letting the underlying engine control the scheduling of these computations. In the context of the Internet of Things (IoT), typical applications deploy components in distributed nodes and link their interfaces, employing a publish-subscribe architecture. The paradigm for Distributed Reactive Programming marries these two concepts, treating each distributed component as a reactive computation. However, existing approaches either require expensive synchronisation mechanisms or they do not support pipelining, i.e., allowing multiple “waves” of updates to be executed in parallel.

We propose Quarp (Quality-Aware Reactive Programming), a scalable and light-weight mechanism aimed at the IoT to orchestrate components triggered by updates of data-producing components or of aggregating components. This mechanism appends meta-information to messages between components capturing the context of the data, used to dynamically monitor and guarantee useful properties of the dynamic applications. These include the so-called glitch freedom, time synchronisation, and geographical proximity. We formalise Quarp using a simple operational semantics, provide concrete examples of useful instances of contexts, and situate our approach in the realm of distributed reactive programming.

Keywords

Reactive programming Component-based systems Pervasive systems Distributed systems Failure 

References

  1. 1.
    Meyerovich, L.A., Guha, A., Baskin, J.P., Cooper, G.H., Greenberg, M., Bromfield, A., Krishnamurthi, S.: Flapjax: a programming language for Ajax applications. In: OOPSLA, , pp. 1–20. ACM (2009)Google Scholar
  2. 2.
    Czaplicki, E.: Elm: Concurrent FRP for functional GUIs, Master’s thesis. Harvard (2012)Google Scholar
  3. 3.
    Gackenheimer, C.: What is react? Introduction to React, pp. 1–20. Apress, Berkeley (2015). doi: 10.1007/978-1-4842-1245-5_1 CrossRefGoogle Scholar
  4. 4.
    Reynders, B., Devriese, D., Piessens, F.: Multi-tier functional reactive programming for the web. In: Onward!, pp. 55–68. ACM (2014)Google Scholar
  5. 5.
    Drechsler, J., Salvaneschi, G., Mogk, R., Mezini, M.: Distributed rescala: an update algorithm for distributed reactive programming. In: OOPSLA, pp. 361–376. ACM (2014)Google Scholar
  6. 6.
    Margara, A., Salvaneschi, G.: We have a DREAM: distributed reactive programming with consistency guarantees. In: DEBS, pp. 142–153. ACM (2014)Google Scholar
  7. 7.
    Salvaneschi, G., Margara, A., Tamburrelli, G.: Reactive programming: a walkthrough. In: ICSE, vol. 2, pp. 953–954. IEEE Computer Society (2015)Google Scholar
  8. 8.
    Bainomugisha, E., Carreton, A.L., Cutsem, T.V., Mostinckx, S., Meuter, W.D.: A survey on reactive programming. ACM Comput. Surv. 45(4), 52:1–52:34 (2013)CrossRefGoogle Scholar
  9. 9.
    Bailis, P., Kingsbury, K.: The network is reliable. Commun. ACM 57(9), 48–55 (2014)CrossRefGoogle Scholar
  10. 10.
    Hughes, D., Thoelen, K., Maerien, J., Matthys, N., Del Cid, J., Horre, W., Huygens, C., Michiels, S., Joosen, W.: LooCI: the loosely-coupled component infrastructure. In: Proceeding of NCA, pp. 236–243 (2012)Google Scholar
  11. 11.
    Bistarelli, S., Montanari, U., Rossi, F.: Semiring-based constraint satisfaction and optimization. J. ACM 44(2), 201–236 (1997)CrossRefMATHMathSciNetGoogle Scholar
  12. 12.
    Shapiro, M., Preguiça, N., Baquero, C., Zawirski, M.: Conflict-free replicated data types. In: Défago, X., Petit, F., Villain, V. (eds.) SSS 2011. LNCS, vol. 6976, pp. 386–400. Springer, Heidelberg (2011). doi: 10.1007/978-3-642-24550-3_29 CrossRefGoogle Scholar
  13. 13.
    Drechsler, J., Salvaneschi, G.: Optimizing distributed REScala. In: Workshop on Reactive and Event-based Languages & Systems (REBLS) (2014)Google Scholar
  14. 14.
    Maier, I., Odersky, M.: Deprecating the observer pattern with scala. React, École Polytechnique Fédérale de Lausanne, Technical report EPFL-REPORT-176887, May 2012Google Scholar
  15. 15.
    Salvaneschi, G., Hintz, G., Mezini, M.: REScala: bridging between object-oriented and functional style in reactive applications. In: Proceedings of the 13th International Conference on Modularity, pp. 25–36. ACM (2014)Google Scholar
  16. 16.
    Courtney, A.: Frappé: functional reactive programming in java. In: Ramakrishnan, I.V. (ed.) PADL 2001. LNCS, vol. 1990, pp. 29–44. Springer, Heidelberg (2001). doi: 10.1007/3-540-45241-9_3 CrossRefGoogle Scholar
  17. 17.
    Lombide Carreton, A., Mostinckx, S., Van Cutsem, T., De Meuter, W.: Loosely-coupled distributed reactive programming in mobile ad hoc networks. In: Vitek, J. (ed.) TOOLS 2010. LNCS, vol. 6141, pp. 41–60. Springer, Heidelberg (2010). doi: 10.1007/978-3-642-13953-6_3 CrossRefGoogle Scholar
  18. 18.
    Lanese, I., Bedogni, L., Felice, M.D.: Internet of Things: a process calculus approach. In: SAC, pp. 1339–1346. ACM (2013)Google Scholar
  19. 19.
    Lanotte, R., Merro, M.: A semantic theory of the Internet of Things. In: Lluch Lafuente, A., Proença, J. (eds.) COORDINATION 2016. LNCS, vol. 9686, pp. 157–174. Springer, Cham (2016). doi: 10.1007/978-3-319-39519-7_10 Google Scholar

Copyright information

© IFIP International Federation for Information Processing 2017

Authors and Affiliations

  1. 1.HASLabINESC TEC and University of MinhoBragaPortugal

Personalised recommendations