2.6 Distributed Systems

Distributed systems can be represented by communication graphs, composed of two elements: vertices and edges. Vertices represent processes or nodes and edges represent direct communication channels between two vertices. If the communication channel is one-way, i.e. only from vertex i to vertex j without the way back, edges are oriented and the graph is called a directed graph. However, this thesis assumes only bidirectional communication channels, i.e. unoriented edges in undirected graphs.

Two processes connected with a channel are called neighbors, such as process i is a neighbor of process j if they there is a direct edge between them. The set of processes connected to process i is called the neighborhood of i. For example, considering 2.6, process A is a neighbor of process B, and the neighborhood of process B is the set of processes {A,C,F}.

PIC

Figure 2.6: Representation of a communication graph with bidirectional communication channels.

Neighbors of a process have a communication distance of one hop, and are called 1-hop neighbors, as they can directly communicate with it. Neighbors of neighbors of a process are at a distance of 2-hop of this process, and so on. When the distance is higher than one, the term multi-hop can be used. The hop count distance refers to the number of processes between two processes. For example, considering 2.6, process B is a 1-hop neighbor of process A, and process E is a 3-hop neighbor of process A.

As processes are autonomous entities, when a process needs to communicate with a process located further than 1-hop, intermediate processes located between the sender and the final receiver, are called relays and act as routers, establishing a path from the sender to the destination process over which the message is transmitted.

Different assumptions about network knowledge can be made: known networks, where nodes have a knowledge of the system, and unknown networks, with the weakest possible assumptions about knowledge, communication graph, channel connectivity and reliability, in order to be as close as possible to reality.

There are two main types of networks: static and dynamic networks.

2.6.1 Static Systems

Originally, distributed systems were based on static networks. A static system is composed of a finite set of nodes, where the membership of the system can only change because of failures. The communication graph is static during the execution of the system, however, network partitions can arise due to failures. Nodes do not move, nor leave, neither join the system.

As an example, the links of a static system can physically be either wires between nodes, or wireless radio wave antennas with a fixed transmission range.

2.6.2 Dynamic Systems

With the advent of peer-to-peer technologies and mobile devices such as mobile phones, mobile sensors, autonomous vehicular or drones, nodes of a network are able to move, join, or leave the system. They can also fail. Therefore, the membership of the system is no longer finite but may vary over time. Communication channels between nodes are non-persistent and can also change over time, which may lead to network partitions.

There is no unique definition of dynamic systems in the literature [Agu04; KLO10; BRS12; Lar+12]. Some authors define it as a distributed system where the communication graph evolves over time. Others give the definition of a model where nodes join and leave the system at arbitrary times during the system execution.

Dynamic systems can be represented by a dynamic communication graph. Many works characterize the dynamics of graphs, such as the Time-Varying Graph (TVG) proposed by Casteigts et al. [Cas+11] (where relations between nodes take place over a time span 𝒯 , with a presence function indicating whether a given edge is available at a given time), Flocchini et al. [FMS09] and Tang et al. [Tan+10], evolving graphs by Ferreira [Fer04], temporal network by Kempe et al. [KKK02], graphs over time by Leskovec et al. [LKF07], or temporal graph by Kostakos [Kos09].

Physically, the links of a dynamic system can be, for example, wireless communication with radio wave antennas. A representation of a dynamic network is given in 2.7.

PIC

Figure 2.7: Representation of a dynamic network.


Table of Contents

1 Introduction
1.1 Contributions
1.1.1 Topology Aware Leader Election Algorithm for Dynamic Networks
1.1.2 Centrality-Based Eventual Leader Election in Dynamic Networks
1.2 Manuscript Organization
1.3 Publications
1.3.1 Articles in International Conferences
1.3.2 Articles in National Conferences
2 Background
2.1 Properties of Distributed Algorithms
2.2 Timing Models
2.3 Process Failures
2.4 Communication Channels
2.5 Failures of Communication Channels
2.6 Distributed Systems
2.6.1 Static Systems
2.6.2 Dynamic Systems
2.7 Centralities
2.8 Messages Dissemination
2.9 Leader Election
2.9.1 Classical Leader Election
2.9.2 Eventual Leader Election
2.10 Conclusion
3 Related Work
3.1 Classical Leader Election Algorithms
3.1.1 Static Systems
3.1.2 Dynamic Systems
3.2 Eventual Leader Election Algorithms
3.2.1 Static Systems
3.2.2 Dynamic Systems
3.3 Conclusion
4 Topology Aware Leader Election Algorithm for Dynamic Networks
4.1 System Model and Assumptions
4.1.1 Node states and failures
4.1.2 Communication graph
4.1.3 Channels
4.1.4 Membership and nodes identity
4.2 Topology Aware Leader Election Algorithm
4.2.1 Pseudo-code
4.2.2 Data structures, variables, and messages (lines 1 to 6)
4.2.3 Initialization (lines 7 to 11)
4.2.4 Periodic updates task (lines 12 to 16)
4.2.5 Connection (lines 20 to 23)
4.2.6 Disconnection (lines 24 to 27)
4.2.7 Knowledge reception (lines 28 to 38)
4.2.8 Updates reception (lines 39 to 53)
4.2.9 Pending updates (lines 54 to 65)
4.2.10 Leader election (lines 17 to 19)
4.2.11 Execution examples
4.3 Simulation Environment
4.3.1 Algorithms
4.3.2 Algorithms Settings
4.3.3 Mobility Models
4.4 Evaluation
4.4.1 Metrics
4.4.2 Instability
4.4.3 Number of messages sent per second
4.4.4 Path to the leader
4.4.5 Fault injection
4.5 Conclusion
5 Centrality-Based Eventual Leader Election in Dynamic Networks
5.1 System Model and Assumptions
5.1.1 Node states and failures
5.1.2 Communication graph
5.1.3 Channels
5.1.4 Membership and nodes identity
5.2 Centrality-Based Eventual Leader Election Algorithm
5.2.1 Pseudo-code
5.2.2 Data structures, messages, and variables (lines 1 to 4)
5.2.3 Initialization (lines 5 to 7)
5.2.4 Node connection (lines 8 to 17)
5.2.5 Node disconnection (lines 18 to 23)
5.2.6 Knowledge update (lines 24 to 34)
5.2.7 Neighbors update (lines 35 to 41)
5.2.8 Information propagation (lines 42 to 47)
5.2.9 Leader election (lines 48 to 52)
5.3 Simulation Environment
5.3.1 Algorithms Settings
5.3.2 Mobility Models
5.4 Evaluation
5.4.1 Metrics
5.4.2 Average number of messages sent per second per node
5.4.3 Average of the median path to the leader
5.4.4 Instability
5.4.5 Focusing on the 60 meters range over time
5.4.6 A comparative analysis with Topology Aware
5.5 Conclusion
6 Conclusion and Future Work
6.1 Contributions
6.2 Future Directions
A Appendix
A.1 Energy consumption per node
A.1.1 Simulation environment
A.1.2 Algorithms settings
A.1.3 Mobility Models
A.1.4 Metric
A.1.5 Performance Results