agents transacting in open environments two phases: locating appropriate agents through different...

51
A gentN am eServiceand D iscovery K atiaSycara The E-Com m erce Institute katia@ cs.cmu.edu www.cs.cm u.edu/~softagents Teaching assistant:JoeG iam papa garof@ cs.cmu.edu

Upload: basil-harper

Post on 19-Jan-2016

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Agent Name Service andDiscoveryKatia Sycara

The E-Commerce Institute

[email protected]

www.cs.cmu.edu/~softagents

Teaching assistant: Joe Giampapa

[email protected]

Page 2: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Agents Transacting in Open Environments

Two phases:• Locating appropriate agents through

different kinds of discovery infrastructure– Agent Name Services (System level)

– Middle Agents (Knowledge level)

• Performing the transaction– with or without middleware infrastructure

Page 3: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Agent Name Service v.2 (ANS)

The ANS is a name registration and lookup service to facilitate communication among agent applications.

Agent 1 Agent 2

Page 4: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

DNS• Most hosts that have an IP address know of (are preconfigured

or learned via DHCP) of at least one DNS server

• Entries hardcoded and infrequently changed

• New specs (DNS update/DDNS) allow for dynamic updates of entries

• Hierarchical and distributed

• Primary and secondary masters for redundancy

• Local caching for “learned” entries to speed up future resolution requests

• New SRV Resource Records to indicate service type, address, port, and load balencing information

Page 5: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

ANS Features & Benefits

• Acts as a “white-pages” service similar to the Domain Name Service (DNS)

• Provides extended features that do not exist in DNS• Integrates new features that have not yet been

standardized, or made widely available with DNS (service type and port numbers, service discovery)

• Provides platform for testing agent interactions without requiring immediate implementation and integration of new technologies into centrally administered network infrastructure

Page 6: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

ANS acts as an extension to DNS

Agent

ANS Infrastructure

DNS Infrastructure

Name lookup

Partial resolution but with extra info:Location = protocol://hostname:port-number

hostname lookup

IP Address

Page 7: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Agent Communications

Agent 1

I want totalk on thenetwork to

other agents

Agent 1

Now, I need to findother agents,and let them

find me

Agent 1

Page 8: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Recent Enhancements• Automatic fail-over from one ANS server to another• Ability to dynamically “discover” ANS servers (in

both clients and servers)• Ability for Client to perform operations on all

known ANS servers • Ability for Server to automatically “push” register

and unregister requests• Ability for Server to propagate lookup requests to

other ANS Server systems• Multiple avenues for Server to gain knowledge of

Agent registration entry

Page 9: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

ANS Client Initializationinitialize internal list of ANS servers

Agent 1

ANSServer

“banana”File withlist of servers

•apple•lemon

•apple•lemon

ANSServer“pear”

ANSServer“apple”

1

Page 10: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Dynamic “discovery” of ANS servers

• Available in both clients and servers• Search for existing servers on system startup• Discover new servers as they come online• Remove servers that cleanly shut down and leave the

network• Remove servers that are unreachable (avoid future delays)• Search for previously undiscovered servers when server-list

falls below safe threshold• Limit repeated discovery requests to avoid multicast storms• Allow discovery to be disabled for single server sites, or in

installations where Multicast traffic is prohibited• Core discovery module based on Universal Plug-N-Play

(UPnP) Simple Service Discovery Protocol (SSDP)

Page 11: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

ANS Client Initializationsearch via SSDP discovery process

Agent 1

ANSServer

“banana”•apple•lemon

ANSServer“pear”

ANSServer“apple”

2

Page 12: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

ANS Client Initializationactive servers reply that they are available

Agent 1

ANSServer

“banana”

•apple•lemon•pear

ANSServer“pear”

ANSServer“apple”

3

I’m here

I’m here

Page 13: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

ANS Client Operationnew servers announce that they are alive

Agent 1

ANSServer

“banana”

•apple•lemon•pear

•banana

ANSServer“pear”

ANSServer“apple”

4

HeyEveryone

I just cameonline

Page 14: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

ANS Client Operationentries are “pruned” if they are unreachable

Agent 1

ANSServer

“banana”

•apple•lemonlemon•pear

•banana

ANSServer“pear”

ANSServer“apple”

5 To:apple

?To:lemon

To:pear

To:banana

Page 15: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

ANS Client Operationclient can interact with one or all servers

Agent 1

ANSServer

“banana”

•apple•lemonlemon•pear

•banana

ANSServer“pear”

ANSServer“apple”

5 To:apple

?To:lemon

To:pear

To:banana

Page 16: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

ANS Client/Server OperationAgent Registration with Server “Push”

Agent 1

ANSServer

“banana”

•apple•lemonlemon•pear

•banana

ANSServer“pear”

ANSServer“apple”

To:apple

Pushto

pear

Push tobanana

Page 17: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Server propagation of lookup requests

• Lookup in local cache, then possibly in SQL database• Lookup with partner ANS servers in same discovery

group• Lookup sent to a user defined set of non-discoverable

servers that can be used to implement an cross-organizational hierarchy of ANS systems

• Discovery group partners look in local cache only• Hierarchy ANS servers look locally, then to their

partners, then to their hierarchy systems• Search path is propagated with lookup request to assist in

loop avoidance and handling request Time-To-Live limits• Successful non-local searches result in interim ANS

servers “learning” and registering agent entry in their local cache

Page 18: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

ANS Client/Server OperationAgent Lookup with Server Forwarding

Agent 1 Lookup “Susan”

ANSServer“apple”

To:apple

1

Lookup in Local Cache

2 CheckwithGroupPartners

3

CheckHierarchyServers

Page 19: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Branching Nature of Extended ANS Lookup

AgentPrimary ANS

Primary’sdiscoveredpartners

Discoveredpartners ofother serversin hierarchy

•Discovery Group-Partners provide scaling and fault tolerance•Hierarchy Partners allow linking different organizational groups

Page 20: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Linked ANS Organizations

YouAreHere

CMUAgentsGroup

Software Eng Robotics

ComputerServices

EnglishArt

Nokia

Microsoft

Page 21: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Linked ANS Organizations

YouAreHere

Software Eng Robotics

ComputerServices

EnglishArt

Nokia

Microsoft

Lookup“Bubba”

Notfound

Page 22: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Linked ANS Organizations

YouAreHere

CMUAgentsGroup

Software Eng Robotics

ComputerServices

EnglishArt

Nokia

Microsoft

NotfoundNotfound

Notfound

Page 23: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Linked ANS Organizations

YouAreHere

CMUAgentsGroup

Software Eng Robotics

ComputerServices

EnglishArt

Nokia

Microsoft

Notfound

Page 24: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Linked ANS Organizations

YouAreHere

CMUAgentsGroup

Software Eng Robotics

ComputerServices

EnglishArt

Nokia

Microsoft

Notfound

Notfound

Notfound

Page 25: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Linked ANS Organizations

YouAreHere

CMUAgentsGroup

Software Eng Robotics

ComputerServices

EnglishArt

Nokia

Microsoft

Notfound

Page 26: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Linked ANS Organizations

YouAreHere

CMUAgentsGroup

Software Eng Robotics

ComputerServices

EnglishArt

Nokia

Microsoft

Notfound

Notfound

Page 27: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Linked ANS Organizations

YouAreHere

CMUAgentsGroup

Software Eng Robotics

ComputerServices

EnglishArt

Nokia

Microsoft

Notfound

Page 28: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Linked ANS Organizations

YouAreHere

CMUAgentsGroup

Software Eng Robotics

ComputerServices

EnglishArt

Nokia

Microsoft

Notfound

Notfound

Notfound

Page 29: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Linked ANS Organizations

YouAreHere

CMUAgentsGroup

Software Eng Robotics

ComputerServices

EnglishArt

Nokia

Microsoft

Notfound

Page 30: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Linked ANS Organizations

YouAreHere

CMUAgentsGroup

Software Eng Robotics

ComputerServices

EnglishArt

Nokia

Microsoft

1

2 3

4

5

A Time-To-Live (TTL) of 5 (default) has been reached!Lookup will occur to local cache of “English” ANS server, but will not be forwarded to any of the English discovery

group partners, or its hierarchy systems (Art). Going back through the progression, 5 to 4 to 3…

the next hierarchy server branch found will be checked.

Page 31: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Linked ANS Organizations

YouAreHere

CMUAgentsGroup

Software Eng Robotics

ComputerServices

EnglishArt

Nokia

Microsoft

Notfound

Page 32: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Linked ANS Organizations

YouAreHere

CMUAgentsGroup

Software Eng Robotics

ComputerServices

EnglishArt

Nokia

MicrosoftNotfound

Notfound

Page 33: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Linked ANS Organizations

YouAreHere

CMUAgentsGroup

Software Eng Robotics

ComputerServices

EnglishArt

Nokia

MicrosoftNotfound

Page 34: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Linked ANS Organizations

YouAreHere

CMUAgentsGroup

Software Eng Robotics

ComputerServices

EnglishArt

Nokia

Microsoft

BubbaFound!

Page 35: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Linked ANS Organizations

CMUAgentsGroup

Nokia

Microsoft

Bubba “Learned”(registered)

Bubba “Learned”(registered)

Bubba “Learned”(registered)

Answer to BubbaLookup “Learned”

Bubba Found

Page 36: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

JINI

• Clients Agents (CA) and Service Agents/providers (SA) use Directory Agents (DA) to locate needed resources

• Discovery mechanism used for CAs and SAs to find DAs

• preferred DA(s) may be pre-populated instead of using discovery

• UA, SA, DA in JINI must have a DA (SLP and mDNS allow UA to discover SA without DA)

• Lookup of service type and attributes has lookup service performing “matchmaker”-type functions

• Lookup services periodically re-announce themselves on the network to allow services to register them selves with the new or recovered lookup service

• Non-responding lookup services are not automatically pruned from registering service’s list

Page 37: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

ANS summary

• Provides name resolution of agent’s friendly advertised name to a location (host & port)

• Augments DNS service• May be replaced by newer DNS services• Like JINI, SLP, and SSDP, ANS implements

discovery search for ANS servers (as DA’s) and uses unicast for the back channel

• Uses TCP sockets for client lookup queries• Uses TCP sockets for agent registration

Page 38: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Providers and Requesters

• Agents can be categorized as either providers of services or requesters

• These roles are not exclusive

• Providers and requesters want to find each other based on functionality/capability

• This is done through advertisement and request via middle agents

Page 39: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Issues with Locating Agents (1)

• Evaluation criteria– performance

– robustness

– scalability

– load balancing

– privacy

• Where the matching is done– At the requester (preserving the privacy of requesters)

– middle agents

– service providers

Page 40: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Transaction Phase

• Providers and requesters interact with each other directly– a negotiation phase to find out service parameters and preferences

(if not taken into account in the locating phase)

– delegation of service

• Providers and requesters interact through middle agents– middle agent finds provider and delegates

– hybrid protocols

• Reasons for interacting through middle agents– privacy issues (anonymization of requesters and providers)

– trust issues (enforcement of honesty; not necessarily keep anonymity of principals); e.g. NetBill

Page 41: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Protocols

• Who to talk to: principals involved

• Message content:– ex: a LARKS specification

• Local processing:– ex: implied by KQML performatives (service-

request, request-for-service-providers)

Page 42: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Matching Engine for Service Providers & Requesters

matching capabilities with requests

capability parametersservice request

(LARKS) matching capabilities with requests

capability parametersservice request+ parameters

(LARKS)

unsorted list of agent contact info

decision algorithm

sorted list of agent contact info

Page 43: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Broadcaster

BroadcasterRequester

Provider 1 Provider n

Request for service

Broadcast service request

Delegation of serviceResults of

service request

Offer of service

Page 44: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Yellow Page

Yellow PageRequester

Provider 1 Provider n

Request for service

Unsorted list of contact info of (P1,P2, …, Pk)

Advertisementof capabilities

Delegation of service

Results of service request

Page 45: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Matchmaking

MatchmakerRequester

Provider 1 Provider n

Request for service

Unsorted full description of (P1,P2, …, Pk) Advertisement

of capabilities+para.

Delegation of service

Results of service request

Page 46: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Classified Ads

Classified AdsRequester 1

Provider 1

Request for service+pref.

(R1,R2, …, Rk)contact info.

Advertisementof capabilities

Offer of service

Service results

Requester nRequest fo

r service+pref.

Delegation of serviceProviderselects

requester

Page 47: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Recommender

RecommenderRequester

Provider 1 Provider n

Request for service+pref.

Sorted full description of (P1,P2, …, Pk) Advertisement

of capabilities+para.Delegation

of serviceResults of

service request

Page 48: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

FacilitatorCombines Agent Location and Transaction Phases

FacilitatorRequester

Provider 1 Provider n

Request for service+pref.

Advertisementof capabilities

+ para.

Results of service

Serviceresult

Delegationof service

Page 49: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

The Contract Net Protocol• An agent coordination and distributed task allocation

mechanism, where:– multiple heterogeneous agents can perform tasks– agents can play two roles: managers, contractees– managers receive tasks, select prospective contractees and

ask for bids– best bid wins task, performs it, manager monitors

• Pros and cons:– simple to implement, base for many other protocols– fully distributed– performance quality not checked– easy to manipulate (free riders), may cause loops

Page 50: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Contract Net

ManagerRequester

Provider 2 Provider n

Request for service+ preferences

Broadcast service request + pref

Delegationof service

Results of service

Offer of service

Provider 1

BroadcastBroadcast

Offer of service

Results ofService

Page 51: Agents Transacting in Open Environments Two phases: Locating appropriate agents through different kinds of discovery infrastructure –Agent Name Services

Conclusions

• Flexible services for locating agents are crucial for agile e-commerce

• Emerging competing standards

• No thought or standards at the knowledge level yet