Packages

trait Deployer extends AnyRef

Deployer deploys event-sourced entity repositories by assembling required interpreters and components.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Deployer
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. abstract type Deployment[F[_], RepositoryAlg[_[_]]]

    Handle on a deployed repository: the final type is to be specified in implementations

  2. abstract type DeploymentParameters[F[_], ID, S, E]

    Platform-specific deployment parameters: the final type is to be specified in implementations

Abstract Value Members

  1. abstract def deployRepository[F[_], ID, S, E, Alg[_[_]], RepositoryAlg[_[_]]](repository: RepositoryInterpreter[F, ID, Alg, RepositoryAlg], behavior: BehaviorInterpreter[F, S, E, Alg], sideEffect: SideEffectInterpreter[F, S, Alg, RepositoryAlg])(implicit arg0: Async[F], arg1: EntityIDCodec[ID], nameProvider: EntityNameProvider[ID], commandProtocol: CommandProtocol[ID, Alg], eventApplier: EventApplier[S, E], parameters: DeploymentParameters[F, ID, S, E]): Resource[F, Deployment[F, RepositoryAlg]]

    Deploys an event-sourced entity repository in context F, returning an instance of implementation-specific Deployment typed with the Repository algebra, wrapped in a resource (since deployments typically require finalization).

    Deploys an event-sourced entity repository in context F, returning an instance of implementation-specific Deployment typed with the Repository algebra, wrapped in a resource (since deployments typically require finalization).

    Repository operation is defined by the interpreted repository, behavior and side-effect algebras, following a strictly defined sequence:

    • the interpreted repository is used to create a handle on the entity with the specified ID implementing the entity algebra, so that the caller can interact with it
    • when a function of the entity algebra is invoked, this invocation is serialized using the commandProtocol and sent over the wire thanks to CommandSender. On the receiving node, the message is decoded and run with the provided behavior interpreter: this typically involves reading the entity state (e.g. for validation), and writing events (which can lead to a new version of the state via the eventApplier function)
    • after events are written, a possible side-effect is triggered: this can be asynchronous (i.e. the function doesn't wait for completion of the side-effect to return)
    • the function finally returns to the caller with the result of the operation described by the entity algebra (reply value, typically encoded over the wire in a distributed deployment)

    This interaction pattern occurs with "actor-like" semantics: all calls on the entity are processed in sequence.

    The function is parameterized with the context F and the various involved types: S for entity state, E for events, ID for entity ID and Alg & RepositoryAlg for entity and repository algebras respectively (both higher-kinded type constructors).

    Since the behavior described above involves concurrent handling of repository interactions and asynchronous side-effecting, we expect Async from F.

    EntityIDCodec is used to encode/decode entity IDs to/from strings.

    F

    effect type

    ID

    entity ID

    S

    entity state

    E

    event type

    Alg

    entity algebra

    RepositoryAlg

    repository algebra

    repository

    interpreter for the repository algebra (used to "materialize" the repository)

    behavior

    interpreter for the behavior algebra (used to "materialize" the behavior)

    sideEffect

    interpreter for the side-effect algebra (used to "materialize" the side-effect)

    nameProvider

    provides a name for the entity (in other words, the "type of entity", e.g. "booking")

    commandProtocol

    protocol-centric definition of entity algebra: defines a wire encoding for interactions with remote entities

    eventApplier

    defines how events are applied to the entity state

    parameters

    platform-specific deployment parameters

    returns

    a resource encapsulating access to the deployed repository algebra

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  14. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  15. def toString(): String
    Definition Classes
    AnyRef → Any
  16. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  17. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from AnyRef

Inherited from Any

Ungrouped