Main /
Version0AccessorsSpecificationAccessor specifications are organized according to three levels described in the Accessors white paper (Interface, Component, and Composition). This page describes (or will describe) version 0 (the very first attempt) at a design for accessors. This is not the current version, but rather a snapshot of the first prototype. The current version under design is: Version 0.1 Accessors Specification. Add your ideas there. InterfaceThe interface of an accessor is given in XML according to a schema that is formally defined in the Document Type Definition (DTD) file. In version 0, the interface defines a class at the top level (a class of accessors to be instantiated by a host) that has:
The data types for inputs and outputs at this time include at least includes JavaScript primitive types. Port names for inputs and outputs are required to be valid JavaScript identifiers and not be JavaScript keywords.
ComponentThe script portion of an accessor specification gives the functionality of the accessor. In version 0 accessors, the script is a JavaScript that can include three function definitions that take no arguments:
In addition, the script may contain top-level JavaScript commands that will be executed when the accessor is instantiated. As with any JavaScript program, the script and the functions within it will be evaluated in a context that provides both core JavaScript functions and objects, but also a set of functions and objects that are specific to accessors. The main problem here is to agree on what these functions and objects should be. It took many years, for examples, for the makers of browsers to agree on the suite of capabilities provides to JavaScript in web pages (e.g., the Window object). At this time, the version 0 component context includes at least the following procedures:
The get() and send() procedures take an option channel argument, which suggests that multiple streams of data may be provided at a single input port and and output port may produce multiple streams of data (this design is inspired by Ptolemy II, but is certainly up for discussion).
CompositionThis is currently the most poorly defined part of the accessors version 0 specification. Composition of accessors has been demonstrated in Ptolemy II using the discrete-event (DE) director and (for some simple swarmlets), the synchronous dataflow (SDF) director. In the Node.js host, ad hoc scripted invocation has been demonstrated. |