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.
Supplemental Material
- Umut A. Acar. 2009. Self-adjusting computation (an overview). In Workshop on Partial Evaluation and Program Manipulation (PEPM). Google Scholar
Digital Library
- Umut A. Acar, Amal Ahmed, and Matthias Blume. 2008. Imperative self-adjusting computation. In Principles of Programming Languages (POPL). Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Akka 2016. Akka - Actors for the JVM. Apache 2 License, https://github.com/akka/akka.Google Scholar
- Joe Armstrong. 2010. Erlang. Commun. ACM 53, 9 (Sept. 2010), 68–75. Google Scholar
Digital Library
- Albert Benveniste, Benoit Caillaud, and Paul Le Guernic. 2000. Compositionality in Dataflow Synchronous Languages. Inf. Comput. 163, 1 (Nov. 2000), 125–171. Google Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Sebastian Burckhardt. 2014. Principles of Eventual Consistency. Found. Trends Program. Lang. 1, 1-2 (Oct. 2014), 1–150. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Antony Courtney. 2001. Frappé: Functional reactive programming in Java. In Practical Aspects of Declarative Languages (PADL). Springer, 29–44. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- Evan Czaplicki and Stephen Chong. 2013. Asynchronous Functional Reactive Programming for GUIs. In Programming Language Design and Implementation (PLDI). 411–422. Google Scholar
Digital Library
- Jeffrey Dean and Sanjay Ghemawat. 2008. MapReduce: simplified data processing on large clusters. Commun. ACM 51, 1 (2008), 107–113. Google Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Conal Elliott and Paul Hudak. 1997. Functional Reactive Animation. In International Conference on Functional Programming (ICFP) (ICFP ’97). 263–273. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- Cormac Flanagan and Matthias Felleisen. 2001. The Semantics of Future and Its Use in Program Optimization. (09 2001).Google Scholar
- Flink 2016. Apache Flink. https://flink.apache.org/.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Paul Hudak, Antony Courtney, Henrik Nilsson, and John Peterson. 2003. Arrows, Robots, and Functional Reactive Programming. Springer Berlin Heidelberg, 159–187.Google Scholar
- 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 Scholar
Digital Library
- Sean McDirmid and Wilson C. Hsieh. 2006. SuperGlue: Component Programming with Object-Oriented Signals. Springer, 206–229. Google Scholar
Digital Library
- Frank McSherry, Derek Murray, Rebecca Isaacs, and Michael Isard. 2013. Differential dataflow. In Proceedings of CIDR 2013.Google Scholar
- 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 Scholar
Digital Library
- Luc Moreau. 1970. The Semantics of Scheme with Future. 31 (02 1970).Google Scholar
- Orbit 2016. Orbit - Virtual Actors for the JVM. BSD 3-clause license. https://github.com/orbit/orbit.Google Scholar
- Orleans 2016. Orleans - Distributed Virtual Actor Model for .NET. MIT license. https://github.com/dotnet/orleans.Google Scholar
- Benjamin C. Pierce. 2002. Types and programming languages. MIT Press. Google Scholar
Digital Library
- React 2016. React - A declarative JavaScript library for building user interfaces. Available under BSD 3-clause license. https://github.com/facebook/react.Google Scholar
- Reactors.IO 2016. Available under BSD 3-clause license. https://github.com/reactors-io/reactors.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- Zhanyong Wan and Paul Hudak. 2000. Functional Reactive Programming from First Principles. SIGPLAN Not. 35, 5 (May 2000), 242–252. Google Scholar
Digital Library
- 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 Scholar
Digital Library
Index Terms
Reactive caching for composed services: polling at the speed of push
Recommendations
Sojourn times in polling systems with various service disciplines
We consider a polling system of N queues Q"1,...,Q"N, cyclically visited by a single server. Customers arrive at these queues according to independent Poisson processes, requiring generally distributed service times. When the server visits Q"i, i=1,...,...
Mixed gated/exhaustive service in a polling model with priorities
In this paper we consider a single-server polling system with switch-over times. We introduce a new service discipline, mixed gated/exhaustive service, that can be used for queues with two types of customers: high and low priority customers. At the ...
Fluid polling systems
We study N-queues single-server fluid polling systems, where a fluid is continuously flowing into the queues at queue-dependent rates. When visiting and serving a queue, the server reduces the amount of fluid in the queue at a queue-dependent rate. ...






Comments