130 likes | 298 Views
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
E N D
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. See also CPSC 416! http://en.wikipedia.org/wiki/Fallacies_of_distributed_computing
Blackboard Architecture • Components • Active Data Storage • Agents (aka Knowledge Sources) • Connectors • Data publication • Data subscription Active Data Storage publish/subscribe Agent C Agent A Agent B
Blackboard example • See (and clone) http://github.com/UBC-CS410/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 • Critical difference compared to database queries • Provides temporal decoupling • 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_koniecpol_norman_1998_1/sadeh_koniecpol_norman_1998_1.pdf
Contrast to other Arch. Styles • Just to point out a few differences… • No preplanning, support autonomous agents • Virtual Machine • BB does not focus on abstraction • Client/Server • BB generally has no server-side application functions • Dataflow • 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