Logical formalisms such as first-order logic (FO) and fixpoint logic (FP) are well suited to express in a declarative manner fundamental graph functionalities required in distributed systems. We show that these logics constitute good abstractions for programming distributed systems as a whole, since they can be evaluated in a fully distributed manner with reasonable complexity upper-bounds. We first prove that FO and FP can be evaluated with a polynomial number of messages of logarithmic size. We then show that the (global) logical formulas can be translated into rule programs describing the local behavior of the nodes of the distributed system, which compute equivalent results. Finally, we introduce local fragments of these logics, which preserve as much as possible the locality of their distributed computation, while offering a rich expressive power for networking functionalities. We prove that they admit tighter upper-bounds with bounded number of messages of bounded size. Finally, we show that the semantics and the complexity of the local fragments are preserved over locally consistent networks as well as anonymous networks, thus showing the robustness of the proposed local logical formalisms.
Deep Dive into On the distributed evaluation of recursive queries over graphs.
Logical formalisms such as first-order logic (FO) and fixpoint logic (FP) are well suited to express in a declarative manner fundamental graph functionalities required in distributed systems. We show that these logics constitute good abstractions for programming distributed systems as a whole, since they can be evaluated in a fully distributed manner with reasonable complexity upper-bounds. We first prove that FO and FP can be evaluated with a polynomial number of messages of logarithmic size. We then show that the (global) logical formulas can be translated into rule programs describing the local behavior of the nodes of the distributed system, which compute equivalent results. Finally, we introduce local fragments of these logics, which preserve as much as possible the locality of their distributed computation, while offering a rich expressive power for networking functionalities. We prove that they admit tighter upper-bounds with bounded number of messages of bounded size. Finally,
Logical formalisms have been widely used in different fields of computer science to provide highlevel programming abstractions. The relational calculus used by Codd to describe data-centric applications in an abstract way, is at the origin of the technological and commercial success of relational database management systems [16]. Datalog, an extension of Horn clause logic with fixpoints, has been widely used to specify functionalities involving recursion [17].
The development of distributed applications over networks of devices is generally a very tedious task, involving handling low level system details. The lack of high-level programming abstraction has been identified as one of the roadblocks for the deployment of networks of cooperating objects [15].
Recently, the use of queries to define network applications has been considered. Initially, the idea emerged in the field of sensor networks. It was suggested to see the network as a database, and interact with it through declarative queries. Several systems have been developed, among which Cougar [9] and TinyDB [14], supporting SQL dialects. Queries are processed in a centralized manner, leading to distributed execution plans.
More recently, query languages were proposed as a mean to express communication network problems such as routing protocols [13] and declarative overlays [12]. This approach, known as declarative networking is extremely promising for it offers a high-level abstraction to program networks. It was also shown how to use recursive queries to perform diagnosis of asynchronous systems [1], network monitoring [18], as well as self-organization protocols [10]. Distributed query languages provide new means to express complex network problems such as node discovery [3], route finding, path maintenance with quality of service [6], topology discovery, including physical topology [5], etc.
However, there is a lack of systematic theoretical investigations of query languages in the distributed setting, in particular on their semantics, as well as the complexity of their distributed computation. In the present paper, we consider a distributed evaluation of classical query languages, namely, first-order logic and fixpoint logic, which preserves their classical semantics.
First-order logic and fixpoint logic have been extensively investigated in the context of database theory [2] as well as finite model theory [7]. Since the seminal paper of Fagin [8], showing that the class NP corresponds exactly to problems which can be expressed in existential second-order logic, many results have linked Turing complexity classes with logical formalisms. Parallel complexity has also been considered for first-order queries which can be evaluated in constant time over circuits with arbitrary fan-in gates [11].
This raised our curiosity on the distributed potential of these classical query languages to express the functionalities of communication networks, which have to be computed in a distributed manner over the network itself. If their computation can be distributed efficiently, they can form the basis of a high level abstraction for programming distributed systems as a whole.
We rely on the classical message passing model [4]. Nodes exchange messages with their neighbors in the network. We consider four measures of complexity: (i) the in-node computational complexity, rarely addressed in distributed computing; (ii) the distributed time complexity; (iii) the message size; and (iv) the per-node message complexity. The behavior of the nodes is governed by an algorithm, the distributed query engine, which is installed on each node, and evaluates the queries by alternating local computation and exchange of queries and results with the other nodes.
We first consider the distributed complexity of first-order logic and fixpoint logic with inflationary semantics, which accumulates all the results of the different stages of the computation. Note that our result carry over for other formalisms such as least fixpoint. We prove that the distributed complexity of first-order queries is in O(log n) in-node time, O(∆) distributed time (∆ is the diameter of the network), messages of size O(log n), and a polynomial number of messages per node. For fixpoint, a similar bound can be shown but with a polynomial distributed time.
We then consider the translation of logical formulae that express properties of graphs at a global level, into rule programs that express the behavior of nodes at a local level, and compute the same result. We introduce a rule language, N etlog, which extends Datalog, with communication primitives, and is well suited to express distributed applications, ranging from networking protocols to distributed data management. N etlog is supported by the Netquest system, on which the examples of this paper have been implemented. We prove that graph programs in Datalog ¬ [2] can be translated to N etlog programs. Since it is well known that first-order and fixpoi
…(Full text truncated)…
This content is AI-processed based on ArXiv data.