Skip to content
stuarthalloway edited this page Feb 2, 2013 · 1 revision

A sim is an execution run of a test. A sim coordinates the activities of N processes, horizontally scaling the load of a test.

Simulant defines the following attributes for a sim:

  • :sim/services references any Services needed by sim
  • :sim/processCount is the number of processes the sim will use
  • :sim/clock points to the sim Clock.
  • :sim/processes holds a reference to the actual Processes of the sim. This attribute is managed by the framework, using a transaction function to coordinate processes joining.
  • :sim/type drives several multimethods used by the framework to distribute work across processes. If you are willing to have Agents distributed round-robin to processes, you can use the provided construct-basic-sim method, as the hello world example does.

Example

The hello world example performs the following steps in creating a trading sim:

  • creates the system under test
  • [installs] schema in the system under test
  • creates an initial state for the database. In a larger example, this initial state would likely be restored from backup.