skip to main content
10.1145/2384616.2384645acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
research-article

From clarity to efficiency for distributed algorithms

Authors Info & Claims
Published:19 October 2012Publication History

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.

References

  1. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  2. G. Agha. Actors: a model of concurrent computation in distributed systems. MIT Press, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  4. H. Attiya and J. Welch. Distributed Computing: Fundamentals, Simulations, and Advanced Topics. Wiley, 2nd edition, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. A. Badia. Question answering and database querying: Bridging the gap with generalized quantification. Journal of Applied Logic, 5 (1): 3--19, 2007.Google ScholarGoogle ScholarCross RefCross Ref
  6. 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 ScholarGoogle Scholar
  7. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  8. Berkeley Orders of Magnitude. Bloom Programming Language. http://www.bloom-lang.net/.Google ScholarGoogle Scholar
  9. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  10. M. Castro and B. Liskov. Practical Byzantine fault tolerance and proactive recovery. ACM Transactions on Computer Systems, 20: 398--461, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  12. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  13. T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein. Introduction to Algorithms. MIT Press, 3rd edition, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. CRASH Project. EventML. http://www.nuprl.org/software/#WhatisEventML, Last dated March 2012.Google ScholarGoogle Scholar
  15. D. Dolev and H. R. Strong. Authenticated algorithms for Byzantine agreement. SIAM J. Comput., 12 (4): 656--666, 1983.Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Erlang Programming Language. Erlang Programming Language. http://www.erlang.org/.Google ScholarGoogle Scholar
  17. 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 ScholarGoogle Scholar
  18. 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 ScholarGoogle ScholarCross RefCross Ref
  19. V. K. Garg. Elements of Distributed Computing. Wiley, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  21. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  22. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  23. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  24. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  25. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  26. D. Hansel, R. Cleaveland, and S. A. Smolka. Distributed prototyping from validated specifications. Journal of Systems and Software, 70 (3): 275--298, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  28. I/O Automata Description of Leader Election Algorithm. http://groups.csail.mit.edu/tds/ioa/leader.html.Google ScholarGoogle Scholar
  29. 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 ScholarGoogle Scholar
  30. D. Kaynar, N. Lynch, R. Segala, and F. Vaandrager. The Theory of Timed I/O Automata. Morgan Claypool Publishers, 2nd edition, 2010.Google ScholarGoogle Scholar
  31. 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 ScholarGoogle Scholar
  32. A. Kshemkalyani and M. Singhal. Distributed Computing: Principles, Algorithms, and Systems. Cambridge University Press, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. L. Lamport. Time, clocks, and the ordering of events in a distributed system. Communications of the ACM, 21: 558--565, 1978. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. L. Lamport. The part-time parliament. ACM Transactions on Computer Systems, 16 (2): 133--169, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. L. Lamport. Paxos made simple. SIGACT News (Distributed Computing Column), 32 (4): 51--58, 2001.Google ScholarGoogle Scholar
  36. L. Lamport. The PlusCal algorithm language. In Proceedings of the 6th International Colloquium on Theoretical Aspects of Computing, pages 36--60, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Y. A. Liu and S. D. Stoller. Dynamic programming via static incrementalization. Higher-Order and Symbolic Computation, 16 (1--2): 37--62, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  39. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  40. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  41. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  42. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  43. N. A. Lynch. Distributed Algorithms. Morgan Kaufman, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. F. Mattern. Virtual time and global states of distributed systems. In Proc. International Workshop on Parallel and Distributed Algorithms, pages 120--131, 1989.Google ScholarGoogle Scholar
  45. 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 ScholarGoogle Scholar
  46. S. Merz. Lamport's algorithm, 2010. Email.Google ScholarGoogle Scholar
  47. Message Passing Interface (MPI) Forum. Message Passing Interface (MPI) Forum. http://www.mpi-forum.org/.Google ScholarGoogle Scholar
  48. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  49. P2. https://svn.declarativity.net/overlog-paxos/src/olg/core/.Google ScholarGoogle Scholar
  50. R. Paige and S. Koenig. Finite differencing of computable expressions. ACM Transactions on Programming Languages and Systems, 4 (3): 402--454, 1982. Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. Paxos in Bud Sandbox. https://github.com/bloom-lang/bud-sandbox/tree/master/paxos.Google ScholarGoogle Scholar
  52. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  53. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  54. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  55. M. Raynal. Distributed Algorithms and Protocols. Wiley, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  56. M. Raynal. Communication and Agreement Abstractions for Fault-Tolerant Asynchronous Distributed Systems. Morgan & Claypool, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  57. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  58. 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 ScholarGoogle Scholar
  59. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  60. 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 ScholarGoogle ScholarCross RefCross Ref
  61. I. Suzuki and T. Kasami. A distributed mutual exclusion algorithm. ACM Transactions on Computer Systems, 3 (4): 344--349, 1985. Google ScholarGoogle ScholarDigital LibraryDigital Library
  62. T. Swift, D. S. Warren, et al. The XSB System Version 3.3. Sourceforge.Net, 2011. http://xsb.sourceforge.net/.Google ScholarGoogle Scholar
  63. G. Tel. Introduction to Distributed Algorithms. Cambridge University Press, 2nd edition, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  64. Two-phase commit in Bud Sandbox. https://github.com/bloom-lang/bud-sandbox/blob/master/2pc/2pc.rb.Google ScholarGoogle Scholar
  65. Two-Phase Commit in PlusCal. http://research.microsoft.com/en-us/um/people/lamport/tla/two-phase.html.Google ScholarGoogle Scholar
  66. 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 ScholarGoogle Scholar
  67. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  68. D. E. Willard. An algorithm for handling many relational calculus queries efficiently. Journal of Computer and System Sciences, 65: 295--331, 2002.Google ScholarGoogle ScholarCross RefCross Ref
  69. 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 ScholarGoogle Scholar

Index Terms

  1. From clarity to efficiency for distributed algorithms

            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
            • Published in

              cover image ACM Conferences
              OOPSLA '12: Proceedings of the ACM international conference on Object oriented programming systems languages and applications
              October 2012
              1052 pages
              ISBN:9781450315616
              DOI:10.1145/2384616
              • cover image ACM SIGPLAN Notices
                ACM SIGPLAN Notices  Volume 47, Issue 10
                OOPSLA '12
                October 2012
                1011 pages
                ISSN:0362-1340
                EISSN:1558-1160
                DOI:10.1145/2398857
                Issue’s Table of Contents

              Copyright © 2012 ACM

              Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 19 October 2012

              Permissions

              Request permissions about this article.

              Request Permissions

              Check for updates

              Qualifiers

              • research-article

              Acceptance Rates

              Overall Acceptance Rate268of1,244submissions,22%

              Upcoming Conference

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader