OVERVIEW & ALPHABETICAL LISTING
PART 1 of 4
Back to Index The index for this file is provided in the file index.html
that should be included in the distribution that this file was part of

 
Overview of manual


Alphabetical listing of concepts and terms

All major concepts in Psyclone are listed alphabetically below, in this file (Part 1), except for this first section called Overview of manual.

 

 

Introduction

You are looking at the Psyclone™ Manual.
Terms and concepts are listed alphabetically in each section below. PsyProbe is presented in the second half of this Part 1.

If you are new to Psyclone, you might want to take one of the Psyclone tutorials.

 

Conventions Back to Index  

  key concept or term
  C++ code
  Java code
  XML
code
  sidenotes and comments
  literal example
  
link_name_:: - opens a new page or jumps to another major section (in psyProbe).

Links listed in RELATED and READ MORE take you to other major sections dealing with the topics.

 

Distribution directory structure

Under each platform directory (linux, mac, windows) you will find the same directory hierarchy for Psyclone:

psyclone
  psyclone - the Psyclone executable
  dominosPsySpec.xml - example psySpec file (see tutorial)
  DOCUMENTATION.html - index into all documentation for Psyclone
  html
    LICENSE.txt
    QUICKSTART.txt
    psycloneManual.html (this file)
    psycloneManual2.html
    index.html

The QUICKSTART.txt is a flat text file that will tell you the vitals for getting started with this Psyclone distribution. Please read the LICENSE.txt file before proceeding.

The compiled C++ (.exe) and Java (.class) examples should run directly. If they don't, you must re-compile them using their source code (.cpp and .java).

All the Java examples are included in a separate download called JavaOpenAIR bsd.zip or JavaAIRPlug.zip, depending on the distribution you have. It contains the following:
    JavaOpenAIR.jar - enables Java programs to communicate with Psyclone
    JavaPoster.class - example program that posts messages to a whiteboard
    JavaReader.class - example program that receives messages from a whiteboard
    JavaTester.class - example program that pings Psyclone
    JavaPoster.java - source code for the poster
    JavaPoster.java - source code for the poster
    JavaTester.java - source code for the tester

JavaOpenAIR is an open-source version of AIR in the Java programming language, released under the BSD license.

Psyclone uses CoreLibrary, which is a library available from SourceForge under the LGPL license.

 

Operating system compatibility

Psyclone has been tested and compiled on various operating systems. Please refer to the download site for Psyclone nc or contact CMLabs if you have questions about compatibility with operating systems or compilers (please include as much information about your problem as possible, including your OS version, machine type, amount of memory, as well as nature of any problems encountered).

 

Psyclone quick introduction

Psyclone is a platform for simplifying the construction of complex software systems, bridging between operating systems, programming languages and discrete and streaming data.

Psyclone is built on a coherent philosophy and consists of several elements. This overview picture may give you a handy overview of the main components, current and future, of the Psyclone platform (gray area = functionality and philosophy; red = Psyclone proper; orange = OpenAIR; white = CoreLibrary):

Psyclone uses XML to externalize several things that often require changing during the development (or at runtime) of a system. These include method calls to C++ (see cranks), subscription to information (see messages and streams), various global parameters (see Writing a psySpec).

Psyclone comes with adapters - called AIR plugs - for enabling external executables to be used as modules. Psyclone acts as a central connection point for modules, or message server, using a construct called a whiteboard. Whiteboards support information transfer using a publish-subscribe mechanism. This combination of features alleviates the need to connect modules together with custom code, and makes it really easy to change the way modules are wired together.

Psyclone introduces a few terms that may be new to you:

psySpec A central file that is used to manage a system consisting of various programs from one location via Psyclone. Modules, messages, cranks etc. (see below) are all defined here in a really nice and tidy manner.
module Processing in Psyclone is done by entitities called modules, which can be free-standing executables or libraries loaded into Psyclone. Vision modules process video; display modules display images; planning modules make plans.
contexts

A system for defining and managing a set of architecture-wide global variables. Modules in Psyclone can be "context-driven": A module can use one or more contexts to decide when it should be active. The hierarchy is like this in a module:
MyModule
   context1
     phase1+crank1
     phase2+crank1
   context2
     ..

phase A Psyclone module can have one or more phases (states). Each phase belongs to a single context (there can be more than one phase per context). Each phase has a single crank. See hierarchical explanation above for relationship between phases, cranks and contexts.
trigger A module registers which message types it wants to get triggered by; it gets woken up when a message of that type gets posted to a whiteboard.
whiteboard A special type of blackboard or infobus that acts as a central connection point for modules.
crank What a module does when it is awoken with a trigger - if it's a vision module it will process video; if it's a display module it will display something. Think "method".
stream A data stream is a "named pipeline" which you can use to send bytes from one place to another.
Message Messages in Psyclone can travel as XML over TCP/IP connections (in-memory for internal modules).

 

 

 

 

 

 


 

Psyclone Alphabetical listing of concepts and terms  

 

AIR / OpenAIR

AIR is the message layer of Psyclone. Psyclone is Fully OpenAIR Compliant. OpenAIR is never used directly by users of Psyclone, however, calls are made to it via CMLabs AIRPlugs, which make hooking external programs to Psyclone easy. Including an AIR Plug in your code allows your program to communicate seamlessly with other Psyclones running anywhere in the world, through any TCP/IP (IPv4) network including the Internet, even through firewalls and home ADSL routers. 

RELATED: AIR plugs JavaAIRPlug JavaOpenAIR CppAIRPlug  OpenAIR specification AIRCentral

 
AIRCentral

AIRCentral is the central blackboard in any AIR-based system. It is necessary to make sure that messages have at least one place to go in a "bare-bones" system.

RELATED: whiteboards AIRPlugs JavaAIRPlug JavaOpenAIR CppAIRPlug  OpenAIR specification AIR

 
AIR plugs

CMLabs calls its non-open-source AIR adapters "AIR plugs". These are code libraries that implement the AIR message and routing protocol. The adapters are used for external executables to easily hook them into Psyclone. AIRPlugs are available in Java and C/C++ at the time of this writing, and will be available for various programming languages over time.

Related: AIR JavaOpenAIR CppAIRPlug

 
after=

A parameter of the trigger message as specified in the psySpec. Specifies that the triggering should happen a certain number of milliseconds after the listed message type is posted. Example:

  <trigger after="2000" type="System.Ready"/>


RELATED: message type

 

Blackboard   

A blackboard is a special kind of information and data store, meant to keep global state of an evolving system, often at multiple levels of representation detail. The blackboard also is a way to keep global state for a system. Although used primarily in A.I. for systems trying to understand its inputs in order to respond intelligently, blackboards are can be extremely useful for building systems with complex, evolving states, as well as for systems with distributed processing. Psyclone's whiteboards are a special implementation of a scheduling blackboard.

RELATED: whiteboards

 

Boostrapping the system  

In an event-driven system there is always the question of which event is the initial one. When Psyclone starts up it creates the Whiteboards first and then it posts a message called Psyclone.System.Ready. You can start your system by using this message type as a trigger for one of your modules. You can also attache timing to the startup of your modules using the after= parameter in the trigger specification:

   <trigger after="500" type="Psyclone.System.Ready"/>

This will trigger the module 500 milliseconds after the message Psyclone.System.Ready has been posted.

RELATED: whiteboards triggers

 

Catalogs  

Catalogs are components that can provide access to large amounts of data and that have a query mechanism built in. Catalogs are a way to abstract access to information. Catalogs follow a simple query-response pattern that is separate from the whiteboard messaging system. There are two catalogs built into Psyclone: FileCatalog, which provides an easy API to reading and writing files in a runtime specified location, and Persistent Record Storage Catalog, which provides modules with the ability to save their state or data for later reloading, in the present runtime system or at a later time during a different run. A generic catalog is typically created using the SDK and loaded into Psyclone from a dll.

Any module in the Psyclone system can ask a catalog a question and receive an answer back, without actually having to know the format of the data stored. An example could be a large SQL database with proprietary information, where modules need to extract names and addresses, but cannot know the format of the database. A Catalog could be constructed with a bit of code, which can receive questions from modules, then search the database and provide an answer back. Another hypothetical example is a Google Catalog, where modules can ask a question and get search result URLs back, without having to know how to communicate with Google. A third example is for learning, where some modules add data to a knowledge base and others ask questions about the data.

 

Console / command line  

Psyclone is started from the command line in a console window.

  Example (Linux):
  >./psyclone port=20000

Command line parameters that can be passed into Psyclone:

PARAMETER VALUE EXAMPLE COMMENTS
port= [portnumber] port=10000 This is the only required parameter. Must be a positive integer above 1024
spec= "[path][valid psySpec]" spec="../myPsySpec.xml" The path is optional
 1 ... 4 verbose=3 How much run-time info Psyclone prints to the console
html= "[path]" html="html" Where Psyclone's built-in Web server can find the HTML files. Default is 'html'.
psycloneport= [portnumber] psycloneport=10001 This will override any specification of Psyclone port in the psySpec and the default, which is 10000

 
Constructionist AI    

Constructionist AI is a general methodology in that facilitates the development of large artificial intelligence systems. An example of a methodology following the philosophy of Constructionist AI is the Constructionist Design Methodology described on the MINDMAKERS site. The main premise of Constructionist AI is to develop tools, principles and mechanisms for helping AI researchers construct enormously large systems with more speed and efficiency.

RELATED: CAI

 
Contexts

Contexts are global states in Psyclone. They can be used to manage the runtime behavior of modules. Contexts are defined as a tree, e.g. Root.Branch1.Branch2 or A.B.C.D; in a typical system specific modules are used to post contexts and manage transitions between them. The syntax of contexts is period-delimited — they look exactly like message types.

Example: If we create a system that records the color of people's garments as they walk by a camera pointed out the window we might have a people-detecting module that detects the presence of people and several color-estimation modules that estimates the color of clothing (each module is a specialist in a particular color). We now create a context called People.Present. The people detector will post this context whenever it detects people and the color modules will then be in-context and thus will be able to process the video. When people are not present the people detector will post a different context, People.Absent. As soon as People.Absent context is posted, Psyclone will list the color modules as out of context, they would receive no triggers from that point on, and hence, would not run until People.Present was posted again.

A context is specified in the psySpec using the <context> tag in the <module> spec. All modules have a context in which to be active (having no context specified is like having the global, top-level context). A module can have more than one context specified, however, at runtime a module picks one and only one of its contexts (the last one posted) in which it is active.

The dot notation in the above examples is always used to build the context tree. To post a context use the Psyclone.Context message type and append :<myContextName> after it, where <myContextName> is e.g. A.B.C.D or Root.Branch1.Branc2. Notice the use of colon for separation, resulting in an actual posted message type of Psyclone.Context:Root.Branch1.Branch2. (Expert point: This posted message type is an actual message posting event, so context postings can also be used as triggers — i.e. any module can be triggered off a context posting.)

There is no use of wildcards in context notation.

 

CoreLibrary    

Psyclone builds on the CMLabs CoreLibrary for many of its basic functions. CoreLibrary is a multiplatform object library for C++ (Linux, Win32, MacOSX, PocketPC). It provides many of the common objects found in Java (Strings, Threads, Collections, etc.) and has the ability to send objects across the network.

RELATED: CoreLibrary on SourceForge

 

CppAIRPlug

CppAIRPlug is CMLabs' C++ implementation of the OpenAIR specification from MINDMAKERS.ORG. CppAIRPlug is 100% AIR compliant.

RELATED: AIR JavaAIRPlug JavaOpenAIR OpenAIR specification

 
Cranks

A crank is a Psyclone term for a method which can be referenced from the psySpec as part of a module's functioning. All modules have one crank per phase [example].

Cranks are specified in the phase part of a module. When a module gets a wakeup its crank gets run. Typically the first thing that the crank should do is check the trigger message or the retrieved message whether it makes sense for it to run the main part of the crank, which typically involves computing what the module is made for computing.

RELATED:  psySpec phases wakeup

 
External modules

External modules are written to connect to Psyclone but to run in their own process space. External modules can run on the same machine as or on a separate machine from Psyclone. Additionally, external modules can be started manually or they can be started automatically with special configuration for the module in a psySpec.

Like all modules, external modules register with whiteboards for triggers (message and stream types), and post results of their processing to whiteboards, in the form of messages and/or streams. External modules use AIRPlugs to connect and talk to Psyclone. Even though the external modules live outside Psyclone, their phases, triggers, cranks, parameters and contexts can still be defined in a psySpec; doing so has several benefits, among others to increase the speed at which the whole system can switch between system-wide states, so-called contexts.

RELATED: modules internal modules whiteboards contexts

 

FileCatalog

The FileCatalog allows a module to read a write files from a name location specified in the PsySpec. It uses the generic Psyclone catalog functionality but is built directly into Psyclone and therefore available to be used by any module, internal or external. The FileCatalog has Catalogs can have any number of parameters and is typically created using the SDK and loaded from a dll.

RELATED: catalogs StorageCatalog

 

Internal Modules  

Like External Modules, Internal Modules can be configured in the psySpec with triggers, retrieves, posts and cranks. Cranks are code infused from external libraries (dlls on Windows and Shared Objects on Linux and Mac), meaning these run inside Psyclone, which typically makes them run much faster than External Modules. Cranks for Internal Modules are created using the Psyclone Software Development Kit (SDK).

Note: The nature of dynamically loaded libraries where they are loaded and unloaded periodically means that static and global variables loose their meaning. When creating internal crank functions do not use global or static variables in your code. Furthermore, on some UNIX systems such as Linux you will get errors when trying to load a library with static or global variables, usually complaining about an undefined symbol: __dso_handle. If you see this, go through your code and remove all global and static variables.

RELATED: modules external modules OpenAIR specification whiteboards

 

JavaAIRPlug

JavaAIRPlug is CMLabs' advanced Java implementation of the OpenAIR specification from MINDMAKERS.ORG. (For the open-source version of JavaAIR see JavaOpenAIR.) Like JavaOpenAIR, JavaAIRPlug is 100% AIR compliant.

RELATED: AIR OpenAIR specification CppAIRPlug JavaOpenAIR

 

JavaOpenAIR

JavaOpenAIR is CMLabs' Java open-source (BSD license) implementation of the OpenAIR specification from MINDMAKERS.ORG. (JavaAIRPlug is CMLabs' advanced version of OpenAIR, and is 100% AIR compliant.)

RELATED: AIR OpenAIR specification CppAIRPlug JavaAIRPlug

 

maxcount=

The maximum number of messages that a whiteboard should hold at any one time.

RELATED: whiteboards

 
maxsize=

The maximum size, in megabytes, that a circular media stream buffer can hold. Once the maximum is reached the oldest data starts to get overwritten.

RELATED: whiteboards

 
MediaConnection

A MediaConnection object provides access to a media stream.

RELATED: media streams

 
Media streams

A media stream is a type of streaming data that a whiteboard can make available on a subscription basis. Streams is a more efficient mechanism for transporting data between modules in cases where the meta-information about the data doesn't change. It's interface (API) is very similar to the message API.

RELATED: whiteboards

 
Message type / stream type ontology

Using an ontology to define message and stream types can grately enhance the future flexibility of a system, making it easier to (a) change, (b) integrate with external, unknown systems, (c) expand and build upon. To make an ontology for message types, each level in a dot-delimited message type graph (TopLevel.Sub1.Sub2.Sub3.Etc.LeastSignifLevel) is carefully defined so that other users can use the levels to describe their own message types.

The top level should always be a unqiue root. For example, if a company called XYZ creates its ontology, putting XYZ as the top-level makes all subsequent type identifiers unique to that company. Defining rules for how to use the sub-identifiers makes use of the message type ontology more consistent. For example, if XYZ builds speech recognizers, it might have several levels dedicated to the type of pre-processing that the audio goes through. Hypothetical message type in such an ontology could be XYZ.Audio.Raw and XYZ.Audio.Filtered.EchoCancellation.Stage1.

 
Messages

Messages in Psyclone are formated in XML according to the OpenAIR specification. Psyclone is fully OpenAIR 1.0 compliant; the slot format for messages is specified here.

Message names follow the OpenAIR specification of message types, which uses a dot-delimited string where the first part indicates the root namespace, and the subsequent segments describe the type of content that the message relates to, of increasing specificity from left to right.

The following table is provided as a quick reference only; the full spec can be found here. Implementations of OpenAIR can be found here.

 

SLOT NAME CONTAINS COMMENTS
Type Dot-delimited type Example: Input.Audio.Raw
ID Global unique identification tag  
From Name of module that posted the message  
To Name of whiteboard to receive the message  
cc Name of module(s) to receive a copy of the message (whether the module registered for its type or not) Modules listed will receive the message whether they registered for its type or not
PostedTime Timestamp (in milliseconds) when the message left the module which posted it Ex: 2004.02.0001 12:20:41:129 Reflects the moment of the call to post( ) to within a microsecond or less, under normal operation
ReceivedTime Timestamp (ms) when the whiteboard (component listed in the To slot) received the message Ex: 2004.02.0001 12:20:40:128
Content & language

The content of the message — what the module whants to convey by posting it. Must be ASCII.

The language that the Content is expressed in, e.g. XML, Lisp, Python, HTML, Java Script, or unspecified.

The Content can be autoparsed by the whiteboard if it recognizes the message type and content format.
InReplyTo A single Reference to the Message to which this Message is a reply, grouped by the Reference tag  
Stored Name of the whiteboard where the message is stored  
History References to past messages relevant to this one. This feature not fully implemented in version 0.5
Comment Human-readable comment Can be used optionally as an extension slot

 

Modules

Modules in Psyclone are a way to organize function. Think "executable program". A Psyclone module can be (1) a stand-alone executable that executes in a regular manner as any program would, running in a computer's operating system (to do so the executable uses a Plug, e.g. JavaOpenAIR); a Psyclone module can also be (2) an internal library that is loaded into Psyclone.

Modules are essentially conceptual constructs which help organize the creation of large Psyclone systems. Modules register with whiteboards for triggers (message and stream types), and post results of their processing to whiteboards, in the form of messages and/or streams. Internal modules are specified in the Psyspec; external modules use OpenAIR / AIR plugs to connect and talk to Psyclone.

RELATED: internal modules external modules whiteboards

 
Network    

Psyclone allows you to run your system as multiple executables that communicate via messages or streams. Here are the main topics on networking:

For standard message passing Psyclone relies on TCP, even though other delivery messages might be added in the future. Each component will autodetect whether the receiver of a message is located in the same physical executable, in which case it will be delivered directly through memory. If not, it automatically opens a TCP connection to the receiver if one is not already open, and sends the message. If a connection fails, it will be automatically reconnected if possible and only after two retries will the message parsing fail with notification to the sender.

When a module connects to Psyclone through a firewall or some other unidirectional routing device and it suspects that Psyclone cannot connect directly back to it, the module can open a two way connection to the components inside Psyclone. This means it will hold a normal sending connection as well as one additional receiving or callback connection, acting as if the remote component had actually connected back to it in the first place. The remote component will automatically use this latter connection when sending messages if this is available. If this connection is broken, the module will automatically re-establish this if possible or keep retrying until successful.

If Psyclone loses a connection with an external module and needs to send a message to it, it will retry twice for every message, before giving up. This will of course slow down Psyclone a bit as it can take up to 50 milliseconds to retry a connection, so in the future Psyclone might try for a set number of times and then unregister the module completely, waiting for it to reregister when it again is available.

 

Persistent Record Storage Catalog

The Persistent Record Storage Catalog (StorageCatalog for short) allows a module to save persistent data that can be reloaded again after a Psyclone shutdown. It is built into Psyclone and therefore available to be used by any module, internal or external. A generic catalog can have any number of parameters and is typically created using the SDK and loaded from a dll.

RELATED: catalogs FileCatalog

 

Phase

Psyclone modules use the concept of phase to implement a simple sequencer that cycles through a set of local states (phase = local module state). Typically, when the module posts a message, it will change its phase (see phase change). A module can have one or more phases; all phases need to belong to a context; when the context is true, the phases can be triggered.

So a module can go through a series of states — phases — within one context. Say for example that a module is processing raw images in the context Scene.Normal. This module may then start by looking for any motion (a) and when this has been found, then look more specifically at the motion in the immediate surroundings of the moving object (b). The third phase could then be a boundary detector (c) and when a good boundary has been found, the module posts this and goes back to looking at the whole scene to find more objects. So we have the module processing for context:

Scene.Normal: a-b-c-a-b-c-a- etc.

If the scene then becomes dark all of a sudden, the global context may change to Scene.Dark and the same module may continue doing the same Scene.Dark: a-b-c-a-b-c-a- etc. or may use one or more completely different algorithms (= cranks) Scene.Dark: a-b-k-a-b-k-a- etc. or even Scene.Dark: e-f-k-e-f-k-e- etc.

RELATED: phase change

 
Phase change

When a module posts a message, the posting of the message can cause the module's next phase to be activated. This is called a phase change. Psyclone changes the phase of a module A (i.e. de-activates the triggers for the current phase and activates the triggers for the next phase in line) when a message posted by module A has the phasechange parameter (in the psySpec specification of the module) set to "yes". The module can also explicitly change phase by posting a message of type Psyclone.Module.PhaseChange. It is always the next phase in line that gets activated, as specified in the psySpec.

RELATED: psySpec tutorial phase

 
Phase spec

When a module gets triggered — i.e. a message that the module registered for gets posted — Psyclone sends a Wakeup message to the module. The content in that message contains specifications for which message types to retrieve and which crank to run.

RELATED: psySpec tutorial cranks

 
port     

The Internet Protocol (IP) port number at which psyclone is running. This is provided on the command line when Psyclone is started.

RELATED: running Psyclone

 
post    

When a module sends out a message it is called a post.

The temporal model adhered to in Psyclone is that stamping a message with the postedtime is the very last thing a module should do before posting it. The assumption is therefore that at this moment in time, when the postedtime was written, the module gave up control of the content of the message and the transmission is ballistic. Therefore, the semantics are that the content of any message is assumed to be accurate up until the postedtime — after that the message was not under the control of the module any more and may or may not reflect accurately what it refers to.

RELATED: modules messages postedtime

 
Priorities of Messages & Modules

Priorities of messages and modules can be set in the psySpec as well as at runtime.

RELATED: message and module priorities

 
PsyclonePro / Psyclone nc  

Psyclone comes in two main flavors, PsyclonePro and Psyclone nc. The latter is available as a free download from http://www.mindmakers.org/projects/Psyclone/. The other is available in academic and industry versions.

 
psyProbe  

PsyProbe is the web-based interface for Psyclone. 

RELATED: using psyProbe psyProbe glossary

 
psySpec

The psySpec holds setup specifications for the system. Loaded at Psyclone startup. The paths that Psyclone will check automatically, relative to the directory that Psyclone was run from (if no path is specified), are:

   ./
   ../
   ../../
   PsySpecs/
   ../PsySpecs/
   ../../PsySpecs/
   psySpecs/
   ../psySpecs/
   ../../psySpecs/
   Psyspecs/
   ../Psyspecs/
   ../../Psyspecs/
   psyspecs/
   ../psyspecs/
   ../../psyspecs/

RELATED: running Psyclone

 

Pub-sub (Publish-Subscribe)  

Phrase that refers to the mechanism of routing information by individual modules publishing and subscribing to types of data. In Psyclone information is given types, typically represented as period-delimited strings, e.g. My.Data.Type or Input.Hearing.Voice.Human, which modules can subscribe to. Publishing of information is done via (one or more) whiteboards; subscription is done to the whiteboards as well. The whiteboards contain the information needed to route any published information to those who have subscribed to it.

 
Registration

The contexts, phases, triggers, retrieves and cranks specified for a module in the psySpec is called a registration. In addition to up-front specification of this via the psySpec any module can update its registration at any time during runtime.

 
receive / receivedtime    

When a module receives a message it will timestamp it with the time of reception - this is the receivedtime. The temporal model in Psyclone assumes that the receivedtime timestamping is the very first thing a module does when it receives a message, to reflect as well as possible the actual time of message arrival.

RELATED: post postedtime

 
retrieve / retrieve spec  

A module can retrieve messages and streamed data from whiteboards. Which data type to retrieve can be specified in the psySpec and also done at runtime. Example XML for such retrieval:

  <trigger from="WB1" type="Input.Sens.MultiM.Vision.Human.Found.True"/>
  <retrieve from="WBX" type="Input.Sens.UniM.Hear.Human.Voice"/>
  <retrieve from="WBX" type="Input.Sens.MultiM.Vision.Human">
    <latest>3</latest>
    <lastmsec>8000</lastmsec>
  </retrieve>

The first retrieve asks to be sent a message of type Input.Sens.UniM.Hear.Human.Voice along with the message type Input.Sens.MultiM.Vision.Human.Found.True to which it has subscribed; the second retrieve asks to be sent a message of type Input.Sens.MultiM.Vision.Human along with that, but with the conditions that if there are more than 3 such messages in the last 8 seconds it will only return the 3 most recent of those. All conditions that are listed like that are ANDed together.

Retrieve specs can be tied to particular contexts. For example,

<retrieve from="WBX" type="Input.Sens.UniM.Hear.Human.Voice"/>
  <aftercontext>
SoB.Alive.SoS.Awake.DialogOn.I-Have-Turn</aftercontext>
<retrieve>

means that all messages of type Input.Sens.UniM.Hear.Human.Voice will be retrieved if they were posted after the context SoB.Alive.SoS.Awake.InDialog.ItookTurn was posted (using postedtime). Other tags that are available are <duringcontext> and <beforecontext>. The latter means any time before the context was posted (was active); the former means anything that is not included in the conjunction of the other two, that is, anything that is not retrieved by calling both <beforecontext> and <aftercontext> on the same context. During means any time between this context last became active and subsequently became inactive. The syntax can also specify these conditionals as parameters:

<retrieve from="WBX" type="Input.Sens.UniM.See.Person" beforecontext="SoB.Alive.SoS.Asleep">

RELATED: whiteboards psySpec using retrieves

 

Satellite Server

Psyclone can be set up to automatically start programs, modules and whiteboards on remote computers. To do this Psyclone needs to be running on the remote computer(s) in satellite server mode. To start up Psyclone in this mode use the following command line parameter:

  >./Psyclone -satelliteserver

The switch makes Psyclone run in 'damon' mode (as a standard UNIX daemon), and thus uses almost no resources when idle. This allows for allowing easy and automatic startup of whiteboards, internal and external modules on a remote computer.

So a Satellite server merely provides a way to run a module or a whiteboard on another computer, and is therefore part of the server system. To take an example, imagine that your AI application initially can run on one computer, and support 100 users. When you need to support 300 users you buy two more computers: continue to run your main Psyclone on the original computer but start up a Satellite Server (Psyclone in daemon mode) on the new computers. In the PsySpec you give each of these two Satellite Servers a logical name, <satellite name="server2" ....> and <satellite name="server3" ....> and you specify some of your modules to run on the other servers, e.g. <module name="bla" satellite="server2">. This is an easy way of distributing your application onto many computers without having to worry about communication, synchronisation, etc.

RELATED: Satellites

 
Satellites (a.k.a. starting up modules or whiteboards remotely)

A Satellite is a feature of Psyclone that is used if you want to:

• automatically start your external modules on another computer
• automatically start your internal modules on another computer
• run a Whiteboard on another computer

To use the satellite feature of Psyclone you run Psyclone in satelliteserver mode Satellite Server on another computer or computers. By specifying which modules and whiteboards should be started remotely in the psySpec the Satellite Server will start a Psyclone "Satellite" on the remote computer(s). Executables for external modules and library versions of internal modules will need to be placed on the remote computer(s) on which they are supposed to run.

RELATED: psySpec satellite server

 
Scheduling

Messages with the same priority level Psyclone will be transmitted in-order; whiteboards use a FIFO as their main scheduling mechanism. However, when using messages, a message at a higher priority level will be sent before a message at a lower priority level.

RELATED: priorities of messages and streams

 
SDK

The Psyclone SDK fully enables the creation of internal modules (aka crank libraries).

 
spec=

Command-line parameter for Psyclone, spec=<psySpec xml file>, where <psySpec xml file> is the name of the file containing the psySpec xml. The file can be located in the same directory or in a separate directory called psyspecs.

RELATED: starting Psyclone psySpec

 

Streams

See Media Streams.

 
StorageCatalog

See Persistent Record Storage Catalog.

 
Throughput / priority

Whiteboards will put messages through as fast as they can. If they are overloaded and messages have priorities, highest-priority messages will be handled first. Streams have all equal priority and thus equal throughput. Streams are higher priority than messages.

RELATED: whiteboards

 

Trigger

Modules in Psyclone use the concept of triggers to get alerted about when it might be their turn to compute. A module registers with Psyclone for triggers, at which point it may get woken up when any of those triggers get posted.

When a module registers a subscription with a whiteboard all previous message types that the module subscribed to will be replaced. Psyclone prints replaced all previous triggers with 1 new triggers and 0 new retrieves to the console when this happens.

 

verbose=

Command-line parameter for Psyclone, verbose=n. Controls the amount of basic output from Psyclone at the console.

Possible values of n:
0 - System default, minimal output; severe errors only, no runtime printout after startup
1 - verboseness 0 + normal errors and warnings
2 - verboseness 1 + notification of each instance of the posting of a message from a module
3 - verboseness 2 + notification of each triggering of a module by some message
4 - verboseness 3 + notification of each instance of message retrieval by a module and module context switching

RELATED: spec= console

 

Wakeup

A module gets a wakeup message from a Whiteboard when a message type it has registered for gets posted to that Whiteboard. The message, which is of type AIR.Instruct.Wakeup, contains, in its content slot, a specification for how the module should behave as a result of the wakeup, in the form of a phase spec. If the module has been specified in the psySpec, this will contain the message types to retrieve, name of the crank to run and the next phase to go to.

RELATED: contexts phases psySpec

 

Whiteboards

There are three kinds of data storage in Psyclone: whiteboards, catalogs and specs. Whiteboards hold data at run-time, specs hold initialization data and catalogs hold both.

Whiteboards hold its data in two very different formats, as discrete messages and as continuous streams. Messages are like email: You receive a message and that it is that, unless you write back that is. Streams are like a phone call: You get a ring and you pick up, and there is something more coming; the whole thing continues until you hang up. During the phone call you know that what comes through is audio (as opposed to video or a fax).

The parameter maxcount limits the number of messages that the whiteboard can store at any one time. The value that this parameter takes is an integer (default value is 10000). Whiteboards can be set to store up to 65k messages. When the limit (maxcount=) is reached the whiteboard will start permanently erasing the oldest messages. All messages on a particular whiteboard are guaranteed to be permanently available on that whiteboard until its upper limit is reached. (A future planned feature will enable the whiteboard to move old messages to a database instead of permanently deleting them.) The OpenAIR message slot time-to-live of messages is not parsed or used by whiteboards.

Psyclone posts several messages on the AIRCentral whiteboard at startup. The most important of these is the Psyclone.System.Ready, which can be used to automatically trigger the startup of other modules. The message types that Psyclone posts are:

Psyclone.System.Report.Spawn.InProgress When the whiteboards have been created Psyclone starts to create the rest of the system. This message denotes the point at which this happens.

Psyclone.System.Report.Status.Whiteboards.Spawn.Complete

"Complete" message types denote the time at which the particular acitivity previously reported ended.
Psyclone.System.Report.Modules.Spawn.InProgress When modules start to get created.
Psyclone.System.Report.Status.Modules.Spawn.Complete "Complete" message types denote the time at which the particular acitivity previously reported ended.
Psyclone.System.Report.Services.Spawn.InProgress Services start their creation.
Psyclone.System.Report.Spawn.Complete "Complete" message types denote the time at which the particular acitivity previously reported ended.
Psyclone.System.Report.Status.Ready This is the final message type posted by Psyclone before the first and only Psyclone-generated context gets posted.
Psyclone.System.Ready A context which denotes that all spawning has been completed.

 

RELATED: max= blackboard contexts

 

 

 

 

 

 


 

 

psyProbe Alphabetical listing of concepts and terms

 

Introduction

psyProbe is the web-based interface for Psyclone. Use it by typing the following into the URL box on your browser:

http://[machine]:[psycloneport]

where

[psycloneport] is the port specified for psyProbe in the psySpec, or the port given for it as a command line parameter (if neither is given it defaults to 10000), and

[machine] is either the IP address for the machine that Psyclone is running on, or its network name, or the word "localhost".

For example, if your machine's name is "matrix" you could type

http://matrix:10000

into your browser. You can also type

http://[IPaddr]:10000

where [IPaddr] is the Internet Protocol address of your computer. (find the IPaddr of your current computer here or here)

Notice: PsyProbe uses Javascript extensively — remember to turn it on in your browser's preferences.

Notice: You should use http:// in the path as most browsers do not default to this protocol by themselves. 

 

Active contexts / Known Inactive Contexts

The first column lists all currently active contexts; the second column lists all contexts that are known to Psyclone and are currently incompatible with the active contexts or have not been posted as being active.

 

 

Alphabetical listing of concepts and terms

All major concepts in psyProbe are listed in the section, in alphabetical order.

 

 

All Messages Page

Shows all messages posted in the system, starting with the most recent and going X messages back, where X can be controlled in the control section.



Page Sections

Control Section : Here you can set how many messages are shown, and which ones.allmessages:table

Message Table : This part of the page lists all messages in table form.

 

 

#

This symbol appears on the leftmost in the row above the message table on the whiteboard page. The column it marks holds the numbering of messages on a whiteboard, which starts at 1 for the first message that gets posted to this whiteboard, and continues sequentially ad infinitum.

 

AIRCentral

AIRCentral is the name of the required blackboard in the AIR specification. The name is reserved.

RELATED: AIR AIRPlug

 

cc

cc is used to address a particular message to a particular module or modules. This is an optional feature of message posting and part of the OpenAIR specification.

 

computer IP address

The Internet Protocol (IP) address of the machine on which Psyclone is running.

 

computer name

The name assigned to this computer. Notice that this name is only visible to computers on the network if it has been registered on-line and is part of the Internet's name service.

RELATED: computer IP address

 

content

Content refers to the payload of messages. It can be any valid ASCI characters, but is typically valid XML.

RELATED: result messagetype messages

 

content filter

Content refers to the payload of messages. (Some messages have no payload.) Use this section to filter out a subset of the messages to be shown, based on the content of the messages. Use the input field to filter messages on any ASCII string in the content of the messages listed in the table below. For example, *clone* will filter out all messages except those which contain the string "clone" somewhere in the content.

RELATED: message format content

 

Contexts + Phases page  

This page contains information about the active contexts, as well as listing all the phase information about the modules which Psyclone knows about.



Page Sections

Active Contexts / Inactive Contexts: The Active Contexts box shows the contexts currently active in the running system - a list of all contexts that have been posted as being currently active. The Inactive Contexts box holds a list of all contexts that are known to Psyclone and are currently inactive (in the case of this page the list includes contexts that were inactive when the Web page was refreshed).

Post Context: This section allows manual context switching by posting context messages. The posting works like the post message page. You only have to specify the context name and press the post button, a message will automatically be posted of the type Psyclone.Context:[context type] where the last part is the context name you provide in the dialog box. A context can be a modification of an existing context or a completely new context. The context message type is of the same kind as other message types. The context message content is typically left blank.

Internal Modules: Contains a list of all internal modules currently running in Psyclone, as known to the system, and all relevant context and phase information for each, as known. The next phase button will switch the module to its next phase as long as it has more than one phase for the current context and the phases are specified in the psySpec.

in context: the context that the module is currently in.
current phase: the current phase that the module is in, if it has any phases.
triggers: message types that trigger this message.
posts: the message/stream type(s) that this module posts.
all contexts: a list of all contexts that are relevant to this module.

External Modules: Contains a list of all external modules currently running in Psyclone, as known to the system, and all relevant context and phase information for each module, if specified in the psySpec or with a registration. The next phase button will switch the module to its next phase as long as it has more than one phase for the current context and the phases are specified in the psySpec.

in context: the context that the module is currently in.
current phase: the current phase that the module is in, if it has any phases.
triggers: message types that trigger this message.
posts: the message/stream type(s) that this module posts.
all contexts: a list of all contexts that are relevant to this module.

 

count  

The number of media streams defined for a whiteboard.

 

cpu usage  

The processing power used by Psyclone on the computer it's running on, as measured when the page was last loaded. The numbers are: current cpu usage / last 10 seconds average / average since Psyclone startup.

 

cumulative

The total number of messages, since Psyclone was started, that the whiteboard has transmitted to modules that have registered for that messages with the whiteboard.

 

curr size  

The current amount of binary data stored in a whiteboard. (The media streams feature is currently not available in the free version of Psyclone.)

 

curr count

The total number of messages that are currently stored in a particular whiteboard. This number is equal to or less than total received, as messages may be deleted, persisted to disk and/or deleted.

 

dispatched

The total number of messages, since Psyclone was started, that the whiteboard has sent to modules that have registered with the whiteboard.

 

External Modules section

Contains a list of all external modules that have registered with AIRServer.

posted time: the time at which the listed message was posted.
latest message type received: the type of the message that was last received by the module.
in: how many messages total has the module received.
out: how many messages total has the module posted.

RELATED: external modules external modules section internal modules internal modules section

 

from

The from in a message lists the (unique name) of a message's poster. This field is required when posting messages.

RELATED: cc to from filter

 

from filter

The poster of a mesage can be filtered using the dropdown selector (displays "Show All" by default). The selector is filled automatically as more message types are posted to the whiteboard.

RELATED: cc to message filter

 

 

Internal Modules section

Contains a list of all internal modules currently running in Psyclone, as specified in the psySpec.

posted time: the time at which the listed message was posted.
latest message type received: the type of the message that was last received by the module.
in: how many messages total has the module received.
out: how many messages total has the module posted.

RELATED: internal modules internal modules section external modules external modules section

 

Parameters

Settings of whiteboards and modules that can be changed from the outside (via the parameter API) are called Parameters. When tweaked, Parameters have a range over which they are valid (e.g. from 0.0 to 1.0), as well as units (e.g. integer, float, etc.), and type. (Note that these are a special type of Psyclone Parameters, not the kind of parameters as defined in XML tags.)

 

max

Determines the maximum number of messages a particular whiteboard can hold. As messages reach this threshold, old messages are deleted.

 

memory usage

Amount of RAM that the Psyclone executable is taking on the machine it is running, as measured from the time the page was last loaded.

 

message  

This column lists messages posted to the particular whiteboard listed at the top.

RELATED: about messages

 

messages

The total number of messages that have been received and stored for any period of time by the whiteboard, from the time the whiteboard was created.

 

message filter

The messages can be filtered by type, using a message type pattern, where star * is used as a wildcard. To do this, use the input box above the message type in the message table.

Example:If the whiteboard contains My.Message.Type.1, My.Message.2 and My.Message.3, a filter like this My.Message.Type.* would filter out the two second message types from the whiteboard list in the whiteboard page.

RELATED: from filter messagetype whiteboard page

 

Messages page

This page shows a table with selected (most recent) messages posted to the whiteboard.

RELATED: pub-sub to from content result whiteboard page

 

messagetype

All messages in Psylcone have a type. This can be any valid ASCII string, but is typically a period-delimited string, e.g. Input.Hearing.Voice.Human or My.Test.Message.Type.

RELATED: pub-sub to from content result whiteboard page

 

Module information

Describes the information about the module, as presently known to Psyclone.

 

Module page

This page is generated by Psyclone, using all information currently available to it about the module.


Page sections

Contexts+Phases: Lists the current Context that the module is active in (if the module is active - if it's not active the table is empty), the module's current Phase, as well as triggers, retrieves, posts and the crank associated with that Phase.

Recent Messages: This section holds the n-latest messages posted and recieved by the module, including triggers and retrieves.

setStatus() Data: Shows any content printed by the module using the setStatus() method. Any module can use this call anywhere in the code for debug or other information display purposes.

Runtime Data: Provides basic data about the module.

Full Module Spec: Provides the known registration specification about the module.

 

RELATED: crank phase context

 

port

The IP port number on which Psyclone is running. This is provided on the command line when Psyclone is started.

 

Post Message page

A facility to manually post messages to Psyclone whiteboards, using any standard Web browser. Any arbitrary message type and content can be specified, from one module at a time, addressed to any/all whiteboard(s), with a cc to any/all modules. Use the message type box to specify the message type, e.g. My.Message.Type; use the content box for constructing the content (all ASCII characters allowed). When a message is ready, use the post button to post the message to the whiteboard (and optionally selected modules) in the boxes above. The result section will provide feedback about the effect of the manual posting.



Page Sections

From: You must select the module that is going to be listed as the module posting your message. Click the cc to force any module to receive a Wakeup message in response to the posting, no matter whether they are registered for your chosen message type or not.

To: You must select the whiteboard(s) that should receive your message.

Post: You must specify a type of your message. Here you can also specify its content, if you want. Press the 'post' button to post your message. The result of the posting is printed once the posting is done.

result: When a message has been posted manually, the result (post message page) is displayed on the post message page.

 

RELATED: from to cc messagetype content result

 

Runtime information

Describes the runtime information about the module, as presently known to Psyclone.

 

PsyProbe main page  

This page is the top-level page for psyProbe, providing a comprehensive overview.



Page Sections

Whiteboards: Shows the contexts currently active and inactive in the running system.

rate: The rate of data streaming.

Internal Modules: Shows context and phase details on internal modules.

External Modules: Contains a list of all external modules that have registered with AIRServer.

System: Contains selected information about, and related to, the system on which Psyclone is running.

psySpec: The file that specifies the intial setup of Psyclone at start time. It includes the specification of all whiteboards and global settings for Psyclone and psyProbe. [tutorial]
psyclone port: the port that Psyclone is running on.
CPU usage: current / average for last minute / average since Psyclone started.
operating system: The name of the operating system that Psyclone is running on.
psyclone started: The system clock reading on the machine that Psyclone is running, at the time of initial startup.

 

PsyProbe main page  

This page is the top-level page for psyProbe, providing a comprehensive overview.



Page Sections

Overview: Shows general data related to the stream.

Publishers / Subscribes: If any modules, internal or external, are either publishing to the stream or reading from the stream, they will be listed in this section.

 

Stream Player page  

Stream Player is a Java applet that allows viewing the content of streams. Use the drop-down list to select which stream to view. The content of streams is displayed as bitmaps.



Page Sections

Dropdown list: Select the stream to be viewed.

Blank area at bottom: If Stream Player can display the data on the stream, it will be displayed in the bottom half of the applet.

 

Streams page  

This page shows the streams associated with a particular whiteboard, or a list if there are more than one. The names of the streams are listed in the bottom table. Clicking on any of the streams will open a page for that stream.



Page Sections

Overview: Shows data related to the streams on the particular whiteboard.

Stream Names: If the whiteboard has one or more streams, they will be listed in this section, one stram per line.

 

 

timestamp  

All messages in Psyclone are automatically timestamped when posted. The stamp follows the format HH:MM:SS:mmm, where HH is hour, MM is minute, SS is seconds and mmm is milliseconds.

 

to 

The to in a message lists which whiteboard(s) a message is/was posted to. This is a required field in all messages, and it must contain a valid whiteboard.

 

total

The total amount of data, since Psyclone was started, that the whiteboard has transmitted to modules that have registered with the stream on the whiteboard.

 

uptime

How long Psyclone has been running.

 

operating system 

The name of the operating system on the machine on which Psyclone is running.

 

Whiteboards section

This section of psyProbe lists all currently defined whiteboards in Psyclone, as specified in the psySpec.

cumulative: cumulative count of all messages received by whiteboard.
dispatched: total number of messages sent by whiteboard to modules.
curr count: how many messages the whiteboard stores currently.
max: maximum number of messages that the whiteboard can store.
count: the number of streams defined for the whiteboard.
total: total amount of data transmitted by the whiteboard.
curr size: total amount of data stored currently in stream buffers.
rate: rate of data streaming.

RELATED: whiteboards

 

Whiteboards Messages page   

This page lists a specific whiteboard currently running in Psyclone, showing a list of its current contents, as specified in the box (get [20 ] messages) that determines how many of the most recent messages to show in the list. The header on this page allows for automatic reloads of whiteboard contents at pre-set intervals (in the drop-down), manual refresh of whiteboard contents by pressing the refresh button, and lists whiteboard parameters. 


Page Sections

Control: This section allows you to control the refresh rate, as well as duplicating some basic whiteboard information from the main page.

Table: The table lists messages received by the particular whiteboard. This section above the table has controls that allow you to hide and show the content of the messages in two formats (none, tiny, full), filter by content (box on same line; use star * to indicate wildcards). It also allows you to filter the messages in the table by poster ("From" dropdown list), and by message type (use star * to indicate wildcards).

RELATED: whiteboards max= # timestamp messagetype from fromfilter cc messagetype filter

 

Whiteboard Streams page   

This page lists a specific whiteboard currently running in Psyclone, showing data on its current streams. (NB: The media streams feature is not currently available in the free version of Psyclone.)

Page Sections

Control: Here you can refresh the streams associated with the whiteboard. The page below these controls will be empty if there are no media streams associated with the whiteboard in question.

RELATED: max= whiteboards streams