trait DurableDeployer extends AnyRef
DurableDeployer
deploys durable entity repositories by assembling the required interpreters
and components.
- Alphabetic
- By Inheritance
- DurableDeployer
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
Abstract Value Members
- abstract def deployDurableRepository[F[_], ID, S, Alg[_[_]], RepositoryAlg[_[_]]](repository: RepositoryInterpreter[F, ID, Alg, RepositoryAlg], behavior: DurableBehaviorInterpreter[F, S, Alg], sideEffect: SideEffectInterpreter[F, S, Alg, RepositoryAlg])(implicit arg0: Async[F], arg1: EntityIDCodec[ID], nameProvider: EntityNameProvider[ID], commandProtocol: CommandProtocol[ID, Alg], parameters: DurableDeploymentParameters[F, ID, S]): Resource[F, DurableDeployment[F, RepositoryAlg]]
Deploys a durable entity repository in context
F
, returning an instance of implementation-specificDeployment
typed with the Repository algebra, wrapped in a resource (since deployments typically require finalization).Deploys a durable entity repository in context
F
, returning an instance of implementation-specificDeployment
typed with the Repository algebra, wrapped in a resource (since deployments typically require finalization).Repository operation uses the 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 toCommandSender
. On the receiving node, the message is decoded and run with the providedbehavior
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 theeventApplier
function) - after events were 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) but can be
made synchronous by overriding the
runModeFor
method in theSideEffect
- 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,ID
for entity ID andAlg
&RepositoryAlg
for entity and repository algebras respectively (both higher-kinded type constructors).Since the behavior described above involves concurrent handling of repository interactions and possible asynchronous side-effecting, we expect
Async
fromF
.EntityIDCodec
is used to encode/decode entity IDs to/from strings.- F
effect type
- ID
entity ID
- S
entity state
- 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
- parameters
platform-specific deployment parameters
- returns
a resource encapsulating access to the deployed repository algebra
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)