chapter 18: communication

26
Chapter 18: Communication Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2005

Upload: felix

Post on 25-Feb-2016

26 views

Category:

Documents


0 download

DESCRIPTION

Chapter 18: Communication. Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2005. Highlights of this Chapter. Agent Communication Languages Communicative Act Theory Semantics Interaction Patterns Contract Net Protocol - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Chapter 18: Communication

Chapter 18:Communication

Service-Oriented Computing: Semantics, Processes, Agents– Munindar P. Singh and Michael N. Huhns, Wiley, 2005

Page 2: Chapter 18: Communication

Chapter 18 2Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

Highlights of this Chapter Agent Communication Languages

Communicative Act Theory Semantics Interaction Patterns

Contract Net Protocol Business Protocols

Page 3: Chapter 18: Communication

Chapter 18 3Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

Interaction and Communication

Interactions occur whenever agents share an environment

Resource contention, e.g., bumping into each other Communications are interactions understood

to preserve the participants’ autonomy Realized by physical actions (e.g., shared memory or

messaging middleware) that may not preserve autonomy

Meaning based on shared conventions Offer loose coupling: essential for services

A message is a unit of communication A protocol structures communications

What kind of structure is appropriate?

Page 4: Chapter 18: Communication

Chapter 18 4Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

Syntax, Semantics, Pragmatics

Syntax: structure of a (communication) language

Semantics: meaning based solely on the terms used

Requires a structured vocabulary and a shared framework of knowledge, e.g., an ontology

Pragmatics: meaning based on the context (“here”)

Knowing whom to communicate with and how to find them

Knowing how to initiate and maintain an exchange Knowing the effect of the communication on the

recipient

Page 5: Chapter 18: Communication

Chapter 18 5Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

A Classification of Message Classifications

Structure-based (syntactic) Distinguish messages based on grammatical forms in

natural language Meaning-based (semantic)

Distinguish messages based on a notion of intrinsic meaning

E.g., prohibitive is different from directive, despite syntactic similarity

Use-based (pragmatic) Distinguish messages based on their functions in

specific classes of protocols E.g., assertion is different from acknowledgment

Page 6: Chapter 18: Communication

Chapter 18 6Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

Communicative Act Theory

Also called speech act theory (though not specific to speech)

Developed for human language Views communication as action Contrasts with traditional logic, which is about true

or false assertions Considers three aspects of a message:

Locution, or how it is phrased, e.g., “It is hot here” or “Turn on the air conditioner”: strings or XML documents

Illocution, or how it is meant by the sender or understood by the receiver, e.g., a request to turn on the air conditioner or an assertion about the temperature: message type plus proposition

Perlocution, or how it influences the recipient, e.g., turns on the air conditioner, opens the window, ignores the speaker

Illocution is the core aspect

Page 7: Chapter 18: Communication

Chapter 18 7Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

Applying the Theory Classifications of illocutions motivate message

types, but are typically designed for natural language

Rely on NL syntax, e.g., conflate directives and prohibitives

Address subtleties in natural language understanding: infer agents’ beliefs and intentions to determine which illocution

For networked services and multiagent systems, determining the

Message type is trivial, because it is explicitly encoded

Agents’ beliefs and intentions is impossible, because the internal details of the agents are not known

Page 8: Chapter 18: Communication

Chapter 18 8Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

ACL SemanticsWhat does a inform, promise, request, query

mean? Mentalist: a state of solo or mutual beliefs or

intentions (under assumption of sincerity) Inform: speaker believes true Promise: speaker intends to make true Request: speaker intends listener to make true Query: speaker intends listener to inform if true

Public: conventions based on laws and observations

Inform: speaker’s commitment to the veracity of Promise: speaker’s commitment to bring about

Evaluation: For open systems, public semantics is essential because it underlies compliance

Page 9: Chapter 18: Communication

Chapter 18 9Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

FIPAFIPA is the Foundation for Intelligent

Physical Agents Incorporated as an IEEE standards body Specifies standards for heterogeneous,

interoperating agent-based systems Concerned with agency as it relates to

Autonomous behavior Communication with other agents

Page 10: Chapter 18: Communication

Chapter 18 10Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

FIPA StandardsSupport interoperability, but at a low level

Ways of interpreting communications in a way that respects their intended meanings

Message types (called communicative acts): inform, request, …

Public ontologies Transport and infrastructure

Superseded by Web services and messaging standards

Programming model and container Compatible with containers in application servers

Page 11: Chapter 18: Communication

FIPA Standards Provide … An architecture for interoperability A few fixed primitives (message

types) Formal semantics based on mental

notions A few interaction protocols, but

extensible No formal semantics Over-specified via low-level details

Chapter 18 11Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

Page 12: Chapter 18: Communication

Chapter 18 12Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

Contract Net ProtocolAn important generic

protocol Manager announces

tasks via a (selective) multicast

Agents evaluate the announcement; some bid

Manager awards a contract to a bidder

Manager and contractor communicate privately as necessary

Page 13: Chapter 18: Communication

Chapter 18 13Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

RFQ: Task Announcement Eligibility specification: criteria that an

agent must meet to be eligible to submit a bid

Task abstraction: a description of the task to be executed

Bid specification: a description of the expected format of the bid

Expiration time

Page 14: Chapter 18: Communication

Chapter 18 14Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

Bid and Award Messages A bid specified the provider’s

capabilities An award consists of a task specification

A complete specification of the task

Page 15: Chapter 18: Communication

Chapter 18 15Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

Contract Net Evaluated Applies best when problem has a well-

defined hierarchy of tasks With coarse-grained decomposition No interference with each other Yields robustness: failure can be treated as

a manifestation of autonomy Lacks support for specifying service

agreements and contracts Purely operational Hard-coded into the domain Combines agent reasoning with interaction

Page 16: Chapter 18: Communication

Chapter 18 16Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

Commitment Protocols

Protocols expressed in terms of Participants’ commitments Actions for performing operations on

commitments (to create and manipulate them)

Constraints on the above, e.g., captured in temporal logic

Examples: escrow, payment, RosettaNet (over 100 mostly request-response Partner Interface Processes or PIPs) Traditionally, specified in operational terms Can be expressed via commitments

Page 17: Chapter 18: Communication

Chapter 18 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

NetBill Payment Protocol Checking compliance is

easy but the representation is rigid

Some obvious variations are not allowed by the FSM:

The merchant may initiate the protocol by sending an offer

The customer may send an accept prior to offer

The merchant may send the goods prior to accept

How do we design a new FSM?

Verify it?

FSM Representation

C: rfq

M: offer

C: accept

C: pay

M: receipt

M: goods

Page 18: Chapter 18: Communication

Chapter 18 18Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

NetBill using Commitments

Meanings:

1. true

2. request

3. offer

4. Cm,cgoods accept promiseReceipt

5. goods Cc,mpay promiseReceipt

6. goods pay Cm,creceipt

7. goods pay receipt

8. goods promiseReceipt

9. accept

Final states: all detached commitments are discharged

C: rfq

M: offer

C: accept

C: pay

M: receipt

M: goods

M: offer

M: goods

C: pay

C: accept

M: g

oods

Page 19: Chapter 18: Communication

Chapter 18 19Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

Patterns for Commitment Operations Ensure that information about commitment

operations flows to the right parties To enable local decisions

x y z

create(x,c)

delegate(x,z,c)

delegate(x,z,c)

discharge(x,c)

x y z

create(x,c)

assign(x,y,z)

discharge(x,c)

assign(x,y,z)

Page 20: Chapter 18: Communication

Chapter 18 20Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

Complying with Commitment Protocols

Compliance means commitments are discharged

Directly or indirectly after delegates and assigns How can an agent check if others comply with

specified protocols? Agent x has grounds of complaint against agent y if

and only if Cy,x(True, p), for some p Commitment protocols are specified in terms of

Main roles and sphere of commitment Roles essential for coordination Domain-specific propositions and actions

Page 21: Chapter 18: Communication

Chapter 18 21Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

Verifying Compliance Specification

Execution models based on potential causality

Commitments Run-time verification (no access to

implementations) Respects heterogeneity Local verification from observed

messages: each party checks the others’ behavior

Page 22: Chapter 18: Communication

Chapter 18 22Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

Run-Time Compliance Checking

An agent maintains Pending commitments of which it is debtor

or creditor A local model: the messages sent or

received It uses this local model to verify that

each commitment is discharged – or replaced by a commitment that is

Invariant: a creditor of a commitment can determine if it is violated – if the commitment doesn’t refer to a third party’s actions

Page 23: Chapter 18: Communication

Chapter 18 23Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

Fish-Market Sample Execution

Auctioneer A Bidder B1

m1 “50”: [1,0,0]

m3 “No”: [1,2,0]

m5 “40”: [5,2,2]

m8 “No”: [6,2,4]

Bidder B2

m2 “50”: [2,0,0]

[0,0,0] [0,0,0] [0,0,0]

[2,0,1]

[4,2,2]

[3,2,0]

[5,3,2]

m6 “40”: [6,2,2] [6,2,3]

m7 “Yes”: [5,4,2][7,4,2]

fishmoney

[1,1,0]

[8,4,4]

m4 “No”: [2,0,2]

Based on a vector clock

Page 24: Chapter 18: Communication

Chapter 18 24Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

Fish-Market Local Observations

Auctioneer A

[1,0,0]

[2,0,0]

[3,2,0]

[4,2,2]

start

s(m1)

s(m2)

s(m4)

r(m3)

r(m4)

[2,0,2]

[5,2,2]

[6,2,2]

[7,4,2]

end

s(m5)

s(m6)

r(m7)

Bidder B1start

s(m1)

[1,0,0]

r(m1)

s(m3)

r(m5)

s(m7)

end

[1,1,0]

[1,2,0]

[5,2,2][5,3,2]

[5,4,2]

s(m5)

The discharge of a commitment mustbe reachable from its create

Page 25: Chapter 18: Communication

Chapter 18 25Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

Fish-Market Compliance Auctioneer can verify if the bidders

comply Sees each message as sender or

receiver An individual bidder cannot verify

if the auctioneer complies Doesn’t see each message If bidders pool their observations,

then they can verify if the auctioneer complies

Asymmetry indicates need for third party

Page 26: Chapter 18: Communication

Chapter 18 26Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

Chapter 18 Summary Communication enables loose coupling Communications are actions – thus

outside the purview of traditional logic Protocols capture important patterns of

communications Business protocols can be understood

using commitments Model message meanings, not just syntax Check compliance with respect to

commitments