Download as pdf or txt
Download as pdf or txt
You are on page 1of 22

Distributed Systems

Peer-‐to-‐Peer

Skills for a better destiny


2
Peer to Peer

• The common perception


–A system for distributing (sharing?) files
–Using the computers of common users (instead
of servers)
–A popular file is hosted by one or more
users’ computers
–Someone who needs the file can download
from one or more users
–The P2P system provides easy methods to
search for files and download them
Skills for a better destiny
3
Peer to Peer
• More generally:
–Files are not the only things that can be shared
–Users can share computing power
• CPU cycles
• Storage
• Anonymity (lookup The Onion Router)
• Peer: One that is of equal standing to others in
the group
–Everyone is server and a client
–They provide the service as well as use it
Skills for a better destiny
4
Client – Server model
• The traditional model of internet service is
client server
• For a service X (search, email…)
–There is a specific known server
–Clients (browsers, email clients) contact the server
to get data

Skills for a better destiny


5
Client – Server model (drawbacks)
• Central point of failure
–When the server fails, entire service goes down
–If the server does not recover, all data may be lost
• Load management
–When many clients send requests, everyone gets slow
response
–Popular content gets slower service!
• Addressing: have to “know” the server or search
for it

Skills for a better destiny


6
P2P: Motivations
• Tolerance to faults/attacks
• Load balancing
• User participation
• Cost efficiency
• Hard to control

Skills for a better destiny


7
Fault/attack tolerant
• Everyone is a server, serving part of the
data store
• Each file has multiple copies
• Failures of few or even many computers
does not take down the entire service
• Hard to attack everyone at the same time

Skills for a better destiny


8
Load balanced
• Each file is hosted by multiple users
• If many users want to download, the job gets
divided
• Each host handles only a small load, so does not
get overloaded
• Each downloader gets faster speed

Skills for a better destiny


9
Cost efficiency
• A file or service can be provided without the
expense of a large server
• Popular content is hosted by many users
• Popular content gets better and faster service!
– Unlikely to be lost due to failure
• Large delivery bandwidth does not require
expensive server or infrastructure

Skills for a better destiny


1
0
Hard to control

• And therefore hard to take down

• No one person has much authority over the


system

Skills for a better destiny


1
1
Some Properties
• Unreliable, uncoordinated, unmanaged
–No central Authority, peers are independent
–Increases flexibility of individual peers, but makes overall
system (possibly) unreliable
• Resilient to attack, heterogeneous
–Large number of peers, hard to take down
• Large collection of resources
–Volunteer participation, global reach

Skills for a better destiny


1
2
Issues in p2p
• Finding content
✓ Suppose we have managed to find the network
somehow
✓ We now want to find a particular video
✓ We don’t know who has it
✓ Hard to build a search service, since peers regularly join
and leave the system

Skills for a better destiny


Issues in p2p
• Quality of service
• How fast a download or service works may depend on who is hosting
the file/service
• A file/service may be unavailable simply because all the peers
hosting it are unavailable
• Hard to rely on it..

Skills for a better destiny


Issues in p2p
• Quality of data
• You ask for file X
• Node Y claims to have the file
• You download the file, and then find it is
something completely different
• We can’t prevent node Y from making false
claims
Skills for a better destiny
Issues in p2p

• Hard to control
• Therefore hard to guarantee anything
• The service may deteriorate in quality
and hard to do anything about it

Skills for a better destiny


What are Distributed Ledger
Technologies (DLT)

How do they work

Skills for a better destiny


DLT, what, why, how, who
General Ledger / Distributed ledger

Every participant in a service has a copy or


The ledger is safe stored centrally can have access to a copy of the ledger
by the service provider. supporting this service, which gets
Participants do not have access to updated throughout the day. It has no
the ledger. central server.

17
Skills for a better destiny
Distributed Ledgers - Architecture
• Distributed Ledgers are designed as a peer-to-peer distributed
system composed by a number of nodes. Each node propagates
transactions and ledger updates to all other nodes and fulfils one
or more of the below roles:

• Participant: responsible for transactions input. Depending on


the implementation, have the option to either store the full copy
of the ledger or not. Wallet in Bitcoin terminology.
• Validator: Verify transactions and update the ledger. Miner in
Bitcoin terminology.

18
Skills for a better destiny
Distributed Ledgers
– How does it work?
1. Transactions are broadcasted to
all nodes by participants
2. Validators verify all transactions
and reach a consensus amongst
themselves on what
transactions to include in the
ledger. Various consensus
methods exist (e.g. Proof of
Work for Bitcoin)
3. Once consensus is reached new
Participants set of transactions is included in
the ledger by all participants
Validators

19
DLT, what, why, how, who Skills for a better destiny
Public versus permissioned ledgers

• Public Ledger : anyone, without permission, may submit and validate transactions
(eg, bitcoin)
• Permissioned Ledger : only known and trusted actors may submit and/or validate
transactions

• Permissioned how?
• Validation by consensus, not proof-of-work
• Validators chosen by contract, reputation, organization
• Faster, more efficient than proof-of-work
• Faster (but less secure) than POW algorithm
• Requires high level of trust between participants

Skills for a better destiny


•Why is DLT maybe the next revolution
after the creation of internet

•Why not : challenges

Skills for a better destiny


Why: Key strengths of DLTs
Informatio
Full Simplified Trusted
n High
traceabilit reconciliati disseminate
propagati resiliency
y on d system
on

Information propagation – Efficient means of keeping a full network up to date with latest
information
Full traceability – Participants are able to trace information flows back through the entire
chain
Simplified reconciliation – Local access to complete and verified data easing reconciliation
processes
Trusted disseminated system – Ability to trust authenticity of data on the ledger without
recourse to a central body
High resiliency – Operates seamlessly and removes dependency on a central infrastructure for
service availability
22
Skills for a better destiny

You might also like