Chapter 18 Communication ServiceOriented Computing Semantics Processes Agents

  • Slides: 27
Download presentation
Chapter 18: Communication Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael

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

Highlights of this Chapter n Agent Communication Languages n n n Chapter 18 Speech

Highlights of this Chapter n Agent Communication Languages n n n Chapter 18 Speech Act Theory Semantics Interaction Patterns Combining ACLs with Web Services Contract Net Protocol Business Protocols Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns 2

Interaction and Communication n Interactions occur whenever agents share an environment n n Communications

Interaction and Communication n Interactions occur whenever agents share an environment n n Communications are interactions understood to preserve the participants’ autonomy n n n Resource contention, e. g. , bumping into each other 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 and helps specify open systems Chapter 18 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns 3

Syntax, Semantics, Pragmatics n n Syntax: structure of a (communication) language Semantics: meaning based

Syntax, Semantics, Pragmatics n n Syntax: structure of a (communication) language Semantics: meaning based solely on the terms used n n Requires a structured vocabulary and a shared framework of knowledge, e. g. , an ontology Pragmatics: meaning based on the context (“here”) n n n Chapter 18 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 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns 4

A Classification of Message Classifications n Structure-based (syntactic) n n Meaning-based (semantic) n n

A Classification of Message Classifications n Structure-based (syntactic) n n Meaning-based (semantic) n n Distinguish messages based on grammatical forms in natural language Distinguish messages based on a notion of intrinsic meaning n E. g. , prohibitive is different from directive, despite syntactic similarity Use-based (pragmatic) n Chapter 18 Distinguish messages based on their functions in specific classes of protocols n E. g. , assertion is different from acknowledgment Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns 5

Communicative Act Theory Also called speech act theory (though not specific to speech) n

Communicative Act Theory Also called speech act theory (though not specific to speech) n Developed for human language n n n Views communication as action Contrasts with traditional logic, which is about true or false assertions Considers three aspects of a message: n Locution, or how it is phrased, e. g. , “It is hot here” or “Turn on n Illocution, or how it is meant by the sender or understood by n the air conditioner”: strings or XML documents 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 Chapter 18 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns 6

Applying the Theory n Classifications of illocutions motivate message types, but are typically designed

Applying the Theory n Classifications of illocutions motivate message types, but are typically designed for natural language n n n Rely on NL syntax, e. g. , conflate directives and prohibitives In natural language understanding: determining how locutions map to illocutions (inferring agents’ beliefs and intentions) For services and agents, determining the n n Chapter 18 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 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns 7

ACL Semantics What does a inform, promise, request, query mean? n Mentalist: a state

ACL Semantics What does a inform, promise, request, query mean? n Mentalist: a state of solo or mutual belief (under assumption of sincerity) n n n 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 n n Inform: speaker’s commitment to veracity of Promise: speaker’s commitment to bring about Evaluation: For open systems, public semantics is essential because it underlies compliance Chapter 18 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns 8

FIPA is the Foundation for Intelligent Physical Agents n Incorporated as IEEE standards body

FIPA is the Foundation for Intelligent Physical Agents n Incorporated as IEEE standards body n Specifies standards for heterogeneous, interoperating agent-based systems n Concerned with agency as it relates to n Autonomous behavior n Communication with other agents Chapter 18 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns 9

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

FIPA Standards Ways of interpreting communications in a way that respects their intended meanings n Communicative acts n Public ontologies n Transport and infrastructure n n Superseded by Web services and messaging standards Programming model and container n Compatible with containers in application servers Compared to existing approaches n XML Schema standardizes grammar, not meaning n OWL standardizes ontology description, not communication Chapter 18 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns 10

Example Low-Level Patterns Chapter 18 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Example Low-Level Patterns Chapter 18 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns 11

Combining Agents with Traditional Web Services ACL is the FIPA ACL standard Chapter 18

Combining Agents with Traditional Web Services ACL is the FIPA ACL standard Chapter 18 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns 12

Contract Net Protocol An important generic protocol n n Chapter 18 Manager announces tasks

Contract Net Protocol An important generic protocol n n Chapter 18 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 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns 13

RFQ: Task Announcement n n Chapter 18 Eligibility specification: criteria that an agent must

RFQ: Task Announcement n n Chapter 18 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 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns 14

Bid and Award Messages n n A bid specified the provider’s capabilities An award

Bid and Award Messages n n A bid specified the provider’s capabilities An award consists of a task specification n Chapter 18 A complete specification of the task Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns 15

Contract Net Evaluated n Applies best when problem has a welldefined hierarchy of tasks

Contract Net Evaluated n Applies best when problem has a welldefined hierarchy of tasks n n Chapter 18 With coarse-grained decomposition No interference with each other Lacks support for specifying service agreements and contracts Yields robustness: failure can be treated as a manifestation of autonomy Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns 16

Commitment Protocols n Protocols expressed in terms of n n Participants’ commitments Actions for

Commitment Protocols n Protocols expressed in terms of n n 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, Rosetta. Net (over 100 mostly request-response Partner Interface Processes or PIPs) Chapter 18 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns 17

Net. Bill Payment Protocol FSM Representation n n Checking compliance is easy but the

Net. Bill Payment Protocol FSM Representation n n Checking compliance is easy but the representation is rigid Some obvious variations are not allowed by the FSM: n n n Chapter 18 The merchant may start the protocol by sending a quote The customer may send an accept prior to offer The merchant may send the goods prior to accept Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns 18

Net. Bill using Commitments Meanings: 1. true 2. request 3. offer 4. Cm, cgoods

Net. Bill using Commitments Meanings: 1. true 2. request 3. offer 4. Cm, cgoods accept promise. Receipt 5. goods Cc, mpay promise. Receipt 6. goods pay Cm, creceipt 7. goods pay receipt 8. goods promise. Receipt 9. accept Final state: No open commitments remain Chapter 18 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns 19

Patterns for Commitment Operations n Ensure that information about commitment operations flows to the

Patterns for Commitment Operations n Ensure that information about commitment operations flows to the right parties n Chapter 18 To enable local decisions Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns 20

Complying with Commitment Protocols n Compliance means commitments are discharged n n n Directly

Complying with Commitment Protocols n Compliance means commitments are discharged n n n Directly or indirectly after delegates and assigns How can an agent check if others comply with specified protocols? Commitment protocols are specified in terms of n n n Chapter 18 Main roles and sphere of commitment Roles essential for coordination Domain-specific propositions and actions Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns 21

Verifying Compliance Specification n Models based on potential causality Commitments based on branching-time TL

Verifying Compliance Specification n Models based on potential causality Commitments based on branching-time TL Run-time Verification n n Chapter 18 Respects design autonomy Uses TL model-checking Local verification from observed messages: each party checks the others behavior Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns 22

Run-Time Compliance Checking n An agent maintains n n Pending commitments of which it

Run-Time Compliance Checking n An agent maintains n n Pending commitments of which it is debtor or creditor A local model of 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 Chapter 18 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns 23

Fish-Market Sample Execution Based on a vector clock Chapter 18 Service-Oriented Computing: Semantics, Processes,

Fish-Market Sample Execution Based on a vector clock Chapter 18 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns 24

Fish-Market Local Observations The discharge of a commitment must be reachable from its create

Fish-Market Local Observations The discharge of a commitment must be reachable from its create Chapter 18 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns 25

Fish-Market Compliance n n Chapter 18 Auctioneer can verify if the bidders comply An

Fish-Market Compliance n n Chapter 18 Auctioneer can verify if the bidders comply An individual bidder cannot verify if the auctioneer complies If bidders pool their observations, then they can verify if the auctioneer complies Asymmetry indicates need for third party Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns 26

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

Chapter 18 Summary n n 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 n n Chapter 18 Model message meanings, not just syntax Check compliance with respect to commitments Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns 27