Dedalus: Datalog in Time and Space
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.
KeywordsDatalog distributed systems logic programming temporal logic
Unable to display preview. Download preview PDF.
- 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.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.Ashley-Rollman, M.P., et al.: Declarative programming for modular robots. In: Workshop on Self-Reconfigurable Robots/Systems and Applications (2007)Google Scholar
- 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
- 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.Cleary, J.G., Utting, M., Clayton, R.: Data Structures Considered Harmful. In: Australasian Workshop on Computational Logic (2000)Google Scholar
- 11.Eisner, J., Goldlust, E., Smith, N.A.: Dyna: a declarative language for implementing dynamic programs. In: Proc. ACL (2004)Google Scholar
- 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.Jim, T.: Sd3: A trust management system with certified evaluation. In: IEEE Symposium on Security and Privacy, pp. 106–115 (2001)Google Scholar
- 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
- 19.Liu, M., Cleary, J.: Declarative Updates in Deductive Databases. Journal of Computing and Information 1, 1435–1446 (1994)Google Scholar
- 21.Loo, B.T., Hellerstein, J.M., Stoica, I., Ramakrishnan, R.: Declarative routing: Extensible routing with declarative queries. In: SIGCOMM (2005)Google Scholar
- 23.Mao, Y.: On the declarativity of declarative networking. In: NetDB (2009)Google Scholar
- 29.Saraswat, V.A., Jagadeesan, R., Gupta, V.: Foundations of Timed Concurrent Constraint Programming. In: LICS, pp. 71–80 (1994)Google Scholar
- 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.White, W., et al.: Scaling games to epic proportions. In: SIGMOD (2007)Google Scholar
- 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