Presentation is loading. Please wait.

Presentation is loading. Please wait.

Prof. Leonardo Mostarda University of Camerino

Similar presentations


Presentation on theme: "Prof. Leonardo Mostarda University of Camerino"— Presentation transcript:

1 Prof. Leonardo Mostarda University of Camerino
Distributed Systems – Architectures(2) Prof. Leonardo Mostarda University of Camerino Prof. Leonardo Mostarda-- Camerino,

2 Last lecture Architectural styles System architectures
Layered architectures Object-based architectures Data-centered architectures Event-based architectures Shared-data space architectures System architectures Client server Multitiered Architectures

3 Outline Decentralised architectures Hybrid architectures
Structured peer-to-peer architectures Unstructured peer-to-peer architectures Hybrid architectures Superpeer architectures Collaborative Distributed Systems Additional readings “Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications” MIT papers

4 Learning outcomes Introduce and discuss different decentralised architectures Discuss different peer-to-peer architectures Critically evaluate some hybrid architectures

5 Decentralised architectures
Vertical distribution places logically different components in different machines Ex: three-tiered architecture In horizontal distribution the same component is physically split up into logically equivalent parts. Each part operates on its own share of the data. Peer-to-peer systems support horizontal distribution. As we explained in Chap. I, an important goal of distributed systems is to separate applications from underlying platforms by providing a middleware layer. 33 34 ARCHITECTURES CHAP. 2 Adopting such a layer is an important architectural decision, and its main purpose is to provide distribution transparency. However, trade-offs need to be made to achieve transparency, which has led to various techniques to make middleware adaptive. We discuss some of the more commonly applied ones in this chapter, as they affect the organization of the middleware itself.

6 Peer-to-Peer architectures
From a high-level perspective the processes that constitute a peer-to-peer systems are all equal Each process acts as a client and a server at the same time (Servent). Peer-to-peer architectures evolve around the question how to organise processes in an overlay network. In an overlay network nodes are formed by the processes and links are used to communicate Structured overlay networks Unstructured overlay networks

7 Structured peer-to-Peer architectures
In a structured peer-to-peer architecture the overlay network is built using a deterministic procedure A distributed hash table (DHT) is often used in order to store (key, value) pairs and retrieve a value from a key In a DHT nodes cooperate to perform the mapping so that when nodes change a minimal amount of disruption is caused Nodes can leave and join Nodes can fail DHT should be scalable Query Update

8 Structured peer-to-Peer architectures
Chord systems Nodes are organised in a ring An item k is mapped to the node with the smallest id s.t. id≥k The node is referred to as succ(k) LOOKUP(k)=succ(k)

9 Successor Nodes identifier node X key 6 4 2 6 5 1 3 7 1 identifier
4 2 6 5 1 3 7 1 successor(1) = 1 identifier circle successor(6) = 0 6 2 successor(2) = 3 2

10 Node Joins and Departures
6 6 4 2 6 5 1 3 7 1 successor(6) = 7 successor(1) = 3 2 1

11 Scalable Key Location Update is efficient
Each node need only be aware of its successor node on the circle How do we retrieve an element? We navigate the successors. Is that efficient?

12 Acceleration of Lookups
Finger tables can be used in order to accelerate the look up Each node maintains a routing table with (at most) m entries (where N=2m) ith entry in the table at node n contains the identity of the first node, s, that succeeds n by at least 2i-1 on the identifier circle (clarification on next slide) s = successor(n + 2i-1) (all arithmetic mod 2)

13 Finger Tables (1) 4 2 6 5 1 3 7 finger table start int. succ. keys 6 1
[1,2) [2,4) [4,0) 1 3 4 2 6 5 1 3 7 finger table start int. succ. keys 1 2 3 5 [2,3) [3,5) [5,1) finger table start int. succ. keys 2 4 5 7 [4,5) [5,7) [7,3)

14 Finger Tables (2) - characteristics
A node’s finger table generally does not contain enough information to determine the successor of an arbitrary key k Repetitive queries to nodes that immediately precede the given key will lead to the key’s successor eventually

15 Node Joins – with Finger Tables
keys start int. succ. 6 1 2 4 [1,2) [2,4) [4,0) 1 3 6 4 2 6 5 1 3 7 finger table start int. succ. keys 1 2 3 5 [2,3) [3,5) [5,1) 6 finger table start int. succ. keys 7 2 [7,0) [0,2) [2,6) 3 finger table keys start int. succ. 2 4 5 7 [4,5) [5,7) [7,3) 6 6

16 Node Departures – with Finger Tables
keys start int. succ. 1 2 4 [1,2) [2,4) [4,0) 1 3 3 6 4 2 6 5 1 3 7 finger table keys start int. succ. 1 2 3 5 [2,3) [3,5) [5,1) 3 6 finger table keys start int. succ. 6 7 2 [7,0) [0,2) [2,6) 3 finger table keys start int. succ. 2 4 5 7 [4,5) [5,7) [7,3) 6

17 Unstructured peer-to-peer architectures
Unstructured peer-to-peer systems largely rely on randomized algorithms for constructing an overlay network. Each node maintains a list of neighbours, but this list is constructed in a more or less random way Likewise, data items are assumed to be randomly placed on nodes As a consequence, when a node needs to locate a specific data item, the only thing it can effectively do is flood the network with a search query

18 Unstructured peer-to-peer architectures
What are the disadvantages of the unstructured peer-to-peer architectures? Locating data items can become problematic as the network grows. WHY? The reason for this scalability problem is simple: the lookup request of an item requires flooding. How can this problem been dammed?

19 Superpeers architectures
When a peer joins the network it assigned to a superpeer Superpeers are long-lived processes with a high availability Superpeers are organised in a peer-to-peer network

20 Superpeers architectures
In the case of file sharing superpeers maintains an index of files A client can change his superpeer when it discovers better superpeers to associate with How the elect the superpeers?

21 Hybrid architectures Client server solutions are combined with decentralised architectures. This is the case of superpeer networks Hybrid architectures are often used for the implementation of Collaborative Distributed Systems In this system the main issue is to get started (for which a client –server solution is used) Once a node has joined a decentralised solution is used for the collaboration Collaborative Distributed Systems where processes work together towards a common goal

22 Hybrid architectures BitTorrent We need to download a torrent file
The file has a tracker. This is a server that is keeping account of active nodes that have chunks of the requested file Then download can start.

23 Prof. Leonardo Mostarda-- Camerino,
Hybrid architectures Can bit torrent work without tracker? distributed database: a DHT implementation that allows clients to use torrents that do not have a working BitTorrent tracker Prof. Leonardo Mostarda-- Camerino,

24 Summary Decentralised architecture Structured peer-to-peer
Unstructured peer-to-peer Hybrid architectures Superpeer architectures Collaborative Distributed Systems

25 Prof. Leonardo Mostarda-- Camerino,
15 minutes pause Prof. Leonardo Mostarda-- Camerino,

26 Prof. Leonardo Mostarda-- Camerino,
Questions? Prof. Leonardo Mostarda-- Camerino,


Download ppt "Prof. Leonardo Mostarda University of Camerino"

Similar presentations


Ads by Google