chapter 22: building soc applications service-oriented computing: semantics, processes, agents –...

26
Chapter 22: Building SOC Applications Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2005

Upload: gloria-bryant

Post on 18-Dec-2015

217 views

Category:

Documents


1 download

TRANSCRIPT

Chapter 22:Building SOC Applications

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

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

Michael Huhns

Highlights of this Chapter Elements of SOC Design Self study: Quality of Service Self study: How to Create an Ontology Self study: How to Create a Process

Model How to Construct Agent-Based Systems How to Engineer Composed Services Exception Handling Self study: Knowledge Management Self study: eBusiness Supply-Chain Automation

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

Michael Huhns

Elements of Service-Oriented Architectures

Loose coupling: focus should be on high-level contractual relationships

Implementation neutrality: the interface is what should matter

Flexible configurability: late binding of components

Long lifetime: components should exist long enough to be discovered, to be relied upon, and to engender trust in their behavior

Granularity: interactions and dependencies should occur at as high a level as possible

Teams: computation in open systems should be conceptualized as business partners working as a team

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

Michael Huhns

Goals for Multiagent Control

Develop techniques for Locating and allocating capabilities and

resources that are dispersed in the environment

Predicting, avoiding, or resolving contentions over capabilities and resources

Mediating among more agents, with more heterogeneity and more complex interactions

Maintaining stability, coherence, and effectiveness

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

Michael Huhns

Control Challenges: Agents

Control gets harder as agents become more: Numerous Complex individually

(e.g., more versatile) Heterogeneous (in

capabilities, representations, languages)

quantity

heterogeneity

complexity

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

Michael Huhns

Control Challenges: Problems

Control gets harder as the problems agents solve become more Interrelated Rapidly changing, or

pursued in an uncertain and changing world

Unforgiving of control failures (e.g., involving irreversible actions)

degree of interaction

severity of failure

volatility

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

Michael Huhns

Control Challenges: Solutions

Control gets harder as solutions to agent problems are required to be more Efficient Robust to changing

circumstances Cheaper or faster to

develop individually and in concert

quality / efficiency

low overhead

robustness

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

Michael Huhns

Techniques for Agent Control

Broker-based Matchmaker-based Market-based; auctions BDI and commitment

based Decision theoretic Workflow (procedure)

based Standard operating

procedures

Learning Coordinated planning Conventions Protocols Stochastic or physics-

based Organizations: teams

and coalitions Constraint satisfaction

or optimization

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

Michael Huhns

Dimensions of Control

Control howcapabilitiesare

Possibly by Why difficult? Why needed?

Allocated orscheduled

Markets, CSP,hierarchy,planning,teamwork

Many demands,scarce supply

Avoidcontention, useresources well

Located Brokers,matchmakers,markets,broadcast

Arrival/departure rate,variety, scale

Must findresources toemploy them

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

Michael Huhns

Control howcapabilitiesare

Possibly by Why difficult? Why needed?

Not wasted Broker-monitoredrequests,caching,communication

Similar tasksarising variousplaces

Efficiency

Demanded Reacting toprices,replanning, goaladjustment

Number ofalternativechoices, selfinterest

Avoid contention

Supplied Reprogram ortrain agents,evolve/spawn,inject "friction"

Oscillations orchaos fromsporadic demand,allocatingprocesses

Adapt/grow withneed

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

Michael Huhns

Control howcapabilitiesare

Possibly by Why difficult? Why needed?

Described Provide more orless detail, lumpor differentiatecapabilities

Rich space ofcapabilities,disagree on betterdescription,propagatingdescriptions

Description mustfollow use

Initiallyallocated

Organization orrole restructuring

Detecting need,assessingchoices,propagating

Choiceconstrains qualityof coordination

Differentiated Prevention(maintainconsistency),response (enlargecapabilitylanguage)

Continuousoperation, agentadaptation

Differentiationinevitable

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

Michael Huhns

Task Decomposition

Divide-and-conquer to reduce complexity: smaller subtasks require less capable agents and fewer resources

Task decomposition must consider the resources and capabilities of the agents, and potential conflicts among tasks and agents The designer decides what operators to

decompose over The system decides among alternative

decompositions, if available

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

Michael Huhns

Task Decomposition Methods Inherent (free!): the representation of the

problem contains its decomposition, as in an AND-OR graph

Composition designer (human does it): decomposition is programmed during implementation. (There are few principles for automatically decomposing tasks)

Hierarchical planning (agents implementing the services do it): decomposition again depends heavily on task and operator representation

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

Michael Huhns

Task Decomposition Examples Spatial decomposition: service is info source or decision

point:

Functional decomposition: service offers specialized expertise:

Pediatrician

Internist

Psychologist

Neurologist

Cardiologist

Agent 1

Agent 2

Agent 3

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

Michael Huhns

Task Distribution Criteria

Avoid overloading critical resources Engage services on tasks where expertise

matches Make an agent with a wide view assign tasks to

other agents Assign overlapping responsibilities to agents to

achieve coherence Assign highly interdependent tasks to agents in

spatial or semantic proximity. This minimizes communication and synchronization costs

Reassign tasks if necessary for completing urgent tasks

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

Michael Huhns

Task Distribution Mechanisms Market mechanisms: tasks are matched to

agents by generalized agreement or mutual selection (analogous to pricing commodities)

Contract net: announce, bid, and award cycles Multiagent planning: planning agents have the

responsibility for task assignment Organizational structure: agents have fixed

responsibilities for particular tasks Recursive allocation: responsible agent may

further decompose task and allocate the resultant subtasks

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

Michael Huhns

JADE Behavior for CNP Initiator Role

Prepare Initiations

Send Initiations

Receive ReplyDummy Final

Check In Sequence

Handle Positive Response

Handle Failure

Handle Not Understood

Handle Refuse

Handle Inform

Handle Out-of-Sequence

Check Sessions

agree

refuse inform

not understood

failure

Handle All Responses

Handle All Result Notifications

Check Again

TIMEOUT

INTERRUPT All Responses Received

All Result Notifications Received

Reset

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

Michael Huhns

Two Patterns for Engineering Service Applications

Task1

Task2

Task3

Task4

Task5

Task6

Task7

WebService1 WebService2 WebServiceN. . .

Discovering, Matching, Planning, Composing

Repository/Directory of Services

Discovering, Matching, Planning, Composing

Goal

Subgoal

Subgoal

Subgoal

Subgoal

Subgoal

Subgoal

Subgoal

SubgoalSubgoal

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

Michael Huhns

Agents for Collaboration Each Business Collaboration is handled by

an autonomous software entity (agent) On forming a Collaboration, automatically

generate ebXML-compliant agents The “Agent Generator,” when integrated

with the BSI, has static knowledge about local constraints and dynamic knowledge from the current CPA

The software agents exchange ebXML messages to perform the selected Business Collaboration

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

Michael Huhns

Why this Approach? Issues regarding transport, messaging,

security constraints are to be handled for each Collaboration

Business collaborations are becoming increasingly complex

The system will be dealing with multiple collaborations at a given time

If the transactions are legally bound or even otherwise, the non-repudiation condition MAY have to be satisfied

There is always a possibility of unpredictable situations (exceptions)

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

Michael Huhns

Agent-Based Coordination Methodology

Generic B2B Use-Case and Class

Models

Identify B2BConversations

ParticipantsDevelop B2BInteractionDiagrams

CreateAgent-Based

B2BTransaction

State Machine

Exception-Augmented Transaction Templates

BOD Semantics

AugmentB2B

TransactionState Machine

ParticipantsEnact B2BInteraction

Agents

Dooley

Graph

AgentSkeleto

n

RobustAgent

Skeleton

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

Michael Huhns

Ford Interoperability Scenario

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

Michael Huhns

Conversation Analysis Based on Mutual Understanding(Bipartite Conversation Graph)

Lubetec5

Ford2

Ford3

Jarvis4

Ford1

Lubetec6

Lubetec7

Jarvis8

Jarvis9

Ford10

Greenfield11

Greenfield12

Greenfield13

Eff.Logistics14

2Lubetec

3Eff.Logistics

4Ford

5Ford

1Jarvis

6Ford

7Ford

8Ford

9Ford

10Greenfield

11Ford

12Ford

13Ford

14Ford

Sender Receiver

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

Michael Huhns

Transaction Skeletons for Agent Enactment

Supplier Warehouse

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

Michael Huhns

Augmented Transaction Skeletons forAgent-Based Exception Handling

Start

Waiting for Payment

Order Complete

Receive( payment ) ^send("Thank you")

Set Deadline Alarm

^send(ProcessInvoice)

exceeded( Deadline ) ^send(ReminderInvoice)

Start

Waiting for Payment

Order Complete

Receive( payment ) ^send("Thank you")

^send(ProcessInvoice)

Ignore Exceptions Consider Exceptions

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

Michael Huhns

Chapter 22 Summary

Success of service-oriented computing solutions depends upon

How ontologies and process models are constructed

How a system is designed so that desired behaviors ensue

How abstractions for interaction are fleshed out

How the above are related to software engineering approaches