Expand description

An entity manager task handles the lifecycle and routing of messages for an entity type. One EntityManager per entity type. The EntityManager will generally instantiate the entities on demand, i.e. when first message is sent to a specific entity. It will passivate least used entities to have a bounded number of entities in memory. The entities will recover their state from a stream of events.

Structs

  • An envelope wraps an event associated with a specific entity.

Traits

  • An internal structure for the purposes of operating on the cache of entities.
  • Handles events, in form of event envelopes, to another type of envelope e.g. those that can be persisted using a storage technology.
  • Sources events, in form of event envelopes, to another type of envelope e.g. those that can be sourced using a storage technology.

Functions

  • Provides an asynchronous task and a command channel that can run and drive an entity manager.
  • Provides an asynchronous task and a command channel that can run and drive an entity manager.