Chapter 18: Communication - NC State Computer Science

Chapter 18: Communication - NC State Computer Science

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

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 Structure-based (syntactic) Meaning-based (semantic) Distinguish messages based on grammatical forms in natural language Distinguish messages based on a notion of intrinsic meaning E.g., prohibitive is different from directive, despite syntactic similarity

Use-based (pragmatic) Chapter 18 Distinguish messages based on their functions in specific classes of protocols 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) 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 Chapter 18 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns 6 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 In natural language understanding: determining how locutions map to illocutions (inferring agents beliefs and intentions) For services and agents, determining the 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? Mentalist: a state of solo or mutual belief (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: speakers commitment to veracity of Promise: speakers 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 FIPA is the Foundation for Intelligent Physical Agents Incorporated as IEEE standards body Specifies standards for heterogeneous, interoperating agent-based systems Concerned with agency as it relates to Autonomous behavior 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 Communicative acts Public ontologies Transport and infrastructure Superseded by Web services and messaging standards Programming model and container Compatible with containers in application servers Compared to existing approaches XML Schema standardizes grammar, not meaning OWL standardizes ontology description, not communication Chapter 18 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns

10 Example Low-Level Patterns Query Requester Provider Reply Synchronous: a blocking query waits for an expected reply Query Handle Requester Next Reply Provider Next Reply Provider maintains state; replies sent individually when requested Subscribe Reply Requester Reply

Provider Reply Asynchronous: a nonblocking subscribe; replies sent as available Chapter 18 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns 11 Combining Agents with Traditional Web Services Web Service Client SOAP Request SOAP Response Web Service Agent Gateway ACL Request ACL Inform Agent

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 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 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 Chapter 18 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns 14 Bid and Award Messages

A bid specified the providers capabilities An award consists of a task specification Chapter 18 A complete specification of the task Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns 15 Contract Net Evaluated Applies best when problem has a well-defined hierarchy of tasks 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 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)

Chapter 18 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns 17 NetBill Payment Protocol FSM Representation C: rfq M: offer C: accept Checking compliance is easy but the representation is rigid Some obvious variations are not allowed by the FSM: M: goods C: pay M: receipt

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 NetBill using Commitments M : goods Meanings: C : r fq C : accept 1. true M: offer 2. request

3. offer M: offer C: accept M: goods C: pay C : pay 4. Cm,cgoods accept promiseReceipt 5. goods Cc,mpay promiseReceipt 6. goods pay Cm,creceipt 7. goods pay receipt M: receipt Final state: No open commitments remain Chapter 18 8. goods promiseReceipt 9. accept Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns 19 Patterns for Commitment Operations Ensure that information about commitment operations flows to the right parties

x To enable local decisions y z create(x,c) x y create(x,c) delegate(x,z,c) assign(x,y,z) delegate(x,z,c) discharge(x,c) Chapter 18 z assign(x,y,z) discharge(x,c) Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns

20 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? Commitment protocols are specified in terms of 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 Models based on potential causality Commitments based on branchingtime TL Run-time Verification 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

An agent maintains 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 doesnt refer to a third partys actions Chapter 18 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns 23 Fish-Market Sample Execution Based on a vector clock Bidder B1

Auctioneer A [0,0,0] m1 50: [1,0,0] [0,0,0] [1,1,0] Bidder B2 [0,0,0] m2 50: [2,0,0] [3,2,0] [4,2,2] m3 No: [1,2,0] m4 No: [2,0,2] m5 40: [5,2,2] [5,3,2] m6 40: [6,2,2] [7,4,2] [8,4,4] Chapter 18 [2,0,1] [6,2,3] m7 Yes: [5,4,2] m8 No: [6,2,4]

fish money Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns 24 Fish-Market Local Observations Auctioneer A Bidder B1 start [1,0,0] start s(m1) s(m1) [1,0,0] [2,0,0] s(m2) [1,1,0] r(m1) s(m4) [2,0,2] [3,2,0] [4,2,2]

[5,2,2] Chapter 18 r(m3) [1,2,0] s(m3) s(m5) [5,2,2] r(m4) [5,3,2] r(m5) s(m5) [5,4,2] [6,2,2] s(m6) [7,4,2] r(m7) s(m7) end The discharge of a commitment must be reachable from its create endComputing: Semantics, Processes, Agents - Munindar Singh and

Service-Oriented Michael Huhns 25 Fish-Market Compliance 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

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 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

Recently Viewed Presentations

  • Data & Graphs

    Data & Graphs

    Double line graphs need: - Title - Labeled X and Y axes - Equal Intervals - Data displayed by points connected into lines - Key Circle Graph Circle graphs are used to display parts of the data in relation to...
  • EDTE 417 Technology Assignment

    EDTE 417 Technology Assignment

    This website provides students and educators with valuable information, media and other resources about space and space exploration. The section for students and for educators includes videos, images, news topics, games, picture dictionaries, homework topics, career information, etc. that are...
  • The Periodic Law

    The Periodic Law

    Chapter14: Periodic Trends ... (1887-1915) The Periodic Law States that when elements are arranged in order of increasing atomic number, their physical and chemical properties show a periodic pattern Atomic Radii Atomic radius - the distance between the center of...
  • Doctrinal Mastery The Restoration - part 2

    Doctrinal Mastery The Restoration - part 2

    Think of synonyms for each of these words. Create a sentence that uses both of these words. Look for: What statements explain WHY we believe that our Church is the TRUE and LIVING church? ... Don't you think it's arrogant...
  • Plate Tectonics - Michigan State University

    Plate Tectonics - Michigan State University

    Plate Tectonics Earth Science Essentials North Farmington High School What is Plate Tectonics Crust of the Earth FLOATS on top of the mantle. Crust is broken into slabs (plates) that MOVE, slide, collide, and spread apart.
  • The Challenge: To Create More Value in All Negotiations

    The Challenge: To Create More Value in All Negotiations

    Doctors don't treat them, medical schools don't teach them and insurers don't pay to solve them. I began to think that this was indefensible." —Henry Lodge, Younger Next Year "Experts estimate that more than a hundred thousand Americans die each...
  • ALICE Beam Simulations Deepa Angal-Kalinin On behalf of

    ALICE Beam Simulations Deepa Angal-Kalinin On behalf of

    Used three correctors pre-booster to centre on the screens before and after the booster. No stray fields (red),stray fields (green), stray fields with corrections (blue) Note: effect larger at the lower gun energy we currently use. Elliptical beam 2.
  • Webinar: CBD and CanMEDS 2015 Tuesday, April 29, 2014 Hosted ...

    Webinar: CBD and CanMEDS 2015 Tuesday, April 29, 2014 Hosted ...

    Linking assessment to one or more Roles. CanMEDS 2015: Next Steps. In the coming year: Release of the final version of the CanMEDS Physician Competency Framework at the 2015 International Conference on Residency Education (ICRE) in Vancouver, Canada.