ABSTRACT
This paper describes a very high-level language for clear description of distributed algorithms and optimizations necessary for generating efficient implementations. The language supports high-level control flows where complex synchronization conditions can be expressed using high-level queries, especially logic quantifications, over message history sequences. Unfortunately, the programs would be extremely inefficient, including consuming unbounded memory, if executed straightforwardly.
We present new optimizations that automatically transform complex synchronization conditions into incremental updates of necessary auxiliary values as messages are sent and received. The core of the optimizations is the first general method for efficient implementation of logic quantifications. We have developed an operational semantics of the language, implemented a prototype of the compiler and the optimizations, and successfully used the language and implementation on a variety of important distributed algorithms.
- U. A. Acar, G. E. Blelloch, and R. Harper. Adaptive functional programming. ACM Transactions on Programming Languages and Systems, 28 (6): 990--1034, 2006. Google ScholarDigital Library
- G. Agha. Actors: a model of concurrent computation in distributed systems. MIT Press, 1986. Google ScholarDigital Library
- P. Alvaro, T. Condie, N. Conway, J. Hellerstein, and R. Sears. I do declare: Consensus in a logic language. ACM SIGOPS Operating Systems Review, 43 (4): 25--30, 2010. Google ScholarDigital Library
- H. Attiya and J. Welch. Distributed Computing: Fundamentals, Simulations, and Advanced Topics. Wiley, 2nd edition, 2004. Google ScholarDigital Library
- A. Badia. Question answering and database querying: Bridging the gap with generalized quantification. Journal of Applied Logic, 5 (1): 3--19, 2007.Google ScholarCross Ref
- A. Badia, M. Gyssens, and D. Van Gucht. Query languages with generalized quantifiers. In R. Ramakrishnan, editor, Applications of Logic in Databases. Kluwer Academic, 1994.Google Scholar
- A. Badia, B. Debes, and B. Cao. An implementation of a query language with generalized quantifiers. In Proceedings of the 27th International Conference on Conceptual Modeling. Springer, 2008. Google ScholarDigital Library
- Berkeley Orders of Magnitude. Bloom Programming Language. http://www.bloom-lang.net/.Google Scholar
- M. Bickford. Component specification using event classes. In Proceedings of the 12th International Symposium on Component-Based Software Engineering, pages 140--155. Springer, 2009. Google ScholarDigital Library
- M. Castro and B. Liskov. Practical Byzantine fault tolerance and proactive recovery. ACM Transactions on Computer Systems, 20: 398--461, 2002. Google ScholarDigital Library
- E. J. H. Chang and R. Roberts. An improved algorithm for decentralized extrema-finding in circular configurations of processes. Communications of the ACM, 22 (5): 281--283, 1979. Google ScholarDigital Library
- J. Claußen, A. Kemper, G. Moerkotte, and K. Peithner. Optimizing queries with universal quantification in object-oriented and object-relational databases. In Proceedings of the 23rd International Conference on Very Large Data Bases, pages 286--295. Morgan Kaufman, 1997. Google ScholarDigital Library
- T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein. Introduction to Algorithms. MIT Press, 3rd edition, 2009. Google ScholarDigital Library
- CRASH Project. EventML. http://www.nuprl.org/software/#WhatisEventML, Last dated March 2012.Google Scholar
- D. Dolev and H. R. Strong. Authenticated algorithms for Byzantine agreement. SIAM J. Comput., 12 (4): 656--666, 1983.Google ScholarDigital Library
- Erlang Programming Language. Erlang Programming Language. http://www.erlang.org/.Google Scholar
- C. J. Fidge. Timestamps in message-passing systems that preserve the partial ordering. In Proceedings of the 11th Australian Computer Science Conference, pages 56--66, 1988.Google Scholar
- F. Fioravanti, A. Pettorossi, M. Proietti, and V. Senni. Program transformation for development, verification, and synthesis of programs. Intelligenza Artificiale, 5 (1): 119--125, 2011.Google ScholarCross Ref
- V. K. Garg. Elements of Distributed Computing. Wiley, 2002. Google ScholarDigital Library
- C. Georgiou, N. A. Lynch, P. Mavrommatis, and J. A. Tauber. Automated implementation of complex distributed algorithms specified in the IOA language. International Journal on Software Tools for Technology Transfer, 11 (2): 153--171, 2009. Google ScholarDigital Library
- M. Gorbovitski, Y. A. Liu, S. D. Stoller, T. Rothamel, and T. Tekle. Alias analysis for optimization of dynamic languages. In Proceedings of the 6th Symposium on Dynamic Languages, pages 27--42. ACM, 2010. Google ScholarDigital Library
- D. Goyal and R. Paige. The formal reconstruction and improvement of the linear time fragment of Willard's relational calculus subset. In Algorithmic Languages and Calculi, pages 382--414. Chapman & Hall, 1997. Google ScholarDigital Library
- A. Granicz, D. M. Zimmerman, and J. Hickey. Rewriting UNITY. In Proceedings of the 14th International Conference on Rewriting Techniques and Applications, pages 138--147, 2003. Google ScholarDigital Library
- J. Gray. Notes on Data Base Operating Systems. In phAdvanced Course: Operating Systems, volume 60 of Lecture Notes in Computer Science, pages 393--481, 1978. Google ScholarDigital Library
- A. Gupta, I. S. Mumick, and V. S. Subrahmanian. Maintaining views incrementally. In Proceedings of the 1993 ACM SIGMOD International Conference on Management of Data, pages 157--166, 1993. Google ScholarDigital Library
- D. Hansel, R. Cleaveland, and S. A. Smolka. Distributed prototyping from validated specifications. Journal of Systems and Software, 70 (3): 275--298, 2004. Google ScholarDigital Library
- D. S. Hirschberg and J. B. Sinclair. Decentralized extrema-finding in circular configurations of processors. Communications of the ACM, 23 (11): 627--628, 1980. Google ScholarDigital Library
- I/O Automata Description of Leader Election Algorithm. http://groups.csail.mit.edu/tds/ioa/leader.html.Google Scholar
- IOA toolkit extended version. http://groups.csail.mit.edu/tds/ioa/distributions/IOA_Toolkit-tools.tar.gz. The Paxos code is under Examples/Paxos.Google Scholar
- D. Kaynar, N. Lynch, R. Segala, and F. Vaandrager. The Theory of Timed I/O Automata. Morgan Claypool Publishers, 2nd edition, 2010.Google Scholar
- I. H. Krüger. An experiment in compiler design for a concurrent object-based programming language. Master's thesis, The University of Texas at Austin, 1996.Google Scholar
- A. Kshemkalyani and M. Singhal. Distributed Computing: Principles, Algorithms, and Systems. Cambridge University Press, 2008. Google ScholarDigital Library
- L. Lamport. Time, clocks, and the ordering of events in a distributed system. Communications of the ACM, 21: 558--565, 1978. Google ScholarDigital Library
- L. Lamport. The part-time parliament. ACM Transactions on Computer Systems, 16 (2): 133--169, 1998. Google ScholarDigital Library
- L. Lamport. Paxos made simple. SIGACT News (Distributed Computing Column), 32 (4): 51--58, 2001.Google Scholar
- L. Lamport. The PlusCal algorithm language. In Proceedings of the 6th International Colloquium on Theoretical Aspects of Computing, pages 36--60, 2009. Google ScholarDigital Library
- Y. A. Liu and S. D. Stoller. Dynamic programming via static incrementalization. Higher-Order and Symbolic Computation, 16 (1--2): 37--62, 2003. Google ScholarDigital Library
- Y. A. Liu and S. D. Stoller. From Datalog rules to efficient programs with time and space guarantees. ACM Transactions on Programming Languages and Systems, 31 (6): 1--38, 2009. Google ScholarDigital Library
- Y. A. Liu, S. D. Stoller, M. Gorbovitski, T. Rothamel, and Y. E. Liu. Incrementalization across object abstraction. In Proceedings of the 20th ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 473--486, 2005. Google ScholarDigital Library
- Y. A. Liu, C. Wang, M. Gorbovitski, T. Rothamel, Y. Cheng, Y. Zhao, and J. Zhang. Core role-based access control: Efficient implementations by transformations. In Proceedings of the ACM SIGPLAN 2006 Workshop on Partial Evaluation and Semantics-Based Program Manipulation, pages 112--120, 2006. Google ScholarDigital Library
- Y. A. Liu, M. Gorbovitski, and S. D. Stoller. A language and framework for invariant-driven transformations. In Proceedings of the 8th International Conference on Generative Programming and Component Engineering, pages 55--64, 2009. Google ScholarDigital Library
- Y. A. Liu, S. D. Stoller, and B. Lin. High-level executable specifications of distributed algorithms. In Proceedings of the 14th International Symposium on Stabilization, Safety, and Security of Distributed Systems. Springer, 2012. To appear. Google ScholarDigital Library
- N. A. Lynch. Distributed Algorithms. Morgan Kaufman, 1996. Google ScholarDigital Library
- F. Mattern. Virtual time and global states of distributed systems. In Proc. International Workshop on Parallel and Distributed Algorithms, pages 120--131, 1989.Google Scholar
- Mechanically Checked Safety Proof of a Byzantine Paxos Algorithm. Mechanically checked safety proof of a Byzantine Paxos algorithm. http://research.microsoft.com/en-us/um/people/lamport/tla/byzpaxos.html. Last modified 1 September 2011.Google Scholar
- S. Merz. Lamport's algorithm, 2010. Email.Google Scholar
- Message Passing Interface (MPI) Forum. Message Passing Interface (MPI) Forum. http://www.mpi-forum.org/.Google Scholar
- H. Nakamura. Incremental computation of complex object queries. In Proceedings of the 16th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 156--165, 2001. Google ScholarDigital Library
- P2. https://svn.declarativity.net/overlog-paxos/src/olg/core/.Google Scholar
- R. Paige and S. Koenig. Finite differencing of computable expressions. ACM Transactions on Programming Languages and Systems, 4 (3): 402--454, 1982. Google ScholarDigital Library
- Paxos in Bud Sandbox. https://github.com/bloom-lang/bud-sandbox/tree/master/paxos.Google Scholar
- V. Petukhin. Programs with universally quantified embedded implications. In Proceedings of the 4th International Conference on Logic Programming and Nonmonotonic Reasoning, pages 310--324, 1997. Google ScholarDigital Library
- W. Pugh and T. Teitelbaum. Incremental computation via function caching. In Conference Record of the 16th Annual ACM Symposium on Principles of Programming Languages, pages 315--328, 1989. Google ScholarDigital Library
- G. Ramalingam and T. Reps. A categorized bibliography on incremental computation. In Conference Record of the 20th Annual ACM Symposium on Principles of Programming Languages, pages 502--510, 1993. Google ScholarDigital Library
- M. Raynal. Distributed Algorithms and Protocols. Wiley, 1988. Google ScholarDigital Library
- M. Raynal. Communication and Agreement Abstractions for Fault-Tolerant Asynchronous Distributed Systems. Morgan & Claypool, 2010. Google ScholarDigital Library
- G. Ricart and A. K. Agrawala. An optimal algorithm for mutual exclusion in computer networks. Communications of the ACM, 24 (1): 9--17, 1981. Google ScholarDigital Library
- G. Ricart and A. K. Agrawala. Author's response to 'On Mutual Exclusion in Computer Networks' by Carvalho and Roucairol. Communications of the ACM, 26 (2): 147--148, 1983.Google Scholar
- T. Rothamel and Y. A. Liu. Generating incremental implementations of object-set queries. In Proceedings of the 7th International Conference on Generative Programming and Component Engineering, pages 55--66, 2008. Google ScholarDigital Library
- D. Saha and C. R. Ramakrishnan. Incremental evaluation of tabled logic programs. In Proceedings of the 19th International Conference on Logic Programming, pages 392--406, 2003.Google ScholarCross Ref
- I. Suzuki and T. Kasami. A distributed mutual exclusion algorithm. ACM Transactions on Computer Systems, 3 (4): 344--349, 1985. Google ScholarDigital Library
- T. Swift, D. S. Warren, et al. The XSB System Version 3.3. Sourceforge.Net, 2011. http://xsb.sourceforge.net/.Google Scholar
- G. Tel. Introduction to Distributed Algorithms. Cambridge University Press, 2nd edition, 2000. Google ScholarDigital Library
- Two-phase commit in Bud Sandbox. https://github.com/bloom-lang/bud-sandbox/blob/master/2pc/2pc.rb.Google Scholar
- Two-Phase Commit in PlusCal. http://research.microsoft.com/en-us/um/people/lamport/tla/two-phase.html.Google Scholar
- R. van Renesse. Paxos made moderately complex, October 11, 2011. An online version is at www.cs.cornell.edu/courses/CS7412/2011sp/paxos.pdf.Google Scholar
- D. E. Willard. Efficient processing of relational calculus expressions using range query theory. In Proceedings of the 1984 ACM SIGMOD International Conference on Management of Data, pages 164--175, 1984. Google ScholarDigital Library
- D. E. Willard. An algorithm for handling many relational calculus queries efficiently. Journal of Computer and System Sciences, 65: 295--331, 2002.Google ScholarCross Ref
- G. Yang, M. Kifer, H. Wan, and C. Zhao. Flora-2: User's Manual Version 0.95. Sourceforge.Net and Stony Brook University, 2008. http://flora.sourceforge.net/.Google Scholar
Index Terms
- From clarity to efficiency for distributed algorithms
Recommendations
From Clarity to Efficiency for Distributed Algorithms
This article describes a very high-level language for clear description of distributed algorithms and optimizations necessary for generating efficient implementations. The language supports high-level control flows in which complex synchronization ...
From clarity to efficiency for distributed algorithms
OOPSLA '12This paper describes a very high-level language for clear description of distributed algorithms and optimizations necessary for generating efficient implementations. The language supports high-level control flows where complex synchronization conditions ...
Making collection operations optimal with aggressive JIT compilation
SCALA 2017: Proceedings of the 8th ACM SIGPLAN International Symposium on ScalaFunctional collection combinators are a neat and widely accepted data processing abstraction. However, their generic nature results in high abstraction overheads -- Scala collections are known to be notoriously slow for typical tasks. We show that ...
Comments