Code Execution
When a message is delivered to an agent, the responsible notaries
must determine their idea of a correct response. (See also
Askemos' elementary operations.)
Agents (a.k.a actors) are purely functional, producing any
combination of three operations: a) intended state transition, b)
messages to be sent to other actors and c) new actors to create.
The type contract encodes the behavior of the agents. (See
executes (see also ) in Askemos.)
The notaries kernel will first locate the code of the behavior
the agents. The code is held at another place C. C's OID is
given in the property action-document
. See also the meta
data example .
Preconditions
The kernel loads C and checks it is a publication according
the to rules of passive replication. That C is:
-
readable by public
-
immutable constant
Execution
The code read from C may contain these method
elements:
- read: Invoked for idempotent requests.
- propose: Invokes to compute a local proposal to answer a
mutation request. This is input to the active replication
and the next method.
- accept: Invoked when the local proposal is committed to
permanent storage.
The code in these elements is interpreted in the "shebang"
language (BAIL), a language mostly there to invoke the
interpreter of the users choice.
The code is run for a limited time in a sandbox to produce an
answer.
Note: some elements of answers to meta information are managed
by the kernel. Agent may not be able to hide these.
Example
This is the code executed by backups of the application
used to maintain this documentation.
This table lists procedures to invoke the XdSLT language.