Abstract
Distributed applications are traditionally developed as separate modules, often in different languages, which react to events, like user input, and in turn produce new events for the other modules. Separation into components requires time-consuming integration. Manual implementation of communication forces programmers to deal with low-level details. The combination of the two results in obscure distributed data flows scattered among multiple modules, hindering reasoning about the system as a whole.
The ScalaLoci distributed programming language addresses these issues with a coherent model based on placement types that enables reasoning about distributed data flows, supporting multiple software architectures via dedicated language features and abstracting over low-level communication details and data conversions. As we show, ScalaLoci simplifies developing distributed systems, reduces error-prone communication code and favors early detection of bugs.
Supplemental Material
- Akka. 2009a. http://akka.io/ . Accessed 2018-04-16.Google Scholar
- Akka. 2009b. Message Delivery Reliability. http://doc.akka.io/docs/akka/current/general/message-delivery-reliability.html . Accessed 2018-04-16.Google Scholar
- Akka. 2009c. Supervision and Monitoring. http://doc.akka.io/docs/akka/current/scala/general/supervision.html . Accessed 2018-04-16.Google Scholar
- Akka. 2009d. Watching Remote Actors. http://doc.akka.io/docs/akka/current/remoting.html#watching-remote-actors . Accessed 2018-04-16.Google Scholar
- Akka. 2009e. What Lifecycle Monitoring Means. http://doc.akka.io/docs/akka/current/general/supervision.html# what-lifecycle-monitoring-means . Accessed 2018-04-16.Google Scholar
- Akka HTTP. 2016. http://doc.akka.io/docs/akka-http/current/ . Accessed 2018-04-16.Google Scholar
- Akka Streams. 2014. http://doc.akka.io/docs/akka/current/stream/ . Accessed 2018-04-16.Google Scholar
- Akka Typed. 2015. http://doc.akka.io/docs/akka/current/typed/ . Accessed 2018-04-16.Google Scholar
- Jonathan Aldrich, Craig Chambers, and David Notkin. 2002. ArchJava: Connecting Software Architecture to Implementation. In ICSE ’02. ACM, New York, NY, USA. Google Scholar
Digital Library
- Jonathan Aldrich, Vibha Sazawal, Craig Chambers, and David Notkin. 2003. Language Support for Connector Abstractions. In ECOOP. Springer, Berlin, Heidelberg.Google Scholar
- Apache Storm. 2011. http://storm.apache.org/ . Accessed 2018-04-16.Google Scholar
- Vincent Balat. 2006. Ocsigen: Typing Web Interaction with Objective Caml. In ML ’06. ACM, New York, NY, USA. Google Scholar
Digital Library
- Herman Banken, Erik Meijer, and Georgios Gousios. 2018. Debugging Data Flows in Reactive Programs. In ICSE ’18. ACM, New York, NY, USA. Google Scholar
Digital Library
- Gérard Berry and Georges Gonthier. 1992. The Esterel Synchronous Programming Language: Design, Semantics, Implementation. Science of Computer Programming 19, 2 (1992). Google Scholar
Digital Library
- Gérard Berry, Cyprien Nicolas, and Manuel Serrano. 2011. HipHop: A Synchronous Reactive Extension for Hop. In PLASTIC ’11 . ACM, New York, NY, USA. Google Scholar
Digital Library
- Aggelos Biboudis, Nick Palladinos, George Fourtounis, and Yannis Smaragdakis. 2015. Streams a la carte: Extensible Pipelines with Object Algebras. In ECOOP ’15, Vol. 37. Schloss Dagstuhl–Leibniz-Zentrum für Informatik, Dagstuhl, Germany.Google Scholar
- Eugene Burmako. 2013. Scala Macros: Let Our Powers Combine!: On How Rich Syntax and Static Types Work with Metaprogramming. In SCALA ’13. ACM, New York, NY, USA, Article 3. Google Scholar
Digital Library
- Ben Calus, Bob Reynders, Dominique Devriese, Job Noorman, and Frank Piessens. 2017. FRP IoT Modules As a Scala DSL. In REBLS ’17. ACM, New York, NY, USA. Google Scholar
Digital Library
- Paris Carbone, Asterios Katsifodimos, Stephan Ewen, Volker Markl, Seif Haridi, and Kostas Tzoumas. 2015. Apache Flink: Stream and Batch Processing in a Single Engine. IEEE Data Engineering Bulletin 38 (2015).Google Scholar
- Andoni Lombide Carreton, Stijn Mostinckx, Tom Van Cutsem, and Wolfgang De Meuter. 2010. Loosely-coupled Distributed Reactive Programming in Mobile Ad Hoc Networks. In TOOLS ’10. Springer-Verlag, Berlin, Heidelberg. Google Scholar
Digital Library
- Antonio Carzaniga, David S. Rosenblum, and Alexander L. Wolf. 2001. Design and Evaluation of a Wide-area Event Notification Service. ACM Transactions on Computer Systems 19, 3 (2001). Google Scholar
Digital Library
- Andrew Cave, Francisco Ferreira, Prakash Panangaden, and Brigitte Pientka. 2014. Fair Reactive Programming. In POPL ’14. ACM, New York, NY, USA. Google Scholar
Digital Library
- Satish Chandra, Vijay Saraswat, Vivek Sarkar, and Rastislav Bodik. 2008. Type Inference for Locality Analysis of Distributed Data Structures. In PPoPP ’08. ACM, New York, NY, USA. Google Scholar
Digital Library
- S. Chintapalli, D. Dagit, B. Evans, R. Farivar, T. Graves, M. Holderbaugh, Z. Liu, K. Nusbaum, K. Patil, B. J. Peng, and P. Poulosky. 2016. Benchmarking Streaming Computation Engines: Storm, Flink and Spark Streaming. In IPDPSW ’16.Google Scholar
- Adam Chlipala. 2015. Ur/Web: A Simple Model for Programming the Web. In POPL ’15. ACM, New York, NY, USA. Google Scholar
Digital Library
- Ezra Cooper, Sam Lindley, Philip Wadler, and Jeremy Yallop. 2007. Links: Web Programming Without Tiers. In Proceedings of the 5th International Conference on Formal Methods for Components and Objects (FMCO’06) . Springer-Verlag, Berlin, Heidelberg. Google Scholar
Digital Library
- Gregory H. Cooper and Shriram Krishnamurthi. 2006. Embedding Dynamic Dataflow in a Call-by-Value Language. In ESOP ’06 . Google Scholar
Digital Library
- Coq Development Team. 2016. The Coq Proof Assistant, version 8.6.0. http://coq.inria.fr/ .Google Scholar
- Evan Czaplicki and Stephen Chong. 2013. Asynchronous Functional Reactive Programming for GUIs. In PLDI ’13. ACM, New York, NY, USA. Google Scholar
Digital Library
- Mattias De Wael, Stefan Marr, Bruno De Fraine, Tom Van Cutsem, and Wolfgang De Meuter. 2015. Partitioned Global Address Space Languages. Comput. Surveys 47, 4, Article 62 (2015). Google Scholar
Digital Library
- Sébastien Doeraene. 2013. Scala.js: Type-Directed Interoperability with Dynamically Typed Languages. Technical Report. EPFL.Google Scholar
- Joscha Drechsler, Ragnar Mogk, Guido Salvaneschi, and Mira Mezini. 2018. Thread-Safe Reactive Programming. Proceedings of the ACM on Programming Languages OOPSLA ’18 (2018). Google Scholar
Digital Library
- Joscha Drechsler, Guido Salvaneschi, Ragnar Mogk, and Mira Mezini. 2014. Distributed REScala: An Update Algorithm for Distributed Reactive Programming. In Proceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages & Applications (OOPSLA ’14) . ACM, New York, NY, USA. Google Scholar
Digital Library
- Jonathan Edwards. 2009. Coherent Reaction. In OOPSLA ’09. ACM, New York, NY, USA. Google Scholar
Digital Library
- Conal Elliott and Paul Hudak. 1997. Functional reactive animation. In ICFP ’97. ACM, New York, NY, USA. Google Scholar
Digital Library
- Conal M. Elliott. 2009. Push-Pull Functional Reactive Programming. In Haskell ’09. ACM, New York, NY, USA. Google Scholar
Digital Library
- Erlang. 1987a. Academic and Historical Questions. http://erlang.org/faq/academic.html . Accessed 2018-04-16.Google Scholar
- Erlang. 1987b. Supervision Principles. http://erlang.org/documentation/doc-9.3/doc/design_principles/sup_princ.html . Accessed 2018-04-16.Google Scholar
- Patrick Th. Eugster, Pascal A. Felber, Rachid Guerraoui, and Anne-Marie Kermarrec. 2003. The Many Faces of Publish/Subscribe. Comput. Surveys 35, 2 (2003). Google Scholar
Digital Library
- Bernd Finkbeiner, Felix Klein, Ruzica Piskac, and Mark Santolucito. 2017. Vehicle Platooning Simulations with Functional Reactive Programming. In SCAV ’17. ACM, New York, NY, USA. Google Scholar
Digital Library
- Jeffrey Fischer, Rupak Majumdar, and Todd Millstein. 2007. Tasks: Language Support for Event-driven Programming. In PEPM ’07 . ACM, New York, NY, USA. Google Scholar
Digital Library
- Nate Foster, Rob Harrison, Michael J. Freedman, Christopher Monsanto, Jennifer Rexford, Alec Story, and David Walker. 2011. Frenetic: a network programming language. In ICFP ’11. ACM, New York, NY, USA. Google Scholar
Digital Library
- Nicholas Halbwachs, Paul Caspi, Pascal Raymond, and Daniel Pilaud. 1991. The synchronous data flow programming language Lustre. Proc. IEEE 79, 9 (1991).Google Scholar
Cross Ref
- Carl Hewitt, Peter Bishop, and Richard Steiger. 1973. A Universal Modular ACTOR Formalism for Artificial Intelligence. In IJCAI ’73 . Morgan Kaufmann Publishers Inc., San Francisco, CA, USA. Google Scholar
Digital Library
- Paul Hudak, Antony Courtney, Henrik Nilsson, and John Peterson. 2003. Arrows, Robots, and Functional Reactive Programming. In Summer School on Advanced Functional Programming 2002, Oxford University (Lecture Notes in Computer Science) , Vol. 2638. Springer-Verlag.Google Scholar
- Oleg Kiselyov, Aggelos Biboudis, Nick Palladinos, and Yannis Smaragdakis. 2017. Stream Fusion, to Completeness. In POPL ’17 . ACM, New York, NY, USA. Google Scholar
Digital Library
- Neelakantan R. Krishnaswami, Nick Benton, and Jan Hoffmann. 2012. Higher-order Functional Reactive Programming in Bounded Space. In POPL ’12. ACM, New York, NY, USA. Google Scholar
Digital Library
- Haoyi Li. 2013. TodoMVC application written in Scala.js. http://github.com/lihaoyi/workbench-example-app . Accessed 2018-04-16.Google Scholar
- Haoyi Li. 2014. Method arguments that introduce new identifiers into scope? Or: language support for enums and contextual DSLs? http://groups.google.com/forum/#!topic/scala-debate/f4CLmYShX6Q . Accessed 2018-04-16.Google Scholar
- Ingo Maier and Martin Odersky. 2013. Higher-Order Reactive Programming with Incremental Lists. In ECOOP ’13. SpringerVerlag, Berlin, Heidelberg. Google Scholar
Digital Library
- Ingo Maier, Tiark Rompf, and Martin Odersky. 2010. Deprecating the Observer Pattern. Technical Report.Google Scholar
- Alessandro Margara and Guido Salvaneschi. 2014. We Have a DREAM: Distributed Reactive Programming with Consistency Guarantees. In DEBS ’14. ACM, New York, NY, USA. Google Scholar
Digital Library
- A. Margara and G. Salvaneschi. 2018. On the Semantics of Distributed Reactive Programming: The Cost of Consistency. IEEE Transactions on Software Engineering 44, 7 (July 2018).Google Scholar
Cross Ref
- René Meier and Vinny Cahill. 2005. Taxonomy of Distributed Event-Based Programming Systems. Comput. J. 48, 5 (2005). Google Scholar
Digital Library
- Erik Meijer. 2010. Reactive Extensions (Rx): Curing Your Asynchronous Programming Blues. In CUFP ’10. ACM, New York, NY, USA, Article 11. Google Scholar
Digital Library
- 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 OOPSLA ’09. ACM, New York, NY, USA. Google Scholar
Digital Library
- Heather Miller, Philipp Haller, and Martin Odersky. 2014. Spores: A Type-Based Foundation for Closures in the Age of Concurrency and Distribution. In ECOOP ’14. Springer-Verlag New York, Inc., New York, NY, USA. Google Scholar
Digital Library
- Mark S. Miller, E. Dean Tribble, and Jonathan Shapiro. 2005. Concurrency Among Strangers. In TGC ’05, Rocco De Nicola and Davide Sangiorgi (Eds.). Springer, Berlin, Heidelberg.Google Scholar
- Ragnar Mogk, Lars Baumgärtner, Guido Salvaneschi, Bernd Freisleben, and Mira Mezini. 2018. Fault-tolerant Distributed Reactive Programming. In ECOOP ’18 (Leibniz International Proceedings in Informatics (LIPIcs)), Vol. 109. Schloss Dagstuhl– Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany.Google Scholar
- Tom Murphy, VII., Karl Crary, and Robert Harper. 2008. Type-safe Distributed Programming with ML5. In TGC ’07. Springer-Verlag, Berlin, Heidelberg. Google Scholar
Digital Library
- Florian Myter, Tim Coppieters, Christophe Scholliers, and Wolfgang De Meuter. 2016. I Now Pronounce You Reactive and Consistent: Handling Distributed and Replicated State in Reactive Programming. In REBLS ’16. ACM, New York, NY, USA. Google Scholar
Digital Library
- Matthias Neubauer and Peter Thiemann. 2005. From Sequential Programs to Multi-Tier Applications by Program Transformation. In POPL ’05. ACM, New York, NY, USA. Google Scholar
Digital Library
- R. Newton, G. Morrisett, and M. Welsh. 2007. The Regiment Macroprogramming System. In IPSN ’07. Google Scholar
Digital Library
- Henrik Nilsson, Antony Courtney, and John Peterson. 2002. Functional reactive programming, continued. In Haskell ’02. ACM, New York, NY, USA. Google Scholar
Digital Library
- Martin Odersky, Olivier Blanvillain, Fengyun Liu, Aggelos Biboudis, Heather Miller, and Sandro Stucki. 2017. Simplicitly: Foundations and Applications of Implicit Function Types. Proceedings of the ACM on Programming Languages 2, POPL ’17, Article 42 (2017). Google Scholar
Digital Library
- Bruno C.d.S. Oliveira, Adriaan Moors, and Martin Odersky. 2010. Type Classes As Objects and Implicits. In OOPSLA ’10. ACM, New York, NY, USA. Google Scholar
Digital Library
- Ivan Perez and Henrik Nilsson. 2017. Testing and Debugging Functional Reactive Programming. Proceedings of the ACM on Programming Languages 1, ICFP ’17, Article 2 (2017). Google Scholar
Digital Library
- Laure Philips, Coen De Roover, Tom Van Cutsem, and Wolfgang De Meuter. 2014. Towards Tierless Web Development Without Tierless Languages. In Onward! 2014. ACM, New York, NY, USA. Google Scholar
Digital Library
- Peter R. Pietzuch and Jean Bacon. 2002. Hermes: A Distributed Event-Based Middleware Architecture. In ICDCSW ’02. IEEE Computer Society, Washington, DC, USA. Google Scholar
Digital Library
- Play. 2012. Documentation Play Framework 2.0. Actions, Controllers and Results. Building an Action. http://playframework. com/documentation/2.0/ScalaActions#Building-an-Action . Accessed 2018-04-16.Google Scholar
- Play Framework. 2007. http://playframework.com/ . Accessed 2018-04-16.Google Scholar
- Hussachai Puripunpinyo. 2014. Play Framework with Scala.js Showcase. http://github.com/hussachai/play-scalajs-showcase/ . Accessed 2018-04-16.Google Scholar
- Gabriel Radanne, Jérôme Vouillon, and Vincent Balat. 2016. Eliom: A core ML language for Tierless Web Programming. In APLAS ’16 . Springer, Hanoi, Vietnam.Google Scholar
Digital Library
- David Rajchenbach-Teller and Franois-Régis Sinot. 2010. Opa: Language support for a sane, safe and secure web. In OWASP AppSec Research .Google Scholar
- Stefan Ramson and Robert Hirschfeld. 2017. Active Expressions: Basic Building Blocks for Reactive Programming. CoRR (2017).Google Scholar
- Reactive Streams. 2014. http://www.reactive-streams.org/ . Accessed 2018-04-16.Google Scholar
- Bob Reynders, Dominique Devriese, and Frank Piessens. 2014. Multi-Tier Functional Reactive Programming for the Web. In Onward! 2014 . ACM, New York, NY, USA. Google Scholar
Digital Library
- Guido Salvaneschi, Sven Amann, Sebastian Proksch, and Mira Mezini. 2014a. An Empirical Study on Program Comprehension with Reactive Programming. In FSE 2014. ACM, New York, NY, USA. Google Scholar
Digital Library
- Guido Salvaneschi, Gerold Hintz, and Mira Mezini. 2014b. REScala: Bridging Between Object-oriented and Functional Style in Reactive Applications. In MODULARITY ’14. ACM, New York, NY, USA. Google Scholar
Digital Library
- Guido Salvaneschi and Mira Mezini. 2014. Towards Reactive Programming for Object-Oriented Applications. In Transactions on Aspect-Oriented Software Development XI (Lecture Notes in Computer Science) , Vol. 8400. Springer, Berlin, Heidelberg.Google Scholar
- Guido Salvaneschi and Mira Mezini. 2016. Debugging for Reactive Programming. In ICSE ’16. ACM, New York, NY, USA. Google Scholar
Digital Library
- ScalaSTM. 2014. Quick Start. Wrap your code in atomic. http://nbronson.github.io/scala-stm/quick_start.html#atomic . Accessed 2018-04-16.Google Scholar
- Manuel Serrano, Erick Gallesio, and Florian Loitsch. 2006. Hop: A Language for Programming the Web 2.0. In Companion to OOPSLA ’06 . ACM.Google Scholar
Digital Library
- Manuel Serrano and Vincent Prunet. 2016. A Glimpse of Hopjs. In ICFP ’16. ACM, New York, NY, USA. Google Scholar
Digital Library
- Slick. 2014. Documentation Slick 2.0. Connections/Transactions. Implicit Session. http://slick.typesafe.com/doc/2.0.0/ connection.html#implicit-session . Accessed 2018-04-16.Google Scholar
- Chandramohan A. Thekkath, Henry M. Levy, and Edward D. Lazowska. 1994. Separating Data and Control Transfer in Distributed Operating Systems. In ASPLOS VI. ACM, New York, NY, USA. Google Scholar
Digital Library
- TodoMVC. 2011. http://todomvc.com/ . Accessed 2018-04-16.Google Scholar
- A.K. Wright and M. Felleisen. 1994. A Syntactic Approach to Type Soundness. Information and Computation 115, 1 (1994). Google Scholar
Digital Library
- Sean Zhong, Kam Kasravi, Huafeng Wang, Manu Zhang, and Weihua Jiang. 2014. GearPump – Real-Time Streaming Engine Using Akka. (2014).Google Scholar
Index Terms
Distributed system development with ScalaLoci
Recommendations
Developing Distributed Systems with Multitier Programming
DEBS '19: Proceedings of the 13th ACM International Conference on Distributed and Event-based SystemsDeveloping distributed systems is a complex task that requires to program different peers, often using several languages on different platforms, writing communication code and handling data serialization and conversion.
We show how the multitier ...
Instant pickles: generating object-oriented pickler combinators for fast and extensible serialization
OOPSLA '13: Proceedings of the 2013 ACM SIGPLAN international conference on Object oriented programming systems languages & applicationsAs more applications migrate to the cloud, and as "big data" edges into even more production environments, the performance and simplicity of exchanging data between compute nodes/devices is increasing in importance. An issue central to distributed ...
Distributed REScala: an update algorithm for distributed reactive programming
OOPSLA '14: Proceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages & ApplicationsReactive programming improves the design of reactive applications by relocating the logic for managing dependencies between dependent values away from the application logic to the language implementation. Many distributed applications are reactive. Yet, ...






Comments