Cantata is a graphically expressed, data flow visual language which provides a visual programming environment within the Khoros system. Data flow is a "naturally visible" approach in which a visual program is described as a directed graph, where each node represents an operator or function and each directed arc represents a path over which data flows.
The purpose in providing a visual language interface to the programs included in the Khoros system is to increase the productivity of researchers and application developers. By providing a more natural environment which is similar to the block diagrams that are already familiar to practitioners in the field, the visual language provides support to both novice and experienced programmers.
In cantata, the nodes (glyphs, or operators) represent programs from the Khoros system. Each of the hundreds of stand-alone data processing and scientific visualization programs in the Khoros system can be represented in the cantata visual language as glyphs.
To create a cantata visual program, the user selects the desired programs (and control structures, as needed), places the corresponding glyphs on the cantata workspace, and connects these glyphs to indicate the flow of data from program to program, forming a network within a workspace. Such workspaces can be executed, saved and restored to be used again or modified later. Workspaces may also be encapsulated into stand-alone applications with a very simplified graphical user interface so that they may be treated as independant Khoros applications.
Clik on this link to execute the above visual program.
The visual hierarchy, iteration, flow control, and expression-based parameters make cantata a powerful simulation and prototyping system. Cantata interprets the visual network dynamically to schedule glyphs and then dispatch them as processes. The cantata scheduler is event driven, rather than data driven or demand driven.
Glyphs are referred to as being "coarse grain" because each glyph corresponds to an entire process, not a code segment or a sub-procedure. Once a glyph has been scheduled, the dispatcher is responsible for determining the data transport, the communication protocol, and the process execution mode. The data transport between the glyphs can be permanent (using files or shared memory) or non-permanent (using sockets or streams). The communication protocol between cantata and the different glyphs can be as simple as just initiating process execution, or more complicated if glyph parameters must be continuously updated as the process executes continuously.
Glyphs may be executed locally or remotely to efficiently utilize a heterogeneous network of computers. Cantata utilizes a network execution daemon to negotiate the remote data transport and to spawn processes on remote machines. The visual programmer assigns operators to specific machines interactively; this may be done both to optimize execution speed and to fully utilize available hardware. Note that the remote machines to be utilized need not have a full Khoros installations, but must at least have a copy of the network execution daemon running in order to work with the remote transport mechanism.
Application specific domains such as image processing and geometry visualization typically process data as blocks; however, the domains of telecommunications and process control tend to process data as streams. Cantata glyphs can consume and produce data either in blocks or in streams.
The cantata visual language extends the basic data flow paradigm to make it a more powerful application prototyping or simulation environment. Data and control-dependent program flow is provided by flow control glyphs such as if/else, while, count, and trigger. Visual subroutines, or procedures are available to support the development of hierarchical data flow graphs. Variables may be set interactively by the user, or calculated at run time via mathematical expressions tied to data values or control variables.
Click inside the image to see inside the Procedure
In summary, cantata is used by the visual programmer to interactively develop visual programs by combining glyphs into a visual program or network.
Basics of Visual Programming using cantata.