Skip to content

Commit

Permalink
Deploying to master from @ endless4s/endless@aa1ba0f 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
jchapuis committed Jan 26, 2024
1 parent 9ea0ed6 commit 2016d0e
Show file tree
Hide file tree
Showing 24 changed files with 100 additions and 100 deletions.
16 changes: 8 additions & 8 deletions abstractions.html
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
<ul style="display: none">
<li class="md-nav__item md-version" id="project.version">
<label class="md-nav__link" for="__version">
<i class="md-icon" title="Version">label_outline</i> 0.28.0
<i class="md-icon" title="Version">label_outline</i> 0.29.0
</label>
</li>
</ul>
Expand All @@ -183,21 +183,21 @@ <h1><a href="#abstractions" name="abstractions" class="anchor"><span class="anch
<p>All definitions make use of the following type parameters: </p>
<ul>
<li><code>F[_]</code>: abstract effectful context <code>F</code> encapsulating all values, e.g. <code>IO[Boolean]</code></li>
<li><code>Alg[_[_]]</code>: algebra allowing interaction with the entity, e.g. <a href="https://github.com/endless4s/endless/tree/v0.28.0/example/src/main/scala/endless/example/algebra/BookingAlg.scala">BookingAlg[IO[*]]</a></li>
<li><code>RepositoryAlg[_[_]]</code>: algebra allowing interaction with the repository, e.g. <a href="https://github.com/endless4s/endless/tree/v0.28.0/example/src/main/scala/endless/example/algebra/BookingsAlg.scala">BookingsAlg[IO[*]]</a></li>
<li><code>ID</code>: entity ID, e.g. <a href="https://github.com/endless4s/endless/tree/v0.28.0/example/src/main/scala/endless/example/data/Booking.scala">BookingID</a></li>
<li><code>S</code>: entity state, e.g. <a href="https://github.com/endless4s/endless/tree/v0.28.0/example/src/main/scala/endless/example/data/Booking.scala">Booking</a></li>
<li><code>E</code>: entity event, e.g. <a href="https://github.com/endless4s/endless/tree/v0.28.0/example/src/main/scala/endless/example/data/BookingEvent.scala">BookingEvent</a></li>
<li><code>Alg[_[_]]</code>: algebra allowing interaction with the entity, e.g. <a href="https://github.com/endless4s/endless/tree/v0.29.0/example/src/main/scala/endless/example/algebra/BookingAlg.scala">BookingAlg[IO[*]]</a></li>
<li><code>RepositoryAlg[_[_]]</code>: algebra allowing interaction with the repository, e.g. <a href="https://github.com/endless4s/endless/tree/v0.29.0/example/src/main/scala/endless/example/algebra/BookingsAlg.scala">BookingsAlg[IO[*]]</a></li>
<li><code>ID</code>: entity ID, e.g. <a href="https://github.com/endless4s/endless/tree/v0.29.0/example/src/main/scala/endless/example/data/Booking.scala">BookingID</a></li>
<li><code>S</code>: entity state, e.g. <a href="https://github.com/endless4s/endless/tree/v0.29.0/example/src/main/scala/endless/example/data/Booking.scala">Booking</a></li>
<li><code>E</code>: entity event, e.g. <a href="https://github.com/endless4s/endless/tree/v0.29.0/example/src/main/scala/endless/example/data/BookingEvent.scala">BookingEvent</a></li>
</ul>
</div>
<div>
<a href="https://github.com/endless4s/endless/tree/v0.28.0/documentation/src/main/paradox/abstractions.md" title="Edit this page" class="md-source-file md-edit">
<a href="https://github.com/endless4s/endless/tree/v0.29.0/documentation/src/main/paradox/abstractions.md" title="Edit this page" class="md-source-file md-edit">
Edit this page
</a>
</div>
<div class="print-only">
<span class="md-source-file md-version">
0.28.0
0.29.0
</span>
</div>
</article>
Expand Down
2 changes: 1 addition & 1 deletion api/core/endless/core/interpret/RepositoryInterpreter.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/core/index.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions applier.html
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
<ul style="display: none">
<li class="md-nav__item md-version" id="project.version">
<label class="md-nav__link" for="__version">
<i class="md-icon" title="Version">label_outline</i> 0.28.0
<i class="md-icon" title="Version">label_outline</i> 0.29.0
</label>
</li>
</ul>
Expand All @@ -185,13 +185,13 @@ <h1><a href="#eventapplier" name="eventapplier" class="anchor"><span class="anch
<p>Application of an event on the entity state (aka. <em>folding</em> the events over the state) is defined with an <a href="api/core/endless/core/event/EventApplier.html" title="endless.core.event.EventApplier"><code>EventApplier</code></a> pure function, parametrized with the state <code>S</code> and events <code>E</code>. This is a tupled function of a possibly defined state and the event, leading to either a new version of the state or an error (<code>\/</code> is a type alias for <code>Either</code>).</p>
</div>
<div>
<a href="https://github.com/endless4s/endless/tree/v0.28.0/documentation/src/main/paradox/applier.md" title="Edit this page" class="md-source-file md-edit">
<a href="https://github.com/endless4s/endless/tree/v0.29.0/documentation/src/main/paradox/applier.md" title="Edit this page" class="md-source-file md-edit">
Edit this page
</a>
</div>
<div class="print-only">
<span class="md-source-file md-version">
0.28.0
0.29.0
</span>
</div>
</article>
Expand Down
14 changes: 7 additions & 7 deletions deployer.html
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
<ul style="display: none">
<li class="md-nav__item md-version" id="project.version">
<label class="md-nav__link" for="__version">
<i class="md-icon" title="Version">label_outline</i> 0.28.0
<i class="md-icon" title="Version">label_outline</i> 0.29.0
</label>
</li>
</ul>
Expand Down Expand Up @@ -197,11 +197,11 @@ <h1><a href="#deployer" name="deployer" class="anchor"><span class="anchor-link"
<p><code>deployRepository</code> is parametrized with the following type parameters:</p>
<ul>
<li><code>F[_]</code>: abstract effectful context <code>F</code> encapsulating all values, e.g. <code>IO[*]</code></li>
<li><code>Alg[_[_]]</code>: algebra allowing interaction with the entity, e.g. <a href="https://github.com/endless4s/endless/tree/v0.28.0/example/src/main/scala/endless/example/algebra/BookingAlg.scala">BookingAlg[IO[*]]</a></li>
<li><code>RepositoryAlg[_[_]]</code>: repository algebra, e.g. <a href="https://github.com/endless4s/endless/tree/v0.28.0/example/src/main/scala/endless/example/repository/BookingRepositoryAlg.scala">BookingRepositoryAlg[IO[*]]</a></li>
<li><code>Alg[_[_]]</code>: algebra allowing interaction with the entity, e.g. <a href="https://github.com/endless4s/endless/tree/v0.29.0/example/src/main/scala/endless/example/algebra/BookingAlg.scala">BookingAlg[IO[*]]</a></li>
<li><code>RepositoryAlg[_[_]]</code>: repository algebra, e.g. <a href="https://github.com/endless4s/endless/tree/v0.29.0/example/src/main/scala/endless/example/repository/BookingRepositoryAlg.scala">BookingRepositoryAlg[IO[*]]</a></li>
<li><code>ID</code>: entity ID, e.g. <code>final case class BookingID(id: UUID) extends AnyVal</code></li>
<li><code>S</code>: entity state, e.g. <a href="https://github.com/endless4s/endless/tree/v0.28.0/example/src/main/scala/endless/example/data/Booking.scala">Booking</a></li>
<li><code>E</code>: entity event, e.g. <a href="https://github.com/endless4s/endless/tree/v0.28.0/example/src/main/scala/endless/example/data/BookingEvent.scala">BookingEvent</a></li>
<li><code>S</code>: entity state, e.g. <a href="https://github.com/endless4s/endless/tree/v0.29.0/example/src/main/scala/endless/example/data/Booking.scala">Booking</a></li>
<li><code>E</code>: entity event, e.g. <a href="https://github.com/endless4s/endless/tree/v0.29.0/example/src/main/scala/endless/example/data/BookingEvent.scala">BookingEvent</a></li>
</ul>
<p>Repository operation is defined by the interpreted repository, behavior and side-effect algebras, following a strictly defined sequence:</p>
<ol>
Expand All @@ -213,13 +213,13 @@ <h1><a href="#deployer" name="deployer" class="anchor"><span class="anchor-link"
<p>See also sequence diagrams in <a href="example.html">Example App</a> that represent this flow for a concrete entity.</p>
</div>
<div>
<a href="https://github.com/endless4s/endless/tree/v0.28.0/documentation/src/main/paradox/deployer.md" title="Edit this page" class="md-source-file md-edit">
<a href="https://github.com/endless4s/endless/tree/v0.29.0/documentation/src/main/paradox/deployer.md" title="Edit this page" class="md-source-file md-edit">
Edit this page
</a>
</div>
<div class="print-only">
<span class="md-source-file md-version">
0.28.0
0.29.0
</span>
</div>
</article>
Expand Down
6 changes: 3 additions & 3 deletions discord.html
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
<ul style="display: none">
<li class="md-nav__item md-version" id="project.version">
<label class="md-nav__link" for="__version">
<i class="md-icon" title="Version">label_outline</i> 0.28.0
<i class="md-icon" title="Version">label_outline</i> 0.29.0
</label>
</li>
</ul>
Expand All @@ -184,13 +184,13 @@ <h2><a href="#questions-answers" name="questions-answers" class="anchor"><span c
<p><iframe src="https://discordapp.com/widget?id=917750013826838558&theme=dark" width="350" height="500" allowtransparency="true" frameborder="0" sandbox="allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"></iframe></html></p>
</div>
<div>
<a href="https://github.com/endless4s/endless/tree/v0.28.0/documentation/src/main/paradox/discord.md" title="Edit this page" class="md-source-file md-edit">
<a href="https://github.com/endless4s/endless/tree/v0.29.0/documentation/src/main/paradox/discord.md" title="Edit this page" class="md-source-file md-edit">
Edit this page
</a>
</div>
<div class="print-only">
<span class="md-source-file md-version">
0.28.0
0.29.0
</span>
</div>
</article>
Expand Down
6 changes: 3 additions & 3 deletions durable-entity.html
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
<ul style="display: none">
<li class="md-nav__item md-version" id="project.version">
<label class="md-nav__link" for="__version">
<i class="md-icon" title="Version">label_outline</i> 0.28.0
<i class="md-icon" title="Version">label_outline</i> 0.29.0
</label>
</li>
</ul>
Expand Down Expand Up @@ -197,13 +197,13 @@ <h1><a href="#durable-entity" name="durable-entity" class="anchor"><span class="
<p>Such &ldquo;durable&rdquo; entities still benefit from sharding, passivation, rebalancing, automatic recovery etc. while keeping the persistence model simple. In effect, this is a way to implement CRUD-like distributed entities while retaining the advantages of actors, such as the ability to actively schedule side-effects, precise state-machine semantics, consistent distributed in-memory state, etc. </p>
</div>
<div>
<a href="https://github.com/endless4s/endless/tree/v0.28.0/documentation/src/main/paradox/durable-entity.md" title="Edit this page" class="md-source-file md-edit">
<a href="https://github.com/endless4s/endless/tree/v0.29.0/documentation/src/main/paradox/durable-entity.md" title="Edit this page" class="md-source-file md-edit">
Edit this page
</a>
</div>
<div class="print-only">
<span class="md-source-file md-version">
0.28.0
0.29.0
</span>
</div>
</article>
Expand Down
8 changes: 4 additions & 4 deletions effector.html
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
<ul style="display: none">
<li class="md-nav__item md-version" id="project.version">
<label class="md-nav__link" for="__version">
<i class="md-icon" title="Version">label_outline</i> 0.28.0
<i class="md-icon" title="Version">label_outline</i> 0.29.0
</label>
</li>
</ul>
Expand Down Expand Up @@ -229,7 +229,7 @@ <h2><a href="#self-process-definition" name="self-process-definition" class="anc
<p>For most processes, <em>at least once</em> delivery guarantees are required. This can be achieved with a projection, however at the cost of some incurred latency. Actual latency depends on the database and event journal implementation used, as well as the projection throughput. One must also make sure to distribute the projection across the cluster to avoid creating a central choke point. Even so, if a projector process gets stalled for some reason, this can create a cascade effect with events pending processing building up. </p>
<p>An effective alternative to using a projection is to track process completion in the entity state itself. Launching asynchronous operations directly as a side-effect of an event has zero latency overhead and also the added advantage that the process launches within the node of the entity which triggered it, thus benefiting from inherent distribution. </p>
<p>By enabling <a href="https://pekko.apache.org/docs/pekko/current/typed/cluster-sharding.html#remembering-entities"><em>remember-entities</em></a>, we can achieve guaranteed <em>at-least-once</em> completion of asynchronous processes thanks to effector running right after recovery (thus withstanding node crash or shard rebalancing).</p>
<p><em>endless</em> makes it easy to implement this pattern with <code>Self</code>. Here&rsquo;s the recipe, as illustrated in the example application <a href="https://github.com/endless4s/endless/tree/v0.28.0/example/src/main/scala/endless/example/logic/BookingEffector.scala">example</a>:</p>
<p><em>endless</em> makes it easy to implement this pattern with <code>Self</code>. Here&rsquo;s the recipe, as illustrated in the example application <a href="https://github.com/endless4s/endless/tree/v0.29.0/example/src/main/scala/endless/example/logic/BookingEffector.scala">example</a>:</p>
<ol>
<li><code>BookingPlaced</code> event gets persisted. At this point, entity state represents pending acceptation of the booking <code>Booking(..., status = Pending)</code></li>
<li>Effector function inspects the state, and in case of <code>Pending</code> status, asks a third-party service for availability and notifies the entity of the result:</li>
Expand All @@ -247,13 +247,13 @@ <h2><a href="#self-process-definition" name="self-process-definition" class="anc
<p>3.<code>BookingAccepted</code> or <code>BookingRejected</code> events are persisted and entity state is updated accordingly.</p></div>
</div>
<div>
<a href="https://github.com/endless4s/endless/tree/v0.28.0/documentation/src/main/paradox/effector.md" title="Edit this page" class="md-source-file md-edit">
<a href="https://github.com/endless4s/endless/tree/v0.29.0/documentation/src/main/paradox/effector.md" title="Edit this page" class="md-source-file md-edit">
Edit this page
</a>
</div>
<div class="print-only">
<span class="md-source-file md-version">
0.28.0
0.29.0
</span>
</div>
</article>
Expand Down
8 changes: 4 additions & 4 deletions entity.html
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
<ul style="display: none">
<li class="md-nav__item md-version" id="project.version">
<label class="md-nav__link" for="__version">
<i class="md-icon" title="Version">label_outline</i> 0.28.0
<i class="md-icon" title="Version">label_outline</i> 0.29.0
</label>
</li>
</ul>
Expand Down Expand Up @@ -211,7 +211,7 @@ <h1><a href="#entity" name="entity" class="anchor"><span class="anchor-link"></s
}
trait Entity[F[_], S, E] extends StateReader[F, S] with EventWriter[F, E]
</code></pre>
<p><a href="api/core/endless/core/entity/Entity.html" title="endless.core.entity.Entity"><code>Entity</code></a> is parametrized with entity state <code>S</code> and events <code>E</code>. It is a typeclass which represents reader-writer capabilities for <code>F</code> with event-sourcing semantics, i.e. the abilities to read current entity state from the context and persist events. <code>Entity</code> is used to describe entity behavior (e.g. <a href="https://github.com/endless4s/endless/tree/v0.28.0/example/src/main/scala/endless/example/logic/BookingEntity.scala">BookingEntity</a>). </p>
<p><a href="api/core/endless/core/entity/Entity.html" title="endless.core.entity.Entity"><code>Entity</code></a> is parametrized with entity state <code>S</code> and events <code>E</code>. It is a typeclass which represents reader-writer capabilities for <code>F</code> with event-sourcing semantics, i.e. the abilities to read current entity state from the context and persist events. <code>Entity</code> is used to describe entity behavior (e.g. <a href="https://github.com/endless4s/endless/tree/v0.29.0/example/src/main/scala/endless/example/logic/BookingEntity.scala">BookingEntity</a>). </p>
<h2><a href="#functional-event-sourcing" name="functional-event-sourcing" class="anchor"><span class="anchor-link"></span></a>Functional event sourcing</h2>
<p><em>Reader-writer</em> is a natural fit for describing event sourcing behavior: the monadic chain represents event sequencing and corresponding evolution of the state (see also <a href="https://pavkin.ru/aecor-part-2/">here</a> and <a href="https://www.youtube.com/watch?v=kDkRRkkVlxQ">here</a>).</p>
<p>Advantages of this abstraction are:</p>
Expand All @@ -233,13 +233,13 @@ <h2><a href="#functional-event-sourcing" name="functional-event-sourcing" class=
</ul></div>
</div>
<div>
<a href="https://github.com/endless4s/endless/tree/v0.28.0/documentation/src/main/paradox/entity.md" title="Edit this page" class="md-source-file md-edit">
<a href="https://github.com/endless4s/endless/tree/v0.29.0/documentation/src/main/paradox/entity.md" title="Edit this page" class="md-source-file md-edit">
Edit this page
</a>
</div>
<div class="print-only">
<span class="md-source-file md-version">
0.28.0
0.29.0
</span>
</div>
</article>
Expand Down
Loading

0 comments on commit 2016d0e

Please sign in to comment.