sistem terdistribusi 11 [compatibility mode]

Post on 20-Jan-2017

232 Views

Category:

Documents

5 Downloads

Preview:

Click to see full reader

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 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.

• Server-based architecture– Client-Server / Server-Cluster– Problems:

• Limited resources• All loads are centered on the server

– Server-based architecture has low scalability .

The architectures

– 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 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– 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 non -dedicated serverdedicated 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.�Tidak ada router yang menjadi pusat jaringan.� Bisa terdiri dari > 2 komputer

Hybrid P2P

- Mempunyai server pusat yang memantau danmenjaga informasi yang berada di setiap peersekaligus merespon peer ketika ada yangmeminta informasi tertentu.

- Setiap peer bertanggung jawab untukmenyediakan resource yang tersedia.- Karena server pusat tidak memiliki resource

tersebut, hal ini juga dilakukan agar server pusattersebut dapat mengetahui resource apa saja yangakan 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 – 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 • 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– 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 • 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 setiapkomputer dimungkinkan untuk terlibat dalamkomunikasi yang ada.��Di jaringan client-server, komunikasi adalah antara

server dengan workstation.

� Unjuk kerja lebih rendah dibandingkandengan jaringan client-server, karena setiapkomputer/peer disamping harus mengelolapemakaian fasilitas jaringan juga harusmengelola pekerjaan atau aplikasi sendiri.

Kelemahan Peer to Peer (P2P)

�Sistem keamanan jaringan ditentukanoleh masing -masing user denganmengatur keamanan masing-masingmengatur keamanan masing-masingfasilitas yang dimiliki.

�Karena data jaringan tersebar di masing-masing komputer dalam jaringan, makabackup harus dilakukan oleh masing -masing komputer tersebut.

Kelemahan P2P

• Decentralized coordination– How to keep global state consistent?– Need for distributed coherency protocols .

• All nodes are not created equal .• 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)• 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 Ring

Hieralchical Decentralized

Hybrid

EXAMPLEP2P Centralized � NapsterP2P Decentralized � KaZaAP2P 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 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

Napster server

Index1. File locationrequest

peers

Napster server

Index

2. List of peers

request

offering the file

3. File request

4. File delivered5. Index update

Napster Sharing Style

1. Users launch Napster and connect to Napster server

3. beastieboy enters search criteria

2. Napster creates dynamic directory from users’ personal .mp3 libraries

Title User Speed song1.mp3 beasiteboy DSLsong2.mp3 beasiteboy DSLsong3.mp3 beasiteboy DSLsong4.mp3 kingrook T1song5.mp3 kingrook T1song5.mp3 slashdot 28.8song6.mp3 kingrook T1song6.mp3 slashdot 28.8song7.mp3 slashdot 28.8

“slashdot”•song5.mp3•song6.mp3•song7.mp3

“kingrook”•song4.mp3•song5.mp3•song6.mp3

•song5.mp3

3. beastieboy enters search criteria

4. Napster displays matches to beastieboy

5. beastieboy makes direct connection to kingrook for file transfer

s o n g 5

“beastieboy”•song1.mp3•song2.mp3•song3.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 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 perfectfor sharing vast ammounts of files

• Unfortunately, people use it fo illegal downloading

• Recording Industry Association of America • 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.”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• 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

Gnutella =

GNU: Recursive AcronymGNU’s Not Unix ….

+GNU

Gnutella = +

Nutella: a hazelnut chocolate spread produced by the Italian confectioner Ferrero ….

Nutella

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.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 ProtocolScenario: Joining Gnutella Network

Gnutella Network• ping : discover hosts on network • pong : reply to ping • query : search for a file query • hit : reply to query • push : download request

NewPING

A

• push : download request• The new node connects to a well known

‘Anchor’ node or ‘Bootstrap’ node.• Then sends a PING message to discover

other nodes.• PONG messages are sent in reply from

hosts offering new connections with the new node.

• Direct connections are then made to the newly discovered nodes.

PINGPING

PINGPING

PINGPING

PINGPING

PING

PONG

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

Shark SHA-1

Object ID (key):AABBCC

Shark SHA-1

Object ID (key):DE11AC

SHA-1194.90.1.5:8080

Hashing Basic Idea

P2P NetworkJoin (H(x))

Publish (H(y))

Hash key

Object “y”

Objects have hash keys

Peer “x”

Peer nodes also have hash keys in the same hash space

y x

H(y) H(x)

Place object to the peer with closest hash keys

Viewed as a Distributed Hash Table

Hashtable

0 2128-1

Peernodenode

Internet

How to Find an Object?

Hashtable

0 2128-1

PeerPeernode

Chord Lookup – with finger tableStart Int. node

2+1 [3,4) 3

2+2 [4,6) 7

2+4 [6,10) 7

2+8 [10,2) 1014 2

15 1

3

I’m node 2.Please find key 14!

14 ∈∈∈∈[10,2)

40/46

12

10

3

7

Start Int. node

10+1 [11,12) 12

10+2 [12,14) 12

10+4 [14,2) 14

10+8 [2,10) 2

14 ∈∈∈∈[14,2)

Circular 4-bitID space

JXTA

• Website : https://jxta.dev.java.net/

• Dimotori oleh Bill Joy dari Sun Microsystem, didukung oleh komunitas Microsystem, didukung oleh komunitas dari kalangan akademis dan industri

• JXTA dirancang untuk lebih baik dibanding solusi P2P yang sudah ada

JXTA

• JXTA merupakan kependekan darijuxtapose , yang artinyamendekatkan /menghubungkan

• Tujuan utama JXTA � sebagai platform P2P • 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• 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)– 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 Community ApplicationsJXTAApplications

JXTA Community Services

JXTASUNJXTA

• Indexing• Searching

JXTAShell

PeerCommands

SUNJXTA

Applications

ServicesServicesJXTAServices

• Searching• File Sharing

Peer GroupsJXTACore

Any Peer on the extended Web

Peer Pipes Peer Monitoring

Security (authentication, authorization and on the wire)

Commands

JXTA Virtual Network

Peer

Peer

PeerPeer

Peer PeerPeer

Peer

JXTA Virtual

Network

Bluetooth TCP/IP

Fire

wal

l

Firewall

Physical Network

Http

Virtual Mapping

JXTA

Peer Peer

Peer

Peer

Peer: A JXTA node.

JXTA Group: a group is a set of JXTA nodes who share a common interest

Peer

Peer

Peer

Peer

A Rendezvous Peer Peer A Rendezvous Peer: a meeting place e.g. gateway for JXTA groups

Peer

Peer

Peer

Peer Peer

Peer

Peer

Peer

JXTA Group

Peer

Peer

Peer

Peer

• Sekumpulan peer yang memiliki kesamaanlayanan/resource , misalnya: file sharing, cpu sharing, dsb

Peer

Peer

Peer

Peer

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– Self organize into peers group– Advertise and discover network service– Communicate with each others– Monitor each others

JXTA Pipe

Peer1

Peer2

A JXTA Pipe

Actual Route

Output Pipe Input Pipe

Peer3

Peer4

Firewall

JXTA Scenario

RV

13

2

1. RV

4

7

6

5

NewNode

2.

1.

3.

4..

5..

JXTA Protocol LayerPeer Discovery

Protocol

Peer InformationProtocol

Pipe Binding Protocol

Peer DiscoveryProtocol

Peer InformationProtocol

Pipe Binding Protocol

Via Peer Resolver Protocol

Via Peer Resolver Protocol

Via Peer Resolver Protocol

Peer Resolver Protocol

Rendezvous Protocol

Peer EndpointProtocol

Network Transport

Peer Resolver Protocol

Rendezvous Protocol

Peer EndpointProtocol

Network Transport

Via Enpoint Routing Protocol

Via Enpoint Routing Protocol

Via installed Network Transports

Via Installed Network Transports

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 datasebuah 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

top related