Dedalus: Datalog in Time and Space

  • Peter Alvaro
  • William R. Marczak
  • Neil Conway
  • Joseph M. Hellerstein
  • David Maier
  • Russell Sears
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6702)

Abstract

Recent research has explored using Datalog-based languages to express a distributed system as a set of logical invariants. Two properties of distributed systems proved difficult to model in Datalog. First, the state of any such system evolves with its execution. Second, deductions in these systems may be arbitrarily delayed, dropped, or reordered by the unreliable network links they must traverse. Previous efforts addressed the former by extending Datalog to include updates, key constraints, persistence and events, and the latter by assuming ordered and reliable delivery while ignoring delay. These details have a semantics outside Datalog, which increases the complexity of the language and its interpretation, and forces programmers to think operationally. We argue that the missing component from these previous languages is a notion of time.

In this paper we present Dedalus, a foundation language for programming and reasoning about distributed systems. Dedalus reduces to a subset of Datalog with negation, aggregate functions, successor and choice, and adds an explicit notion of logical time to the language. We show that Dedalus provides a declarative foundation for the two signature features of distributed systems: mutable state, and asynchronous processing and communication. Given these two features, we address two important properties of programs in a domain-specific manner: a notion of safety appropriate to non-terminating computations, and stratified monotonic reasoning with negation over time. We also provide conservative syntactic checks for our temporal notions of safety and stratification. Our experience implementing full-featured systems in variants of Datalog suggests that Dedalus is well-suited to the specification of rich distributed services and protocols, and provides both cleaner semantics and richer tests of correctness.

Keywords

Datalog distributed systems logic programming temporal logic 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Abelson, H., Sussman, G.J. (eds.): Structure and Interpretation of Computer Programs, 2nd edn. McGraw Hill, New York (1996)MATHGoogle Scholar
  2. 2.
    Alvaro, P., Condie, T., Conway, N., Elmeleegy, K., Hellerstein, J.M., Sears, R.C.: BOOM Analytics: Exploring Data-centric, Declarative Programming for the Cloud. In: EuroSys (2010)Google Scholar
  3. 3.
    Alvaro, P., Condie, T., Conway, N., Hellerstein, J.M., Sears, R.: I Do Declare: Consensus in a logic language. In: NetDB (2009)Google Scholar
  4. 4.
    Ashley-Rollman, M.P., et al.: Declarative programming for modular robots. In: Workshop on Self-Reconfigurable Robots/Systems and Applications (2007)Google Scholar
  5. 5.
    Belaramani, N., Zheng, J., Nayate, A., Soulé, R., Dahlin, M., Grimm, R.: PADS: A policy architecture for distributed storage systems. In: NSDI (2009)Google Scholar
  6. 6.
    Bertino, E., Catania, B., Gori, R.: Enhancing the Expressive Power of the U-Datalog Language. Theory and Practice of Logic Programming 1(1), 105–122 (2001)MathSciNetCrossRefMATHGoogle Scholar
  7. 7.
    Chimenti, D., Gamboa, R., Krishnamurthy, R., Naqvi, S., Tsur, S., Zaniolo, C.: The LDL System Prototype. IEEE Trans. on Knowl. and Data Eng. 2(1), 76–90 (1990)CrossRefGoogle Scholar
  8. 8.
    Chu, D.C., Popa, L., Tavakoli, A., Hellerstein, J.M., Levis, P., Shenker, S., Stoica, I.: The design and implementation of a declarative sensor network system. In: 5th ACM Conference on Embedded Networked Sensor Systems, SenSys (2007)Google Scholar
  9. 9.
    Cleary, J.G., Utting, M., Clayton, R.: Data Structures Considered Harmful. In: Australasian Workshop on Computational Logic (2000)Google Scholar
  10. 10.
    Derr, M.A., Morishita, S., Phipps, G.: The Glue-Nail Deductive Database System: Design, Implementation, and Evaluation. The VLDB Journal 3, 123–160 (1994)CrossRefGoogle Scholar
  11. 11.
    Eisner, J., Goldlust, E., Smith, N.A.: Dyna: a declarative language for implementing dynamic programs. In: Proc. ACL (2004)Google Scholar
  12. 12.
    Georg Lausen, W.M., Ludäscher, B.: On active deductive databases: The statelog approach. In: Kifer, M., Voronkov, A., Freitag, B., Decker, H. (eds.) Dagstuhl Seminar 1997, DYNAMICS 1997, and ILPS-WS 1997. LNCS, vol. 1472, pp. 69–106. Springer, Heidelberg (1998)CrossRefGoogle Scholar
  13. 13.
    Greco, S., Zaniolo, C.: Greedy Algorithms in Datalog with Choice and Negation. In: Proceedings of the Joint International Conference and Symposium on Logic Programming, pp. 294–309 (1998)Google Scholar
  14. 14.
    Jim, T.: Sd3: A trust management system with certified evaluation. In: IEEE Symposium on Security and Privacy, pp. 106–115 (2001)Google Scholar
  15. 15.
    Lam, M.S., Whaley, J., Livshits, V.B., Martin, M.C., Avots, D., Carbin, M., Unkel, C.: Context-sensitive program analysis as database queries. In: PODS (2005)Google Scholar
  16. 16.
    Lamport, L.: Time, Clocks, and the Ordering of Events in a Distributed System. Communications of the ACM 21(7), 558–565 (1978)CrossRefMATHGoogle Scholar
  17. 17.
    Lamport, L.: The temporal logic of actions. ACM Toplas 16(3), 872–923 (1994)CrossRefGoogle Scholar
  18. 18.
    Li, N., Mitchell, J.: Datalog with constraints: A foundation for trust-management languages. In: Dahl, V. (ed.) PADL 2003. LNCS, vol. 2562, pp. 58–73. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  19. 19.
    Liu, M., Cleary, J.: Declarative Updates in Deductive Databases. Journal of Computing and Information 1, 1435–1446 (1994)Google Scholar
  20. 20.
    Loo, B.T., Condie, T., Garofalakis, M., Gay, D.E., Hellerstein, J.M., Maniatis, P., Ramakrishnan, R., Roscoe, T., Stoica, I.: Declarative Networking. Communications of the ACM 52(11), 87–95 (2009)CrossRefGoogle Scholar
  21. 21.
    Loo, B.T., Hellerstein, J.M., Stoica, I., Ramakrishnan, R.: Declarative routing: Extensible routing with declarative queries. In: SIGCOMM (2005)Google Scholar
  22. 22.
    Lu, L., Cleary, J.G.: An Operational Semantics of Starlog. In: Nadathur, G. (ed.) PPDP 1999. LNCS, vol. 1702, pp. 131–162. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  23. 23.
    Mao, Y.: On the declarativity of declarative networking. In: NetDB (2009)Google Scholar
  24. 24.
    Mullender, S. (ed.): Distributed Systems, 2nd edn. Addison-Wesley, Reading (1993)MATHGoogle Scholar
  25. 25.
    Mumick, I.S., Shmueli, O.: How expressive is stratified aggregation? Annals of Mathematics and Artificial Intelligence 15(3-4), 407–435 (1995)MathSciNetCrossRefMATHGoogle Scholar
  26. 26.
    Navarro, J.A., Rybalchenko, A.: Operational Semantics for Declarative Networking. In: Gill, A., Swift, T. (eds.) PADL 2009. LNCS, vol. 5418, pp. 76–90. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  27. 27.
    Przymusinski, T.C.: On the Declarative Semantics of Deductive Databases and Logic Programs. In: Minker, J. (ed.) Foundations of Deductive Databases and Logic Programming, pp. 193–216. Morgan Kaufmann, Los Altos (1988)CrossRefGoogle Scholar
  28. 28.
    Saraswat, V., Jagadeesan, R., Gupta, V.: Timed Default Concurrent Constraint Programming. Journal of Symbolic Computation 22(5-6), 475–520 (1996)MathSciNetCrossRefMATHGoogle Scholar
  29. 29.
    Saraswat, V.A., Jagadeesan, R., Gupta, V.: Foundations of Timed Concurrent Constraint Programming. In: LICS, pp. 71–80 (1994)Google Scholar
  30. 30.
    Ullman, J.D.: Principles of Database and Knowledge-Base Systems. The New Technologies, vol. II. W. H. Freeman & Co., New York (1990)Google Scholar
  31. 31.
    White, W., et al.: Scaling games to epic proportions. In: SIGMOD (2007)Google Scholar
  32. 32.
    Zhou, W., Mao, Y., Loo, B.T., Abadi, M.: Unified declarative platform for secure netwoked information systems. In: ICDE, pp. 150–161 (2009)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Peter Alvaro
    • 1
  • William R. Marczak
    • 1
  • Neil Conway
    • 1
  • Joseph M. Hellerstein
    • 1
  • David Maier
    • 2
  • Russell Sears
    • 3
  1. 1.University of CaliforniaBerkeleyUSA
  2. 2.Portland State UniversityUSA
  3. 3.Yahoo! ResearchUSA

Personalised recommendations