2. Acknowledgements
Some of the slides in this presentation are taken or adapted from:
Sebastien Baehni. “Introduction to P2P and the JXTA framework”
http://www.ece.rutgers.edu/~parashar/Classes/03-04/ece451-566/slides/p2p.pdf
Frans Kaashoek et al. “Peer-to-Peer computing research: a fad?”
http://project-iris.net/talks/dht-toronto-03.ppt
Vinod Muthusamy. “An Introduction to Peer-to-Peer Networks”
http://www.eecg.toronto.edu/~jacobsen/mie456/slides/p2p-mie.pdf
3. Network Architectures
Client/Server Pure Peer-to-Peer
• Clients send requests to/via a
central server
• Small #messages
• Single point of failure
• Problem: Extreme scalability
• No central server
• Clients connected to
one or more peers
• Resilient
• Large #messages
4. Hybrid Peer-to-Peer Networks
• Some nodes act as group managers/routers
• More robust than client/server
• Potentially lower #messages than pure P2P
5. Characteristics of a P2P Network
• Nodes can act as clients and servers
• No centralised server/authority
– In Pure P2P Networks
• Network is highly dynamic
– Nodes join and leave regularly
• Large-scale
– Potentially millions of nodes
• Nodes are autonomous
– But co-operate to share/retrieve resources
6. Benefits of P2P Networks
• Efficient use of resources
• Scalability
• Reliability
• Ease of administration
but
• Increased message costs
• More complicated than client/server interaction
7. The Agent Relationship
• How does this relate to agents?
– P2P network platform for mobile agents
– Access agents over P2P network
– Agents administer P2P network
• P2P Networks are useless if agents, users and
applications cannot find resources they require
– Queries can be represented as agents
8. Research Question
How can we efficiently and accurately discover resources and
services in a P2P network?
Solution 1: Introduce some centralisation
Solution 2: Introduce some structure
“centralisation” and “structure” define two dimensions for classifying P2P networks
9. Napster
• Lists of files are uploaded
to Napster server
• Queries contain various
keywords of required file
• Server returns IP address
of user machines having
the file
• Client chooses user
machine and sets up
connection to it
• File transfer is direct
10. Napster
Centralised model
Napster server ensures correct results
Only used for finding the location of the files
Scalability bottleneck
Single point of failure
Denial of Service attacks possible
Lawsuits
11. Gnutella
• Decentralised search – no
central server
• Queries are sent to the
neighbour nodes
• Neighbours ask their own
neighbours, etc.
• Time To Live (TTL) field to
prevent loops
• File transfer is direct
12. Gnutella
Decentralised model
No single point of failure
Less susceptible to denial of service
SCALABILITY (flooding)
Cannot ensure correct results: “query
horizon”
13. KaZaA
• Hybrid of Napster and Gnutella
• Super-peers act as local search hubs
– Each super-peer is like a constrained Napster server
– Automatically chosen based on capacity and availability
• Lists of files are uploaded to a super-peer
• Super-peers periodically exchange file lists
• Queries are sent to super-peers
14. Freenet
• Ensures anonymity
• Decentralised search
• Queries are sent to the
neighbour nodes
• Neighbours ask their
own neighbours, etc.
• The query process is
sequential
• Learning ability
• Files propagate back
along query route
15. • Second generation P2P (overlay) networks
• Self-organizing
• Load balanced
• Fault-tolerant
• Guarantees on numbers of hops to answer a query
• Based on a distributed hash table interface
Structured P2P
16. • Distributed version of a hash table data structure
• Stores (key, value) pairs
• Goal: Efficiently insert/lookup/delete (key, value) pairs
• Each peer stores a subset of (key, value) pairs in the system
• Core operation: Find node responsible for a key
• Map key to node
• Efficiently route insert/lookup/delete request to this node
Distributed Hash Tables (DHT)
17. • Node id: m-bit identifier (similar to an IP address)
• Key: sequence of bytes
• Value: sequence of bytes
put(key, value)
Store (key,value) at the node responsible for the key
value = get(key)
Retrieve value associated with key (from the appropriate node)
DHT Generic Interface
18. • File sharing
• Databases
• Service discovery
• Chat service
• Publish/subscribe networks
DHT Applications
19. • Keys mapped evenly to all nodes in the network
• Each node maintains information about only a few
other nodes
• Efficient routing of messages to nodes
• Node insertion/deletion only affects a few nodes
DHT Desirable Properties
20. Node id: m-bit identifier (similar to an IP address)
Key: m-bit identifier (hash of a sequence of bytes)
Value: sequence of bytes
API
• insert(key, value)
• lookup(key)
• update(key, newval)
• join(n)
• leave()
Chord API
21. Chord Operation
• Nodes form a circle
based on node
identifiers
• Each node is
responsible in storing a
portion of the keys
• Hash function ensures
even distribution of
keys and nodes in the
circle
23. Chord Operation
• Lookup the furthest
node that precedes the
key
• Query reaches target
node in O(logN) hops
24. Chord Properties
In a system with N nodes and K keys:
Each node manages at most K/N keys
Bounded routing information stored in every
node
Lookups resolved with O(logN) hops
Poor network locality
26. Issues in P2P/Agents
• P2P applications cannot (usually)
communicate with each other
• Agent collaboration over P2P networks
• Enhancements to existing P2P protocols using
agents
• Enhance agent co-ordination schemes using
P2P co-ordination mechanisms
• Self organisation of P2P networks
27. Summary
• P2P can be used for sharing resources
• Removes need for central management
• Large scale, dynamic networks
• Efficient information organisation and retrieval
• P2P can enhance agent systems
• Agents can enhance P2P
• Focus gradually moves towards the coordinated
use of versatile, distributed computing resources
Notas do Editor
Notice many of the characteristics are similar to agents
Agents can communicate over P2P - autonomous agents more suited to autonomous environments than client/server.
The key is like a filename
The value can be file contents