Title: ADAPTABLE SOFTWARE
1ADAPTABLE SOFTWARE
- ARCHITECTURAL SOLUTIONS THAT ENABLE ADAPTATION
- TO CHANGES IN REQUIREMENTS (MICROKERNEL)
- BY DYNAMICAL CHANGE STRUCTURE AND BEHAVIOR OF
SOFTWARE (REFLECTION)
2MICROKERNEL PATTERN
- SEPARATES a Minimal Functional Core (MICROKERNEL)
from extended functionality provided by
(INTERNAL SERVERS) and customer-specific parts
(EXTERNAL SERVERS) - The MICROKERNEL also provides the sockets for
plugging in these extensions and coordinating
their collaboration.
3EXAMPLE FIPA Architecture
- Describes
- Elements of FIPA agent systems
- Relationships between elements
- Mechanisms for communication and transport
(communication languages, protocols, network
services )
- Addresses issues
- Transport mechanisms for messages(RMI, SUNIIOP)
- Mapping specifications to new technologies (XML,
CORBA, SMTP, web servers) - Levels of operation which include relationships
between agents or between agents and platforms
4FIPA-OS as Microkernel
5INTELLIGENT AGENTS
- An intelligent agent is a software entity which
exhibits, in some significant measure, autonomy,
intelligence, and environmental awareness, and
which interacts with its environment to achieve
internal goals. Jennings, 1996 - Co-operation with other agents
- Software Hardware?
- (Agents or Holons or Autonomous XXX?)
6Architecture
K n o w l e d g e b a s e
Planner
Scheduler
Reasoning engine
Context collector
User profile manager
Context manager
Context parser
Content handler
Context dB
Message generator
ACL parser
Communications
7- a protocol is a stereotypical dialogue for a
cooperation framework (e.g. contract net) - reasoning, deciding and reacting component
- - maintains an agenda containing active scripts
- - a script can be (goal-driven) invoked to
satisfy an intention or (data-driven) involved
in response to current situation - - a filter component which selects scripts to
execute
8WHY AGENTS ?
- More usable and understandable structure (e.g.
spaghetti code vs structure modules). - (Almost) essential in large distributed systems
where all subsystems need to be continually
interchanging information to collectively
achieve or to maintain some desired state - (e.g. highly coupled subsystems)
- (cf. human case of multi-disciplinary research
team)
9HOLONIC ENTERPRISE
ENTERPRISE
Field Cluster
CC
CC
RESOURCEr
EC
RESOURCE
EC
CC
CE
CE
CE
RESOURCE
CE
CE
CE
EC
CC
CC
ENTERPRISE
RESOURCE
CE
CE
CE
EC
RESOURCE
EC
CE
CE
CE
CE
CE
CE
CC
CC
RESOURCEr
EC
RESOURCE
EC
CC
Dynamic Virtual Cluster
CE
CE
CE
RESOURCEr
CE
CE
CE
EC
CE
CE
CE
Field Cluster
HOLONIC ENTERPRISE AS A HOLARCHY
10FIPA Kernel
- Includes mandatory agents that manage the
platform - AMS (Agent Management System) -- manages the
creation,deletion,authentication of agents and
provides a white pages directory service for the
agents that reside on the platform - ACC (Agent Communication Channel)-provides the
foundation for communication between the software
agents - DF (Directory facilitator) represents a yellow
pages directory for agents -has information about
the agents and the services they offer.
11Core Platform Functionality(FIPA - mK)
- a collection of services that are closely coupled
- provides an infrastructure where agents are
deployed - a FIPA-compliant AP consists of three agentsAMS,
ACC,DF
12Agent Management System
- Manages the platform resources
- Has control over access and use of the AP being
the managing authority of it. - Supports a set of methods for binding agents to
platform, providing information about the
platform capabilities and settings - Offers white pages services to other agents by
maintaining an index of agent names that reside
on an AP and their corresponding addresses.
13Agent Communication Channel
- The ACC is a low level entity that takes care of
message routing between agents within an AP to
agents on other APs. - It publishes its transport address into a file
store to a location for other ACCs to locate - Uses information provided by the Agent Management
System to direct messages between agents - Messages addressed to an agent will first be
sent to an ACC.
14FIPA-OS as Microkernel
15Directory Facilitator
- Provides a yellow pages directory to agents
- It must maintain an accurate list of agents with
the most current information about them - Agents may register with DF or query it about
types of services offered by other agents. - Management actions register, search, modify
16Message Transport Service
- Provides the ability to send and receive messages
to and from an Agent implementation - It has built-in mechanisms for Internal and
External transport - It has a split structure composed of different
service stacks (BufferService, ACCRouterService)
17INTERNAL SERVER
- Extends the functionality provided by the
Microkernel (mK) - Encapsulate some system specifics
- Design Rule Keep the mK as small as possible
- Extended services are activated by the mK as
needed. - Example Configuration server for agent profiles
18FIPA-OS INTERNAL SERVERS
- Agent configuration settings (in form of strings
in a XML format) - Contains information or defines
- What MTP (message transport protocol) is used by
the platform - Agent name
- Address (location)
- Types of databases to be used for storage
- Profiles are read through parsers
19INTERNAL VS. EXTERNAL
- Mandatory Functionality - INTERNAL SERVICES
- Agent Shell
- Task Manager
- Conversation Manager
- MTS
- Pluggable Functions - EXTERNAL SERVICES
- MTP
- JESS (Agent Shell)
- Parsers (ACL, XML, RDF)
20Agent Construction
- FIPA provides a template (Agent Shell - internal
service!) for building agents. - A new implemented agent consists of a class that
- extends the FIPAOSAgent class that provides
methods for registration, message sending,
setting up tasks and agent shutdown - contains a number of Task implementations that
give the functionality of the agent - contains application specific code for the
desired behavior within the architecture.
21FIPA-OS as Microkernel
22Agent Shell (IS)
- A template provided for agent implementation
- Responsible for loading an agent profile and
initializing its components - It creates a MTS (message transport service), a
Task Manager and a Conversation Manager - A new agent consists of a class that extends the
FIPAOSAgent and inherits all its methods among
which we can find getProfile(),
registerWithAMS(), shutdown()
23Agent Shell
- Provides functionalities (Policies) for
- Sending messages
- Retrieving the Agents properties
- Registration with platform
- Setting up the Task
- Shutdown (clean shutdown for all components of an
agent)
24Task Manager (IS)
- Splits the functionality of an Agent into small
units of work (task decomposition) - The subtasks are reusable as code and easy to
debug - Multiple tasks can be executed at once
- Handles task creation and registration
25FIPA-OS as Microkernel
26Messages and Tasks
- Multiple conversations can be conducted
simultaneously given the ability of Task to send
messages - A TaskManager coordinates the Tasks inside the
agents and is built around event-based
processing. - Every Task within the TaskManager has a set of
events of type TaskEvent - When a new task is created (newTask()) an event
will be added to the queue of the TaskEvent
27Messages and Tasks (cont.)
- If messages are constructed with the protocol
field set to fipa-request, a certain message
order is reinforced - Agents are configured to be able to handle all
message types in that protocol - Messages sent are part of a Conversation and when
a Task sends a message, the conversation that
message is part of is bound to that Task. - In order to handle messages like request, refuse,
inform, several methods that take Conversation
objects as arguments are provided.
28Constructing a Task
- public class FirstTask extends Task
- public FirstTask(OrderAgent owner)
-
- public void startTask()
-
- public void sendRequest( Conversation conv )
- ACLMessage acl getNewConversation(String
protocol) - acl.setContent()
- acl.setLanguage()
- acl.setOntology()
- forward(acl)
-
29Tasks and Conversations
FIPAOSAgent
ConversationManager
TaskManager
MTS
Task
Conversation
FIPAQuery protocol
TaskEvent
FIPARequest protocol
ConversationUpdateEvent public void
handleRequest(conv)
Other Events
30Conversation Manager (IS)
- Provides the ability to track conversation state
and mechanisms for grouping messages of the same
conversation together (encapsulated as
Conversation objects that represent individual
conversations) - e.g. Cooperation Domains - Ensures that the conversation protocol is being
followed by the involved parties (agents) - A Conversation class with various specializations
is provided to enable the use of different
protocols
31Message Transport Protocol
- Internal (RMI)
- Proprietary mechanism
- Efficiency vs. interoperability
- Messages do not need to be prepared before being
sent
- External (SUNIIIOP)
- Standardized mechanism
- Provides interoperability
- Messages are prepared before being sent
32Interplatform communication
33Message Encoding (ES)
34Agent Languages Agent Languages An agent
language is a language for programming software
or hardware agents or agent systems. It should
provide for at least some structural agent
features and may also allow agency attributes to
be directly programmed. It may be incorporated
in a development environment with user-friendly
editors, browsers, etc. which facilitate the
programming. Most existing agent languages are
deliberative (e.g. AGENTO, PLACA, CONCURRENT
METAM, APRIL, MAIL) often related closely (or
less so) to agent theory and logic. Some agent
languages, e.g. ABLE, are reactive languages.
35ACL Message structure
- Represents a communicative act (Policy) that can
be simple (inform ,request,confirm) or composed
request(propose(action)) - Has its corresponding semantics and protocol
- Contains parametersgtattributes /values
- language representation language for content
- content the information about which a message
is sent - receiver agent that receives the message
- protocol interaction protocol used by sender
- ontology ontology to which the content refers to
36Agent Interactions
- FIPA ACL deals with intention interpretation and
supports the communication between agents through
explicit linguistic actions - The information content transmitted and the
protocols are those described and defined in FIPA
specifications - www.fipa.org
37ACL - Example
- The information content will be communicated
through the existing message types. - Ex (request
- sender OrderAgent
- receiver OperationPlanningAgent
- content(action d (produce 50 parts A (product
ABC))(due date Dec 12, 2000)) - protocol fipa-request
- reply-with order 132
- )
38Microkernel Implementation
- 1. Analyze the Application Domain (define
policies of external servers identify the core
functionality needed to implement the external
servers). - 2. Categorize the services to separate core
services (microkernel) from internal servers. - CRITERIA time-critical, hardware-dependent and
frequently used operations - in microkernel.
39 cont
- RULE Place all resource-management services in
the mK (e.g. agent management, task management,
memory management). Also strategies for sharing,
locking, allocation and de-allocation of
resources.
40APPLICATION DOMAIN Supply Chain Management
- Composed of cooperating agents, each performing a
set of supply chain operations (functions order,
shipping, receiving, etc.) - The agents are constructed as computational
systems that interact across networks - Agents are deployed on several FIPA platforms
that already contain the infrastructure (mK) to
enable the communication between them - The interactions among agents are managed through
existing Task and Conversation classes (IS)
41Agents for Supply Chain Roles and Interactions
- Extending a generic agent framework to an
integrated supply chain management architecture
(by implementing new application specific agents)
implies the identification of the entities
involved in a supply chain as well as the
elements that affect the performance of it. - Elements or roles like inventory control,
material flows,information storage are embedded
as abilities into new specialized agents or
application specific agents which will perform
the respective activities. - Other agents with built-in capabilities will
model the roles played by different parts in a
supply chain network such as capacity allocation,
resource management and information exchange.
42(No Transcript)
43Agent Definitions
- Order Agent
- - Gets orders from customers
- - Handles requests for changing/ canceling
orders - - Transmits the orders to OPAgent
- OperationPlanning Agent
- - Receives orders from Customer through the
Order Agent - - Coordinates manufacturers, suppliers,
transportation, distribution within the
enterprise to achieve the best possible results
in terms of customer requirements - - It monitors the execution of tasks through
conversations with functional agents within the
supply chain. -
44Agent Definitions (cont.)
- Shipping Agent
- - Schedules and monitors the performing of
transportation tasks pertinent to each order as
requested or specified by the OperationPlanning
Agent - - Assigns transportation resources (routes) in
order to construct the best possible shipping
schedule. - Supplier Agent
- - Responsible for scheduling the tasks related
to product delivery - - Manages the availability of requested products
45Agent Implementation
- As part of the SCM architecture we consider some
functional agents (Supplier and Shipping agents),
the Operation Planning agent and an Order agent. - The information content transmitted and the
protocols are those defined in FIPA language
specifications
46Implementation ...
- 4. Find a complete set of operations and
abstractions needed to define every external
service (POLICIES). - 5. Implement each Policy using the services and
mechanisms that the microkernel provides through
its interfaces (includes services provided by
internal servers). - Determine strategies for communication (request,
transmission and retrieval of services)
47Agent Construction
- FIPA provides a template (Agent Shell) for
building agents. - A new implemented agent consists of a class that
- extends the FIPAOSAgent class that provides
methods for registration, message sending,
setting up tasks and agent shutdown - contains a number of Task implementations that
give the functionality of the agent - contains application specific code for the
desired behavior within the architecture.
48Agent Interactions
- FIPA ACL deals with intention interpretation and
supports the communication between agents through
explicit linguistic actions - The information content transmitted and the
protocols are those described and defined in FIPA
specifications
49Agent Interactions (cont..)
- The information content will be communicated
through the existing message types. - Ex (request
- sender OrderAgent
- receiver OperationPlanningAgent
- content(action d (produce 50 parts A (product
ABC))(due date Dec 12, 2000)) - protocol fipa-request
- reply-with order 132
- )
50EXTERNAL SERVERS (Personality)
- Implement specific views of the application
domain (as Policies - e.g. Order Policy)
51Agent Interactions (cont..)
- The receiver (the OperationPlanningAgent) can
only answer with agree, refuse in the first stage
given the performatives for the fipa-request
protocol employed here - (agree
- sender OperationPlanningAgent
- receiver OrderAgent
- content (produce d (50 parts A (product
ABC)) (delivery time Jan 15, 2001)) - in-reply-to order 132
- protocol fipa-request
Request
Agree
Refuse
Inform
Failure
52Messages and Tasks
- Multiple conversations can be conducted
simultaneously given the ability of Task to send
messages - A TaskManager coordinates the Tasks inside the
agents and is built around event-based
processing. - Every Task within the TaskManager has a set of
events of type TaskEvent - When a new task is created (newTask()) an event
will be added to the queue of the TaskEvent
53Messages and Tasks (cont.)
- If messages are constructed with the protocol
field set to fipa-request, a certain message
order is reinforced - Agents are configured to be able to handle all
message types in that protocol - Messages sent are part of a Conversation and when
a Task sends a message, the conversation that
message is part of is bound to that Task. - In order to handle messages like request, refuse,
inform, several methods that take Conversation
objects as arguments are provided.
54Constructing a Task
- public class FirstTask extends Task
- public FirstTask(OrderAgent owner)
-
- public void startTask()
-
- public void sendRequest( Conversation conv )
- ACLMessage acl getNewConversation(String
protocol) - acl.setContent()
- acl.setLanguage()
- acl.setOntology()
- forward(acl)
-
55Tasks and Conversations
FIPAOSAgent
ConversationManager
TaskManager
MTS
Task
Conversation
FIPAQuery protocol
TaskEvent
FIPARequest protocol
ConversationUpdateEvent public void
handleRequest(conv)
Other Events
56Microkernel Implementation
- 1. Analyze the Application Domain (define
policies of external servers identify the core
functionality needed to implement the external
servers). - 2. Categorize the services to separate core
services (microkernel) from internal servers. - CRITERIA time-critical, hardware-dependent and
frequently used operations - in microkernel.
57 cont
- RULE Place all resource-management services in
the mK (e.g. agent management, task management,
memory management). Also strategies for sharing,
locking, allocation and de-allocation of
resources.
58Implementation...
- 7. Structure the Microkernel (e.g. using the
Layers Pattern) to separate system-specific from
system-independent parts. Lower layers hide
system dependencies from the services that the
Microkernel exposes publicly. Intermediate layers
bridge hardware specifics with the gateways
towards outside processes (the uppermost layer.)
59Implementation ...
- 4. Find a complete set of operations and
abstractions needed to define every external
service (POLICIES). - 5. Implement each Policy using the services and
mechanisms that the microkernel provides through
its interfaces (includes services provided by
internal servers). - Determine strategies for communication (request,
transmission and retrieval of services)
60FIPA-OS Layers
Layers
Application Agents ACL MTP
Agent Shell
Task/Conv. Manager
Agent Configurator
Directory Facilitator
Agent Management System
MTS
Agent Communication Channel
61FIPA-OS as Microkernel
62cont
- Design and Implement the Internal Servers - they
are accessed exclusively by the mK!! - Implement External Servers - write the Policies
that describe the services such that they can be
implemented using the programming interfaces of
the mK. - Implement the Adapters - e.g. can be implemented
as Proxies representing the external servers (one
proxy per server).
63REFLECTION PATTERN
64(No Transcript)
65PARTICIPANTS
66(No Transcript)
67(No Transcript)
68(No Transcript)
69(No Transcript)
70(No Transcript)
71(No Transcript)
72(No Transcript)