Sims - Datomic/simulant GitHub Wiki
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/servicesreferences any Services needed by sim:sim/processCountis the number of processes the sim will use:sim/clockpoints to the sim Clock.:sim/processesholds 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/typedrives 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 providedconstruct-basic-simmethod, 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.