Blackboard Style and Blackboard Platforms

advertisement
Blackboard Style and
Blackboard Platforms
CPSC 410
Problem
In traditional programming:

We prefer to look at each component as a black box.
In concurrent and distributed programming:

We need mechanisms for controlling interactions between the
autonomous components





“Come and go as they please”
Turn on/off
Connect/Disconnect
Plug in/Plug out
Fail/Crash
Fallacies of distributed computing
 The
network is reliable.
 Latency is zero.
 Bandwidth is infinite.
 The network is secure.
 Topology doesn't change.
 There is one administrator.
 Transport cost is zero.
 The network is homogeneous.
http://en.wikipedia.org/wiki/Fallacies_of_distributed_computing
Blackboard Architecture
Active
Data
Storage
Agent A

Components





Agent C
Agent B
Active Data Storage
Agents (aka Knowledge Sources)
Connectors
Data publication
Data subscription
publish/subscribe
Lunar lander in BB style
Blackboard example


See (and clone) http://github.com/UBCCS410/PublicMessenger
Very simple demonstration using sockets.
Connectors: Blackboard Architecture

Data subscription


Agents can register interest in data using patterns (somewhat
like queries)
Subscription remains in affect until data is available


Provides temporal decoupling


Critical difference compared to database queries
Simplifying synchronization
Data publication


All communication between agents done by modifying active
data storage
Similar to traditional database updates except also trigger
notification to subscribers
Components: Blackboard Architecture

Active Data Storage




Database + Coordination System
Stores data
Also tracks which agents are interested in what data
Notifies agents when data is available



Pushes notifications to agents
Agent clients don’t need to poll
Agent


“Clients” of the blackboard
Different from Client/Server



Agents contain all intelligence in the system
There is no application layer server code
aka Knowledge Sources
Blackboard Example: CMU Robotics

“The CMU Navlab group builds robot cars, trucks, and buses, capable of
autonomous driving or driver assistance”

Data Storage


information the Robot knows of its environment
Agents

Robot parts/sensors

Actually software components that control robot parts
Robot parts share data and react to changes of environment
… But parts do not directly depend on each other
… Some parts can fail or be destroyed without compromising
the entire robot
Example:
Production
-line
scheduling

http://www.ri.cmu.edu/pub
_files/pub2/sadeh_koniecp
ol_norman_1998_1/sadeh
_koniecpol_norman_1998
_1.pdf
Contrast to other Arch. Styles

Just to point out a few differences…


Virtual Machine


BB generally has no server-side application functions
Dataflow


BB does not focus on abstraction
Client/Server


No preplanning, support autonomous agents
BB has bi-directional sending of data
Compared to all 3 above

BB has star-topology
Blackboard Platforms

Programming technology to implement
blackboard-based systems





Linda
JavaSpaces
GigaSpaces
Apache River/Jini
Supplanted by Web Services and Service Oriented
Architectures (next time …)
Midterm Review

Format:






45 minutes
Closed books
~25% multiple choice/T&F
~25% short answer
~50% diagrams, paragraphs (note form is ok)
Topics:



AOSA presentations up to today
Lectures up to today minus Oct 3
Readings not marked optional
Download