650 likes | 660 Views
This article explores the role of agents in peer-to-peer (P2P) systems, which are distributed networks where all nodes have equal responsibilities. Agents can enhance resource sharing and improve connectivity by automating the process of finding appropriate services or people. The article discusses different approaches to location resolution in P2P systems, such as centralized indexing, broadcasting information, and distributed hashing. It also introduces agent-based referral networks as a way to automate the process of directing requests towards the right services or individuals.
E N D
What can agents do for P2P systems Bin Yu Department of Computer Science North Carolina State University
What is P2P • Definition • A distributed system in which all nodes have identical responsibilities, and all communication is symmetric. • An application-level Internet on top of the Internet • Resource sharing on a massive scale • Files, cycles, equipment, people... • Conferences • O’Reilly P2P conference 2001(conferences.oreilly.com/p2p/) • First International Workshop on Peer-to-Peer Systems (IPTPS '02) (http://www.cs.rice.edu/Conferences/IPTPS02/)
Historical Perspective • P2P is nothing new – ARPANET • Internet was fundamentally designed to be a P2P system • any 2 computers could send packets to each other • no firewalls / no network address translation • no asymmetric connections (V.90, ADSL, cable, etc.) • The popularity of www, telnet, ftp... changed the paradigm to client/server • Server • Service Provider • Powerful machine to server a large number of clients • Client • Service Consumer • client, machine with limited capacity, is used to request services
P2P: today • Many emerging applications: • Napster, Gnutella, Freenet… • P2P Properties: • no central coordination • no peer has a global view of the system • global behavior emerges from local interactions • all existing data and services are accessible from any peer • peers are autonomous • peers and connections are unreliable
P2P File-sharing • Napster • Decentralized storage of actual content • transfer content directly from one peer (client) to another • Centralized index and search • Gnutella • Not like Napster, with decentralized indexing • Search via flooding • Direct download
Napster 128.1.2.3 (xyz.mp3, 128.1.2.3) Central Napster server
Napster 128.1.2.3 xyz.mp3 ? 128.1.2.3 Central Napster server
Napster 128.1.2.3 xyz.mp3 ? Central Napster server
Gnutella xyz.mp3 ?
Gnutella xyz.mp3
Challenge • “Location Resolution” • Given an object (might be name, attribute, or even content) • Return a channel to a node (peer) that has that object • Approaches: • Centralized Index (Napster) • Broadcast information to be resolved (Gnutella) • Distributed Hashing (Chord, CAN)
Distributed Hashing • 1. Map both objects and nodes into some topology (“id space”) Objects Nodes
Distributed Hashing • 1. Map both objects and nodes into some topology (“id space”) • 2. Each node “owns” some neighborhood in the topology, has channel to some neighbors Objects Nodes
Distributed Hashing • 1. Map both objects and nodes into some topology (“id space”) • 2. Each node “owns” some neighborhood in the topology, has channel to some neighbors • 3. Topological structure lets query be routed to the “owner” of a given point Objects Nodes
Chord - Basic Idea • Topology is a ring of ordered, fixed-size IDs (say 32 bits) • Node ID based on IP address, object ID based on name, content, ... 0
Chord - Basic Idea • Nodes “own” the part of the ID space between their ID and their predecessor’s ID. 0
Chord - Basic Idea • Each node has a channel to its successors at distances 1, 2, 4, 8, 16, ..., 2^(m-1) • where m = log_2 of the ring size (32 in this case) 0
Chord: Resolution • Get ID of desired object • Find the last node whose ID is LESS than the desired ID • Look in finger table to find farthest-away neighbor whose ID is LESS than the desired ID • Ask it for somebody closer • That node’s successor is the “owner” of the object
CAN: Basic Idea • Topology is an N-dimensional torus • N=2 for simple examples • Each node is responsible for a subrange in each dimension • Space is partitioned among all nodes • Route via neighbors -- move in direction of destination
CAN: simple example 3 1 2
CAN: simple example 3 1 4 2
CAN: simple example (K,V) (a,b) retrieve (K) insert (K,V) hash(K) = (a,b)
CAN: routing (a,b) (x,y)
Quick Review • Two similar approaches to locating objects by “computed routing” • Similar to Manhattan Street Networks • Mainly for distributed storage systems. • All these P2P networks ignore underlying topology! • Each node has relatively simple function • Network is not reconfigurable, and there is no learning happened • Brute-force searching, and broadcast the request to all the peers • Some networks, i.e., social networks, can not be partitioned by IP.
Agent-based P2P networks • Software agents • Computer programs which can perform a set of tasks autonomously. How to find an appropriate service or person • Through referrals • Approach:automate the process using software agents through referrals. • Agent-based referral networks • Software agents cooperate to direct requests toward appropriate service or person.
Agent-based Referral Networks • Referral systems • MINDS 1987 • ReferralWeb 1996,1997 • A computational model of agent-based referral networks • Each node is represented a software agent • Learn models of each other in term of • Expertise (ability to produce correct domain answers) • Sociability (ability to produce accurate referrals) • Cooperativeness (willingness to produce answers or referrals) • . 32
Why is the idea feasible? • Relative short distance between any two nodes • Small-world phenomenon – six (5.5) for human social networks of USA (Stanley Milgram, 1960s) The relative small value indicates • Intelligent software agents can follow only the relevant links and find the desired experts.
Paths to the Expert(s) A Mark B Jenny C User modeling
Paths to the Expert(s) A Mark B Jenny C User modeling
Paths to the Expert(s) A Mark D B Jenny C User modeling E Uncooperative agents
Paths to the Expert(s) A Mark D B Jenny C User modeling E Uncooperative agents
Paths to the Expert(s) A Mark D E B Jenny C User modeling Uncooperative agents Note that: all of the queries were sent out from Jenny. A referral graph encodes how the computation spreads from Jenny and referrals or answers are sent back to Jenny.
Referral Graph Ar A1 A2
Referral Graph Ar A1 A2 A3
Referral Graph Ar A1 A2 A3 A4
Referral Graph Ar A1 A2 A3 A6 A4 Ar Root of the graph A5 Node has been visited A1 Node has not been visited A5 Redundant referral
Referral Graph Ar A1 A2 A3 A6 A4 A5 Question: node A5 and A6, which should be visited first?
Weighted Referral Graph 1.0 Ar 0.5 0.6 A1 A2 0.5 0.6 1.0 0.5 A3 A6 0.3 0.8 1.0 1.0 A4 0.3 1.0 A5 0.3
Credits/Penalties Propagation 1.0 Ar 0.5 0.6 A1 A2 0.5 0.6 1.0 0.5 A3 A6 0.3 0.8 Answer 1.0 1.0 A4 0.3 1.0 A5 0.3 Suppose A6 returns an answer, then Ar will update the expertise for A6 and sociability for A1, A2, A3, A4.
Research Challenges Improving the accuracy of “referrals” • User modeling and multiagent learning Avoiding interaction with undesirable participants • How to judge the trustworthiness of one agents Studying key properties of referral networks • Evolution of referral networks • Transition to small-world networks through interactions. • Protocols that foster the small-world phenomenon. 47
Vector Space Model • Let D = {d1, d2, …, dn} denotes a collection of documents. {t1, t2, … tp} be the dictionary (a set of all the words) • Each document d is represented as a p-dimensional vector d = dt1, dt2, … dtp • where tfi is the number of times word ti appears in document d (the term frequency), • dfi is the number of documents in the collection which contain ti (the document frequency), • n is the number of documents in the collection, • Tfmax is the maximum term frequency over all words in D.
Ontology • Understand the information context • Ontology is a set of definitions of formal vocabulary • Class hierarchy of AI domain. • We manually construct an ontology for AI domain • Totally 19 domains • AI architecture • Agents and multiagent systems • … • Planning and search • Vision and robotics
Agent Contact Info Expertise Profile Contact Info Expertise Sociability Cooperativeness NeighborModels NeighborModel Cache User Modeling Expertise as a term vector { EPi, LC1, LC2, … LCp} • Each agent learns models of others based on experience: • When a good service is obtained, the expertise of the provider is revised upwards as is the sociability of those who gave referrals to it. • When a poor service is obtained, the revisions are downward.