SWE321 - Data Centered Design
SWE321 - Data Centered Design
SWE321 - Data Centered Design
Overview
Data-centered SW Architecture is characterized by
A centralized data store that is shared by all surrounding software
components
Overview
The connection between the data module and the software
components is either implemented by
Explicit method invocation or Implicit method invocation
Classification
Classified into two categories (based on Flow Control Strategy)
Repository
Blackboard
Repository
Repository
Data store is passive
Clients of the data store are active
Its clients taking control of flow logic
Client may access the repository
Interactively
Batch transaction
Examples
Database management system
Library Information system
Interface repository in CORBA
UDDI registry for Web Services
CASE tools IBM Rational Rose
IDE (Interactive Development Endowment)
Blackboard
Blackboard
Data store is active
Clients are inactive/passive
A new data change may trigger events so that the knowledge sources
take actions to respond to these events. These actions may result in new
data and change in logic flow
Example:
Knowledge-based AI system
voice and image recognition system
Security system
Business resource management systems.
Repository Style
Dash line means clients have full control over logic flow
Each agent might have different interface, functionality, privilege
Bootstrap
Agent 1
Agent 2
Repository
Repository Architecture
Agent n
class
Students
Student
- Vector or Arraylist
Students table
r0
123
Solomon
r1
234
Anderson
987
Smith
- SSN
- Name
database
+
+
+
+
+
Students()
add()
remove()
next()
first()
+
+
+
+
+
Student()
getSSN()
setSSN()
getName()
setName()
connectivity
rn
Program
Scripts
menu
CASE tool
Diagrams
Diagram drawing
Reports (Text
Specifications)
Data
reposition
Generated diagram
form RE
Code for
Reverse Engineering
Graphic
Files
Text Report
Files
Text Code
Files
Example 3:
Compiler
Construction
Compiler tool
scanner
int x, y;
x= y + 1;
code
generator
parser
int
int
Statement
Var
(Int)
x
(Int)
exp
(Int)
y
(Int)
1
(Int)
Symbol
table
parse tree
Type check
By semantic
Question: why not batch
parser
sequence?
The data in memory are shared by all agents and the agents dont pass on
data to each other directly.
Benefits
Simplify the overall complexity of overall database structure
Security management in terms of scope of data of manipulation for
different users
Benefits
Data integrity:
easy to backup and restore,
Cons
Data store reliability and availability
High dependency between data structure of data store
Overhead cost of moving data on network
Introduction
Blackboard system:
A common knowledge base, the "blackboard", is iteratively
updated by a diverse knowledge sources,
starting with a problem specification and ending with a solution.
Overview
Blackboard: variation of data-centric
Consists of three partitions
Blackboard:
Used to store data (Hypothesis and fact)
Knowledge Source:
stores domain specific knowledge
controller
initiating the blackboard and knowledge sources
Agent 1
Agent 2
Agent n
Data links
Blackboard
Flow logic
control
Blackboard
-facts
+inspect()
+update()
Knowledge
Source (KS1)
-rules
+matchInspect()
+update()
n
1
Control
-Blackboard
-KS
-controller
+execute()
As we can see, one blackboard may have many knowledge sources associated with it,
working on given data and deduced data available in the blackboard subsystem.
Each knowledge source helps to solve problems in its expertise area. Knowledge can be
stored in different knowledge representation formats depending on the reasoning
strategy.
For example, a knowledge source stores all related rules and provides activation
mechanisms for the blackboard to trigger in rule-based expert system.
Of course, knowledge sources must register themselves with the blackboard so that if
any change takes place in the blackboard, they will be notified to fire up actions in the
corresponding knowledge sources, which can deduce new facts and update the
blackboard.
Each individual knowledge source may have its own problem solving strategy and use
its own knowledge expertise to contribute to a partial solution which will lead to a final
solution.
The blackboard class holds the current data state, and the final problem solution will be
placed in the blackboard for the controller to pick up and use to generate a final report.
The rule-based strategy is one of many reasoning algorithms in use today.
There are many other problem solving strategies that can be applied including Fuzzy
set theory, probability and statistics, neural network, data mining, and heuristic
searching.
Example: KBS
Since the blackboard architecture is basically a self-activated
system, the controller subsystem in the architecture only acts at
the beginning of the process to initiate blackboard and all
knowledge sources; it also periodically inspects the current state of
the blackboard to determine whether to terminate the processing
if the solution is acceptable or optimal enough.
KBS: Knowledge Based System
Knowledge: represented as production rule
Condition
Action
Example Setting
Here is a set of rules:
R1: IF animal gives milk THEN animal is mammal
R2: IF animal eats meat THEN animal is carnivore
R3: IF animal is mammal AND animal is carnivore AND animal has tawny
color AND animal has black stripes THEN animal is tiger
Matching Process
Knowledge
Source i
Control
Blackboard
initiate()
intiate()
matchInspect()
update()
matchInspect()
update()
inspect()
Blackboard ( Fact i )
addEventListener()
KS EventTrigger()
Vector V
0 1
n-1
.
scan
KS (n-1)
Event Sink (n-1)
handleEvent (n-1)
(exec) action
Attraction
agent
Hotel agent
Auto agent
Billing agent
control
db
client
Observation:
best solution: publish the contract data and let all of them bid.
Summary - Blackboard
Application Domain
Suitable for solving immature and complex AI problems
The problem spans multiple disciplines, each of which has complete different
knowledge expertise
Optimal, partial, or approximate solution is acceptable
Exhausted searching is impossible.
Pros
Scalability: easy to add new knowledge source
Concurrency: all knowledge sources can work in parallel
Reusability of knowledge source agents
Cons
Tight dependency between the blackboard and knowledge source
Synchronization of multiple agents is an issue
Debugging and testing of the system is a challenge.