Download - Lecturer

Document related concepts

Distributed operating system wikipedia , lookup

Internet protocol suite wikipedia , lookup

Deep packet inspection wikipedia , lookup

CAN bus wikipedia , lookup

Distributed firewall wikipedia , lookup

AppleTalk wikipedia , lookup

Remote Desktop Services wikipedia , lookup

Peering wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Lag wikipedia , lookup

Airborne Networking wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Peer-to-peer wikipedia , lookup

Transcript
Sistem Terdistribusi
Peer to Peer Systems
Client Server vs P2P
• Client/server is hierarchical system, with
resources centralized on a limited
number of servers.
• In peer-to-peer networks, both resources
and control are widely distributed among
nodes that are theoretically equals.
– A node with more information, better
information, or more power may be “more
equal,” but that is a function of the node, not
the network controllers.
The architectures
• Server-based architecture
– Client-Server / Server-Cluster
– Problems:
• Limited resources
• All loads are centered on the server
– Server-based architecture has low scalability.
– The setup and maintenance cost is high.
• Peer-to-Peer (P2P) architecture
– Advantages:
• Distributing loads to all users
• Users consume and provide resources
– P2P architecture has high scalability.
– The setup and maintenance cost is low.
The Client Side
• Today’s clients can perform more roles
than just forwarding users requests
• Today’s clients have:
– more computing power
– more storage space
• As the Internet usage grow, more and
more PCs are connecting to the global net
• Most of the time PCs are idle
• Thin client Fat client
Decentralization
• A key feature of peer-to-peer networks is
decentralization.
• This has many implications:
– robustness: handal
– availability of information: selalu ada &
tersebar dimasing2 client
– fault-tolerance tends to come from
redundancy => satu down yg lain bisa handle
– and shared responsibility: tugas dibagi
Technology Transition
The Client/Server Model
The Peer-to-Peer Model
Peer to Peer (P2P)
- Setiap komputer yang terhubung ke jaringan
dapat bertindak baik sebagai client maupun
server.
- Server di jaringan tipe peer to peer disebut nondedicated server
- karena server tidak berperan sebagai server murni,
tetapi sekaligus dapat berperan sebagai client.
- Pada jaringan tipe ini semua komputer
berkedudukan sama, dapat bertindak sebagai
sebuah PC client (information requestor)
maupun PC server (information provider).
Jenis P2P: Pure P2P
Masing-masing peer berstatus setara (egaliter),
setiap peer berstatus sebagai client juga server.
Tidak ada server pusat yang mengatur jaringan.
Tidak ada router yang menjadi pusat jaringan.
Bisa terdiri dari > 2 komputer
Hybrid P2P
- Mempunyai server pusat yang memantau dan
menjaga informasi yang berada di setiap peer
sekaligus merespon peer ketika ada yang
meminta informasi tertentu.
- Setiap peer bertanggung jawab untuk
menyediakan resource yang tersedia.
-
Karena server pusat tidak memiliki resource
tersebut, hal ini juga dilakukan agar server pusat
tersebut dapat mengetahui resource apa saja yang
akan didistribusikan di dalam jaringan.
Why P2P?
• Information - Hard to find, impossible to
catalog and index all of the information
• Bandwidth - Hot links get hotter
– Makin bagus informasi, makin laris dan makin
tak terbendung
– Makin banyak juga yg “memilikinya” dan
tersebar dimana-mana
• Computing resources - Heavily loaded
nodes get overloaded, idle nodes remain
idle
P2P Goals/Benefits
• Cost/data sharing
• Reduce cost: operasional murah
• Resource aggregation (digabungkan) dari
berbagai sumber
• Improved reliability : kerja jaringan tidak
tergantung pada satu server
• Increased autonomy (kebebasan) pada
masing-masing peer
• Anonymity/privacy masing2 peer
• Scalability : since every peer is alike, it is possible to add
more peers to the system and scale to larger networks.
P2P Computing Applications
• File sharing
– Improves data availability
– E.g., Napster, Gnutella, Freenet, KaZaA
• Process sharing
– For large-scale computations
– Data analysis, data mining, scientific computing
– E.g.: SETI@Home, Folding@Home, distributed.net
• Collaborative environments
– For remote real-time human collaboration.
– Instant messaging, virtual meetings, shared
whiteboards, teleconferencing, tele-presence.
– E.g.: talk, IRC, ICQ, AOL Messenger, Jabber, MS
Netmeeting, NCSA Habanero, some of Games
SETI@Home
• SETI – Search for Extra-Terrestrial Intelligence
• @Home – On your own computer
• A radio telescope in Puerto Rico that scans the
sky for radio signals
• Its purpose is to analyze radio signals, searching
for signs of extra terrestrial intelligence, and is one
of many activities undertaken as part of SETI
• to prove the practicality of the 'volunteer
computing' concept.
• Fills a DAT tape of 35GB in 15 hours
• That data have to be analyzed (very large
computing)
SETI@Home - Example
Kelemahan Peer to Peer (P2P)
Troubleshooting jaringan relatif lebih sulit,
karena pada jaringan tipe peer to peer setiap
komputer dimungkinkan untuk terlibat dalam
komunikasi yang ada.
Di jaringan client-server, komunikasi adalah antara
server dengan workstation.
Unjuk kerja lebih rendah dibandingkan
dengan jaringan client-server, karena setiap
komputer/peer disamping harus mengelola
pemakaian fasilitas jaringan juga harus
mengelola pekerjaan atau aplikasi sendiri.
Kelemahan Peer to Peer (P2P)
Sistem keamanan jaringan ditentukan
oleh masing-masing user dengan
mengatur
keamanan
masing-masing
fasilitas yang dimiliki.
Karena data jaringan tersebar di masingmasing komputer dalam jaringan, maka
backup harus dilakukan oleh masingmasing komputer tersebut.
Kelemahan P2P
• Decentralized coordination
– How to keep global state consistent?
– Need for distributed coherency protocols.
• All nodes are not created equal.
– Computing power, bandwidth have an impact
on overall performance.
Dangers and Attacks on P2P
•
•
•
•
•
•
•
•
•
Poisoning (files with contents different to its description)
Polluting (inserting bad packets into the files)
Defection (users use the service without sharing)
Insertion of viruses (attached to other files)
Malware (spy originally attached to the files)
Denial of Service (slow down or stop the network traffic)
Filtering (some networks don’t allow P2P traffic)
Identity attacks (tracking down users and disturbing them)
Spam (sending unsolicited information)
P2P Technical Challenges
•
•
•
•
•
•
•
•
Peer identification
Routing protocols
Network topologies
Peer discovery
Communication/coordination protocols
Quality of service
Security
Resource management
P2P Topologies
Centralized Ring
Hierarchical
Decentralized
Hybrid
Centralized
Hieralchical
Ring
Decentralized
Hybrid
EXAMPLE
P2P Centralized Napster
P2P Decentralized KaZaA
P2P Hybrid JXTA
Napster
• The first large scale peer-to-peer network was
Napster, set up in 1999 to share digital music files
over the Internet.
• While Napster maintained centralized (and
replicated) index, the music files were created and
made available by individuals, usually with music
copied from CDs to computer files.
• Music content owners sued Napster for copyright
violations and succeeded in shutting down the
service.
Napster: a centralized,
replicated index
peers
Napster server
Index
1. File location
request
2. List of peers
offering the file
Napster server
Index
3. File request
5. Index update
4. File delivered
Napster Sharing Style
Title
song1.mp3
song2.mp3
song3.mp3
song4.mp3
song5.mp3
song5.mp3
song6.mp3
song6.mp3
song7.mp3
1. Users launch Napster and
connect to Napster server
2. Napster creates dynamic
directory from users’
personal .mp3 libraries
3.
beastieboy
User
beasiteboy
beasiteboy
beasiteboy
kingrook
kingrook
slashdot
kingrook
slashdot
slashdot
Speed
DSL
DSL
DSL
T1
T1
28.8
T1
28.8
28.8
enters search criteria
s ong5
4. Napster displays matches
to beastieboy
5.
makes direct
connection to kingrook for
file transfer
beastieboy
“beastieboy”
“kingrook”
“slashdot”
•song1.mp3
•song2.mp3
•song3.mp3
•song5.mp3
•song4.mp3
•song5.mp3
•song6.mp3
•song5.mp3
•song6.mp3
•song7.mp3
Napster: Lessons Learned
• Napster created a network of millions of people,
with thousands of files being transferred at the same
time.
• There were quality issues. While Napster displayed
link speeds to allow users to choose faster
downloads, the fidelity of recordings varied widely.
• Since Napster users were parasites of the recording
companies, there was some central control over
selection of music.
• There was no guarantee of availability for a
particular item of music.
P2P legal controversy
• P2P structure and functionalities make it perfect
for sharing vast ammounts of files
• Unfortunately, people use it fo illegal
downloading
• Recording Industry Association of America
introduces lawsuits and seeks legal changes
– CDs, mp3 players introduce restrictions and
become more expensive
27
Legal Facts from RIAA
• “Music piracy is any form of unauthorized
duplication and/or distribution of music
including downloading, file sharing, and
CD-burning.”
• “Criminal penalties can be as high as five
years in prison or $250,000 in fines.”
• RIAA wants to find violators of copyright
law
Morpheus: Free Anonymizer
• Another file-sharing application
• In 2003 Streamcast Networks (owners)
included a free Anonymizer with Morpheus
• Through proxies, users don’t see each other
• Also includes blacklist of data ‘snooping’
• iMesh (Israel) and Blubster (Spain) among
others now provide the same service
The ‘Animal’ GNU
GNU: Recursive Acronym
GNU’s Not Unix ….
GNU
Gnutella =
+
Nutella
Nutella: a hazelnut chocolate spread
produced by the Italian
confectioner Ferrero ….
Gnutella History
• Gnutella was written by Justin Frankel, the
21-year-old founder of Nullsoft.
• Nullsoft acquired by AOL, June 1999
• Nullsoft (the maker of WinAmp) posted
Gnutella on the Web, March 14, 2000.
• 23k users on Gnutella
• People had already downloaded and shared
the program.
• Gnutella continues today, run by independent
programmers.
Gnutella Protocol
Scenario: Joining Gnutella Network
•
•
•
•
•
•
•
•
•
ping: discover hosts on network
Gnutella Network
pong: reply to ping
query: search for a file query
New
PING
hit: reply to query
push: download request
PING
PONG
The new node connects to a well known
PING
‘Anchor’ node or ‘Bootstrap’ node.
A
Then sends a PING message to discover
other nodes.
PING
PONG messages are sent in reply from
PING
hosts offering new connections with the
new node.
PING
Direct connections are then made to the
newly discovered nodes.
PONG
Gnutella: Issue a Request
xyz.mp3 ?
Gnutella: Flood the Request
Gnutella: Reply with the File
Fully distributed storage and directory!
P2P is using Hasing
Object ID (key):AABBCC
Shark
SHA-1
Object ID (key):DE11AC
SHA-1
194.90.1.5:8080
Hashing Basic Idea
Publish (H(y))
P2P Network
Object “y”
Objects have
hash keys
Join (H(x))
Peer “x”
H(y)
H(x)
y
Hash key
Peer nodes also
x have hash keys
in the same
hash space
Place object to the peer with closest hash keys
Viewed as a Distributed Hash Table
Hash
table
2128-1
0
Peer
node
Internet
How to Find an Object?
Hash
table
Peer
node
0
2128-1
Chord Lookup – with finger table
I’m node 2.
Please find key 14!
15
1
14
Start
Int.
node
2+1
[3,4)
3
2+2
[4,6)
7
2+4
[6,10)
7
2+8
[10,2)
10
2
14 ∈[10,2)
3
12
Start
Int.
node
10+1
[11,12)
12
10+2
[12,14)
12
10
10+4
[14,2)
14
14 ∈[14,2)
10+8
40/46
[2,10)
2
Circular 4-bit
ID space
7
JXTA
• Website : https://jxta.dev.java.net/
• Dimotori oleh Bill Joy dari Sun
Microsystem, didukung oleh komunitas
dari kalangan akademis dan industri
• JXTA dirancang untuk lebih baik
dibanding solusi P2P yang sudah ada
JXTA
• JXTA merupakan kependekan dari
juxtapose, yang artinya
mendekatkan/menghubungkan
• Tujuan utama JXTA sebagai platform P2P
yang :
– Interoperability
– Platform Independence
– Ubiquity (seamless integration between devices)
JXTA
• Interoperability
– Setiap vendor dapat mengeluarkan protokol P2P
sendiri yang tidak sama, namun tetap dapat
terkoneksi
• Platform Independence
– Dapat dijalankan di banyak platform, mendukung
banyak bahasa pemrograman
• Ubiquity
– Tidak hanya PC, mobile device juga bisa
terhubung dalam jaringan P2P JXTA ini
JXTA Terms and Concepts
• Peers : tiap-tiap node dalam JXTA
• Advertisements
– Dokumen XML terstruktur tentang informasi layanan/resource
yang ada pada suatu peer
• Messages
– Data yang dipertukarkan antar peer (XML atau binary)
• Pipes
– Jalur yang digunakan untuk mengirim Message
• Identifiers
– Identitas unik setiap peer (UUID Identifier)
• Rendezvous Nodes :
– node yang dapat menerima dan mengeluarkan koneksi dari
banyak node serta membetuk suatu group
• Relay Nodes
– JXTA routers, untuk akses network dari belakang firewall, NAT
JXTA Architecture
JXTA
Applications
JXTA
Services
JXTA
Core
JXTA Community Applications
JXTA Community
Services
Peer Groups
SUN
JXTA
Applications
JXTA
Shell
SUN
• Indexing
Peer
JXTA
• Searching Commands
Services • File Sharing
Peer Pipes
Peer Monitoring
Security (authentication, authorization and on the wire)
Any Peer on the extended Web
JXTA Virtual Network
Peer
JXTA
Virtual
Network
Peer
Peer
Peer
Peer
Peer
Peer
Peer
Virtual Mapping
Bluetooth
Firewall
Http
Firewall
Physical
Network
TCP/IP
JXTA
Peer: A JXTA node.
JXTA Group: a
Peer
group is a set of
JXTA nodes who
share a common
interest
Peer
Peer
Peer
Peer
Peer
A Rendezvous
Peer: a meeting
place e.g. gateway
for JXTA groups
Peer
Peer
Peer
Peer
Peer
Peer
Peer
Peer
Peer
Peer
JXTA Group
Peer
Peer
Peer
Peer
Peer
Peer
Peer
Peer
• Sekumpulan peer yang
memiliki kesamaan
layanan/resource,
misalnya: file sharing, cpu
sharing, dsb
•Setiap peer tergabung
dalam satu group default
yang bernama World Peer
Group yang terdiri dari
semua JXTA Peers
JXTA
• Protokol pada JXTA • Peers :
– Discover each others
– Self organize into peers group
– Advertise and discover network service
– Communicate with each others
– Monitor each others
JXTA Pipe
Output Pipe
Input Pipe
A JXTA Pipe
Peer
1
Peer
2
Actual Route
Peer
3
Firewall
Peer
4
JXTA Scenario
2
1
3
1.
RV
4
2.
3.
New
Node
4.
.
5.
.
5
7
6
JXTA Protocol Layer
Peer Discovery
Protocol
Via Peer Resolver Protocol
Peer Discovery
Protocol
Peer Information
Protocol
Via Peer Resolver Protocol
Peer Information
Protocol
Pipe Binding
Protocol
Via Peer Resolver Protocol
Pipe Binding
Protocol
Peer Resolver
Protocol
Via Enpoint Routing Protocol
Peer Resolver
Protocol
Rendezvous
Protocol
Via Enpoint Routing Protocol
Rendezvous
Protocol
Peer Endpoint
Protocol
Via installed Network Transports
Peer Endpoint
Protocol
Network Transport
Via Installed Network Transports
Network Transport
Fungsi-fungsi
• Peer discovery protocol: untuk mencari resource yang
diinginkan
• Peer information protocol: untuk menyimpan informasi
mengenai suatu peer (uptime, trafic load, capabilities, state,
dsb)
• Peer binding protocol: memungkinkan suatu peer membuat
sebuah virtual channel (pipe) untuk pertukaran data
• Peer resolver protocol: memungkinkan suatu peer
mengirimkan suatu kriteria pencarian resource
• Redezvous protocol: memungkinkan peer mengirimkan data
ke semua peer (listener) pada layanan tertentu
• Peer end point protocol: untuk mengirimkan data dari suatu
peer ke peer lainnya melalui jalur tertentu
NEXT
• Multimedia dan Ubiquitous Computing