Expand description
A simulator capable of simulating Hyperactor’s network channels (see: [channel
]).
The simulator can simulate message delivery delays and failures, and is used for
testing and development of message distribution techniques.
Structs§
- Beta
Distribution - A beta distribution scaled to a given range of values.
- Latency
Config - Configuration for latencies between distances for the simulator
- SimNet
- SimNet defines a network of nodes. Each node is identified by a unique id. The network is represented as a graph of nodes. The graph is represented as a map of edges. The network also has a cloud of inflight messages
- SimNet
Handle - A handle to a running
SimNet
instance. - Simulator
Event Record - DeliveryRecord is a structure to bookkeep the message events.
- Torch
OpEvent - A pytorch operation
Enums§
- Latency
Distribution - A distribution of latencies that can be sampled from
- SimNet
Error - SimNetError is used to indicate errors that occur during network simulation.
- Training
Script State - The state of the python training script.
Traits§
- Address
- This is used to define an Address-type for the network. Addresses are bound to nodes in the network.
- Dispatcher
- Dispatcher is a trait that defines the send operation. The send operation takes a target address and a data buffer. This method is called when the simulator is ready for the message to be received by the target address.
- Event
- The unit of execution for the simulator. Using handle(), simnet can schedule executions in the network. If you want to send a message for example, you would want to implement a MessageDeliveryEvent much on the lines expressed in simnet tests. You can also do other more advanced concepts such as node churn, or even simulate process spawns in a distributed system. For example, one can implement a SystemActorSimEvent in order to spawn a system actor.
Functions§
- simnet_
handle - A handle for SimNet through which you can send and schedule events in the network.
- start
- Starts a sim net.
- start_
with_ config - Starts a sim net with configured latencies between distances
Type Aliases§
- Simulator
Time Instant - Minimum time unit for the simulator.