Table of Contents
The blackboard is the central hub in the Mica architecture. All agents connect to the blackboard and all mobs are written to it. The blackboard is responsible for deciding which agents need to be notified when mobs are written and modified.
The standard Mica distribution includes 2 simple blackboards.
The SimpleBlackboard
stores mobs in a HashMap
.
The SQLBlackboard
stores the mobs in a table in an SQL database
and provides an SQL style language for searching for mobs. To use the
SQLBlackboard
a compatible SQL database needs to be available.
Included in the Mica distribution is hsqldb.jar
a binary
distribution of the HSQLDB database. To use this with the
SQLBlackboard
add hsqldb.jar
to the classpath.
<typedesc> <mobdecl name="text" > <slot name="utterance" /> </mobdecl> <mobdecl name="textFromUser" persistence="transient" > <parent name="text"/> </mobdecl> <mobdecl name="textForUser" persistence="transient" > <parent name="text"/> </mobdecl> <include file="myTypes.xml" /> </typedesc>
Figure 5.1. Example Type Definitions
As the blackboard is responsible for maintaining the mob type hierarchy the blackboard needs a means by which it knows what the type hierarchy is. With the standard Mica blackboard a developer can define the type hierarchy using a simple XML file. An example of such a file is shown in Figure 5.1.
When constructing these configuration files each mob type is
declared in its own mobdecl
element. This element gives
the name of the type and its default persitence. Inside the type
declaration you list the parent types and optionally the slots that
the type expects. As yet the slot information is not used except in
documenting the types for developmental purposes.
Inside the type definition files it is possible to use an
include
element to load types from a given file or
directory.
When loading the types the blackboards' default action is to
look in the config/type
directory of the
Mica.Home
directory which is by default the current
working directory. All .xml
files in this directory are
considered types definition files and are loaded.
For more details on the XML format of type definition files look
in types.dtd
.