skip to main content
research-article
Open Access

Reactive caching for composed services: polling at the speed of push

Published:24 October 2018Publication History
Skip Abstract Section

Abstract

Sometimes, service clients repeat requests in a polling loop in order to refresh their view. However, such polling may be slow to pick up changes, or may increase the load unacceptably, in particular for composed services that disperse over many components. We present an alternative reactive polling API and reactive caching algorithm that combines the conceptual simplicity of polling with the efficiency of push-based change propagation. A reactive cache contains a summary of a distributed read-only operation and maintains a connection to its dependencies so changes can be propagated automatically.

We first formalize the setting using an abstract calculus for composed services. Then we present a fault-tolerant distributed algorithm for reactive caching that guarantees eventual consistency. Finally, we implement and evaluate our solution by extending the Orleans actor framework, and perform experiments on two benchmarks in a distributed cloud deployment. The results show that our solution provides superior performance compared to polling, at a latency that comes close to hand-written change notifications.

Skip Supplemental Material Section

Supplemental Material

a152-burckhardt.webm

References

  1. Umut A. Acar. 2009. Self-adjusting computation (an overview). In Workshop on Partial Evaluation and Program Manipulation (PEPM). Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Umut A. Acar, Amal Ahmed, and Matthias Blume. 2008. Imperative self-adjusting computation. In Principles of Programming Languages (POPL). Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Umut A. Acar, Guy Blelloch, Ruy Ley-Wild, Kanat Tangwongsan, and Duru Türkoğlu. 2010. Traceable data types for self-adjusting computation. In Programming Language Design and Implementation (PLDI). Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Umut A. Acar, Guy E. Blelloch, Matthias Blume, Robert Harper, and Kanat Tangwongsan. 2009. An experimental analysis of self-adjusting computation. Transactions on Programming Languages and Systems (TOPLAS) 32 (November 2009), 3:1–3:53. Issue 1. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Umut A. Acar, Guy E. Blelloch, and Robert Harper. 2006. Adaptive Functional Programming. ACM Trans. Program. Lang. Syst. 28, 6 (Nov. 2006), 990–1034. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Akka 2016. Akka - Actors for the JVM. Apache 2 License, https://github.com/akka/akka.Google ScholarGoogle Scholar
  7. Joe Armstrong. 2010. Erlang. Commun. ACM 53, 9 (Sept. 2010), 68–75. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Albert Benveniste, Benoit Caillaud, and Paul Le Guernic. 2000. Compositionality in Dataflow Synchronous Languages. Inf. Comput. 163, 1 (Nov. 2000), 125–171. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Phil Bernstein, Sergey Bykov, Alan Geller, Gabriel Kliot, and Jorgen Thelin. 2014. Orleans: Distributed Virtual Actors for Programmability and Scalability. Technical Report MSR-TR-2014-41. Microsoft Research.Google ScholarGoogle Scholar
  10. Philip A. Bernstein, Sebastian Burckhardt, Sergey Bykov, Natacha Crooks, Jose M. Faleiro, Gabriel Kliot, Alok Kumbhare, Muntasir Raihan Rahman, Vivek Shah, Adriana Szekeres, and Jorgen Thelin. 2017. Geo-Distribution of Actor-Based Services. Proc. ACM Program. Lang. 1 (October 2017), 107:1–107:26. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Gérard Berry and Georges Gonthier. 1992. The ESTEREL Synchronous Programming Language: Design, Semantics, Implementation. Sci. Comput. Program. 19, 2 (Nov. 1992), 87–152. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Pramod Bhatotia, Alexander Wieder, Rodrigo Rodrigues, Umut A. Acar, and Rafael Pasquin. 2011. Incoop: MapReduce for Incremental Computations. In Symposium on Cloud Computing (SOCC ’11). ACM, New York, NY, USA, Article 7, 14 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Sebastian Burckhardt. 2014. Principles of Eventual Consistency. Found. Trends Program. Lang. 1, 1-2 (Oct. 2014), 1–150. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Sebastian Burckhardt, Manuel Fahndrich, Peli de Halleux, Sean McDirmid, Michal Moskal, Nikolai Tillmann, and Jun Kato. 2013. It’s Alive! Continuous Feedback in UI Programming. In Programming Language Design and Implementation (PLDI). 95–104. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Sebastian Burckhardt, Daan Leijen, Jaeheon Yi, Caitlin Sadowski, and Tom Ball. 2011. Two for the Price of One: A Model for Parallel and Incremental Computation. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA). Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Sergey Bykov, Alan Geller, Gabriel Kliot, James Larus, Ravi Pandya, and Jorgen Thelin. 2011. Orleans: Cloud Computing for Everyone. In ACM Symposium on Cloud Computing (SOCC ’11). Article 16, 14 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Paul Caspi, Daniel Pilaud, Nicolas Halbwachs, and John Plaice. 1987. LUSTRE: A Declarative Language for Real-time Programming. In Principles of Programming Languages (POPL). 178–188. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Wei-Chiu Chuang, Bo Sang, Sunghwan Yoo, Rui Gu, Milind Kulkarni, and Charles Killian. 2013. EventWave: Programming Model and Runtime Support for Tightly-coupled Elastic Cloud Applications. In Proceedings of the 4th Annual Symposium on Cloud Computing (SOCC ’13). ACM, New York, NY, USA, Article 21, 16 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Tyson Condie, Neil Conway, Peter Alvaro, Joseph M. Hellerstein, Khaled Elmeleegy, and Russell Sears. 2010. MapReduce Online. In Networked Systems Design and Implementation (NSDI). USENIX Association, Berkeley, CA, USA, 21–21. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Gregory H. Cooper and Shriram Krishnamurthi. 2006. Embedding Dynamic Dataflow in a Call-by-value Language. In European Symposium on Programming (ESOP). Springer-Verlag, Berlin, Heidelberg, 294–308. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Antony Courtney. 2001. Frappé: Functional reactive programming in Java. In Practical Aspects of Declarative Languages (PADL). Springer, 29–44. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Tom Van Cutsem, Elisa Gonzalez Boix, Christophe Scholliers, Andoni Lombide Carreton, Dries Harnie, Kevin Pinte, and Wolfgang De Meuter. 2014. AmbientTalk: programming responsive mobile peer-to-peer applications with actors. Computer Languages, Systems & Structures 40, 3-4 (2014), 112–136. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Evan Czaplicki and Stephen Chong. 2013. Asynchronous Functional Reactive Programming for GUIs. In Programming Language Design and Implementation (PLDI). 411–422. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Jeffrey Dean and Sanjay Ghemawat. 2008. MapReduce: simplified data processing on large clusters. Commun. ACM 51, 1 (2008), 107–113. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Camil Demetrescu, Sebastian Erdweg, Matthew A. Hammer, and Shriram Krishnamurthi. 2016. Programming Language Techniques for Incremental and Reactive Computing (Dagstuhl Seminar 16402). Dagstuhl Reports 6, 10 (2016), 1–12.Google ScholarGoogle Scholar
  26. Camil Demetrescu, Irene Finocchi, and Andrea Ribichini. 2011. Reactive Imperative Programming with Dataflow Constraints. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA). 407–426. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Joscha Drechsler, Guido Salvaneschi, Ragnar Mogk, and Mira Mezini. 2014. Distributed REScala: An Update Algorithm for Distributed Reactive Programming. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA). 16. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Conal Elliott and Paul Hudak. 1997. Functional Reactive Animation. In International Conference on Functional Programming (ICFP) (ICFP ’97). 263–273. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Patrick Th. Eugster, Pascal A. Felber, Rachid Guerraoui, and Anne-Marie Kermarrec. 2003. The Many Faces of Publish/Subscribe. ACM Comput. Surv. 35, 2 (June 2003), 114–131. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Cormac Flanagan and Matthias Felleisen. 2001. The Semantics of Future and Its Use in Program Optimization. (09 2001).Google ScholarGoogle Scholar
  31. Flink 2016. Apache Flink. https://flink.apache.org/.Google ScholarGoogle Scholar
  32. Thierry Gautier, Paul Le Guernic, and Löic Besnard. 1987. SIGNAL: A Declarative Language for Synchronous Programming of Real-time Systems. In Functional Programming Languages and Computer Architecture. 257–277. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Pradeep Kumar Gunda, Lenin Ravindranath, Chandramohan A. Thekkath, Yuan Yu, and Li Zhuang. 2010. Nectar: Automatic Management of Data and Computation in Datacenters. In Operating Systems Design and Implementation (OSDI) (OSDI’10). USENIX Association, Berkeley, CA, USA, 75–88. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Matthew A. Hammer, Umut A. Acar, and Yan Chen. 2009. CEAL: a C-based language for self-adjusting computation. In Programming Language Design and Implementation (PLDI). Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Paul Hudak, Antony Courtney, Henrik Nilsson, and John Peterson. 2003. Arrows, Robots, and Functional Reactive Programming. Springer Berlin Heidelberg, 159–187.Google ScholarGoogle Scholar
  36. Daniel Ignatoff, Gregory H. Cooper, and Shriram Krishnamurthi. 2006. Crossing State Lines: Adapting Object-Oriented Frameworks to Functional Reactive Languages. Springer Berlin Heidelberg, Berlin, Heidelberg, 259–276. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Sean McDirmid and Wilson C. Hsieh. 2006. SuperGlue: Component Programming with Object-Oriented Signals. Springer, 206–229. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. Frank McSherry, Derek Murray, Rebecca Isaacs, and Michael Isard. 2013. Differential dataflow. In Proceedings of CIDR 2013.Google ScholarGoogle Scholar
  39. Leo A. Meyerovich, Arjun Guha, Jacob Baskin, Gregory H. Cooper, Michael Greenberg, Aleks Bromfield, and Shriram Krishnamurthi. 2009. Flapjax: A Programming Language for Ajax Applications. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA). 1–20. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Luc Moreau. 1970. The Semantics of Scheme with Future. 31 (02 1970).Google ScholarGoogle Scholar
  41. Orbit 2016. Orbit - Virtual Actors for the JVM. BSD 3-clause license. https://github.com/orbit/orbit.Google ScholarGoogle Scholar
  42. Orleans 2016. Orleans - Distributed Virtual Actor Model for .NET. MIT license. https://github.com/dotnet/orleans.Google ScholarGoogle Scholar
  43. Benjamin C. Pierce. 2002. Types and programming languages. MIT Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. React 2016. React - A declarative JavaScript library for building user interfaces. Available under BSD 3-clause license. https://github.com/facebook/react.Google ScholarGoogle Scholar
  45. Reactors.IO 2016. Available under BSD 3-clause license. https://github.com/reactors-io/reactors.Google ScholarGoogle Scholar
  46. Guido Salvaneschi, Sven Amann, Sebastian Proksch, and Mira Mezini. 2014. An Empirical Study on Program Comprehension with Reactive Programming. In International Symposium on Foundations of Software Engineering (FSE). 564–575. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. Guido Salvaneschi and Mira Mezini. 2013. Reactive Behavior in Object-oriented Applications: An Analysis and a Research Roadmap. In International Conference on Aspect-oriented Software Development (AOSD). New York, NY, USA, 37–48. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. Bo Sang, Gustavo Petri, Masoud Saeida Ardekani, Srivatsan Ravi, and Patrick Eugster. 2016. Programming Scalable Cloud Services with AEON. In Proceedings of the 17th International Middleware Conference (Middleware ’16). ACM, New York, NY, USA, Article 16, 14 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. SF Reliable Actors 2016. Service Fabric Reliable Actors. Available for the Windows Azure platform, see https://azure.microsoft.com/en-us/documentation/articles/service-fabric-reliable-actors-get-started/.Google ScholarGoogle Scholar
  50. Zhanyong Wan and Paul Hudak. 2000. Functional Reactive Programming from First Principles. SIGPLAN Not. 35, 5 (May 2000), 242–252. Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. Matei Zaharia, Mosharaf Chowdhury, Tathagata Das, Ankur Dave, Justin Ma, Murphy McCauly, Michael J. Franklin, Scott Shenker, and Ion Stoica. 2012. Resilient Distributed Datasets: A Fault-Tolerant Abstraction for In-Memory Cluster Computing. In Networked Systems Design and Implementation (NSDI). USENIX, 15–28. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Reactive caching for composed services: polling at the speed of push

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!