Skip to content

Commit

Permalink
Deploying to master from @ endless4s/endless-transaction@d5046a7 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
jchapuis committed Mar 1, 2024
1 parent 7644581 commit 3b08ae1
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 39 deletions.
6 changes: 3 additions & 3 deletions 2pc.html
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,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.0.0+1-99e419f0*
<i class="md-icon" title="Version">label_outline</i> 0.0.2
</label>
</li>
</ul>
Expand Down Expand Up @@ -346,13 +346,13 @@ <h2><a href="#state-diagram" name="state-diagram" class="anchor"><span class="an
</ul></div>
</div>
<div>
<a href="https://github.com/endless4s/endless-transaction/tree/master/documentation/src/main/paradox/2pc.md" title="Edit this page" class="md-source-file md-edit">
<a href="https://github.com/endless4s/endless-transaction/tree/v0.0.2/documentation/src/main/paradox/2pc.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.0.0+1-99e419f0*
0.0.2
</span>
</div>
</article>
Expand Down
6 changes: 3 additions & 3 deletions abstractions.html
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,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.0.0+1-99e419f0*
<i class="md-icon" title="Version">label_outline</i> 0.0.2
</label>
</li>
</ul>
Expand All @@ -181,13 +181,13 @@ <h1><a href="#abstractions" name="abstractions" class="anchor"><span class="anch
</ul>
</div>
<div>
<a href="https://github.com/endless4s/endless-transaction/tree/master/documentation/src/main/paradox/abstractions.md" title="Edit this page" class="md-source-file md-edit">
<a href="https://github.com/endless4s/endless-transaction/tree/v0.0.2/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.0.0+1-99e419f0*
0.0.2
</span>
</div>
</article>
Expand Down
6 changes: 3 additions & 3 deletions branch.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.0.0+1-99e419f0*
<i class="md-icon" title="Version">label_outline</i> 0.0.2
</label>
</li>
</ul>
Expand Down Expand Up @@ -214,13 +214,13 @@ <h2><a href="#abort" name="abort" class="anchor"><span class="anchor-link"></spa
<p>An exception raised in one of these operations transitions the transaction to failed state (once all branches return).</p></div>
</div>
<div>
<a href="https://github.com/endless4s/endless-transaction/tree/master/documentation/src/main/paradox/branch.md" title="Edit this page" class="md-source-file md-edit">
<a href="https://github.com/endless4s/endless-transaction/tree/v0.0.2/documentation/src/main/paradox/branch.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.0.0+1-99e419f0*
0.0.2
</span>
</div>
</article>
Expand Down
6 changes: 3 additions & 3 deletions coordinator.html
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,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.0.0+1-99e419f0*
<i class="md-icon" title="Version">label_outline</i> 0.0.2
</label>
</li>
</ul>
Expand Down Expand Up @@ -192,13 +192,13 @@ <h1><a href="#coordinator" name="coordinator" class="anchor"><span class="anchor
<p>The transaction might be in a partial preparation readiness state, and rollout of the new version will pick up preparation where it left off. As long as the new behavior is compatible with the old, this is not a problem. </p></div>
</div>
<div>
<a href="https://github.com/endless4s/endless-transaction/tree/master/documentation/src/main/paradox/coordinator.md" title="Edit this page" class="md-source-file md-edit">
<a href="https://github.com/endless4s/endless-transaction/tree/v0.0.2/documentation/src/main/paradox/coordinator.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.0.0+1-99e419f0*
0.0.2
</span>
</div>
</article>
Expand Down
12 changes: 6 additions & 6 deletions example.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.0.0+1-99e419f0*
<i class="md-icon" title="Version">label_outline</i> 0.0.2
</label>
</li>
</ul>
Expand Down Expand Up @@ -238,7 +238,7 @@ <h2><a href="#transfers" name="transfers" class="anchor"><span class="anchor-lin
<p>Transfers are implemented using an <code>endless-transaction</code> transaction coordinator. </p>
<h3><a href="#coordinator" name="coordinator" class="anchor"><span class="anchor-link"></span></a>Coordinator</h3>
<p>A coordinator is created with <code>TransferID</code> as the transaction identifier type, <code>AccountID</code> as the branch identifier, <code>Transfer</code> as the query payload (the amount, origin, and destination), and <code>TransferFailure</code> as the error coproduct.</p>
<pre class="prettyprint"><button class="snippet-button copy-snippet" title="Copy snippet to clipboard">copy</button><a class="snippet-button go-to-source" href="https://github.com/endless4s/endless-transaction/tree/master/example/src/main/scala/endless/transaction/example/logic/ShardedAccounts.scala#L61-L68" target="_blank" title="Go to snippet source">source</a><code class="language-scala">transactor.coordinator[TransferID, AccountID, Transfer, TransferFailure](
<pre class="prettyprint"><button class="snippet-button copy-snippet" title="Copy snippet to clipboard">copy</button><a class="snippet-button go-to-source" href="https://github.com/endless4s/endless-transaction/tree/v0.0.2/example/src/main/scala/endless/transaction/example/logic/ShardedAccounts.scala#L61-L68" target="_blank" title="Go to snippet source">source</a><code class="language-scala">transactor.coordinator[TransferID, AccountID, Transfer, TransferFailure](
&quot;transfer&quot;,
{ accountID =&gt;
val account = sharding.entityFor(accountID)
Expand All @@ -249,7 +249,7 @@ <h3><a href="#coordinator" name="coordinator" class="anchor"><span class="anchor
<p>The coordinator is used in the implementation of the <code>transfer</code> method in <code>ShardedAccounts</code>, i.e. the implementation of <code>Accounts</code>. </p>
<h3><a href="#transaction" name="transaction" class="anchor"><span class="anchor-link"></span></a>Transaction</h3>
<p>The snippet below shows the logic: the code creates a transfer with two branches, one for the origin account, and the other for the destination account.</p>
<pre class="prettyprint"><button class="snippet-button copy-snippet" title="Copy snippet to clipboard">copy</button><a class="snippet-button go-to-source" href="https://github.com/endless4s/endless-transaction/tree/master/example/src/main/scala/endless/transaction/example/logic/ShardedAccounts.scala#L29-L49" target="_blank" title="Go to snippet source">source</a><code class="language-scala">def transfer(from: AccountID, to: AccountID, amount: PosAmount): F[TransferFailure \/ Unit] =
<pre class="prettyprint"><button class="snippet-button copy-snippet" title="Copy snippet to clipboard">copy</button><a class="snippet-button go-to-source" href="https://github.com/endless4s/endless-transaction/tree/v0.0.2/example/src/main/scala/endless/transaction/example/logic/ShardedAccounts.scala#L29-L49" target="_blank" title="Go to snippet source">source</a><code class="language-scala">def transfer(from: AccountID, to: AccountID, amount: PosAmount): F[TransferFailure \/ Unit] =
coordinator
.create(TransferID.random, Transfer(from, to, amount), from, to)
.use(_.pollForFinalStatus())
Expand All @@ -274,7 +274,7 @@ <h3><a href="#transaction" name="transaction" class="anchor"><span class="anchor
<p>To implement this polling operation, we use the <code>pollForFinalStatus()</code> built-in extension method (defined for <code>Transaction</code>): this method retrieves the status of the transaction at configurable intervals and semantically sleeps in between.</p>
<h3><a href="#branch" name="branch" class="anchor"><span class="anchor-link"></span></a>Branch</h3>
<p>An account&rsquo;s involvement in a transfer is described by <code>TransferBranch</code>, as exemplified below with the implementation of the <code>prepare</code> method: </p>
<pre class="prettyprint"><button class="snippet-button copy-snippet" title="Copy snippet to clipboard">copy</button><a class="snippet-button go-to-source" href="https://github.com/endless4s/endless-transaction/tree/master/example/src/main/scala/endless/transaction/example/logic/TransferBranch.scala#L19-L59" target="_blank" title="Go to snippet source">source</a><code class="language-scala">class TransferBranch[F[_]: Logger](accountID: AccountID, account: Account[F])(implicit
<pre class="prettyprint"><button class="snippet-button copy-snippet" title="Copy snippet to clipboard">copy</button><a class="snippet-button go-to-source" href="https://github.com/endless4s/endless-transaction/tree/v0.0.2/example/src/main/scala/endless/transaction/example/logic/TransferBranch.scala#L19-L59" target="_blank" title="Go to snippet source">source</a><code class="language-scala">class TransferBranch[F[_]: Logger](accountID: AccountID, account: Account[F])(implicit
temporal: Temporal[F]
) extends Branch[F, TransferID, Transfer, TransferFailure] {
import temporal.*
Expand Down Expand Up @@ -317,13 +317,13 @@ <h3><a href="#branch" name="branch" class="anchor"><span class="anchor-link"></s
}</code></pre>
</div>
<div>
<a href="https://github.com/endless4s/endless-transaction/tree/master/documentation/src/main/paradox/example.md" title="Edit this page" class="md-source-file md-edit">
<a href="https://github.com/endless4s/endless-transaction/tree/v0.0.2/documentation/src/main/paradox/example.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.0.0+1-99e419f0*
0.0.2
</span>
</div>
</article>
Expand Down
8 changes: 4 additions & 4 deletions getting-started.html
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,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.0.0+1-99e419f0*
<i class="md-icon" title="Version">label_outline</i> 0.0.2
</label>
</li>
</ul>
Expand All @@ -172,20 +172,20 @@
<div class="md-content__searchable">
<h1><a href="#getting-started" name="getting-started" class="anchor"><span class="anchor-link"></span></a>Getting Started</h1>
<p>Add the following dependency to your <code>build.sbt</code> file:</p>
<pre class="prettyprint"><code class="language-scala">libraryDependencies += &quot;io.github.endless4s&quot; %% &quot;endless-transaction&quot; % &quot;0.0.0+1-99e419f0-SNAPSHOT&quot;
<pre class="prettyprint"><code class="language-scala">libraryDependencies += &quot;io.github.endless4s&quot; %% &quot;endless-transaction&quot; % &quot;0.0.2&quot;
</code></pre>
<p>This will pull in the module containing the abstractions. You should add this dependency to the project that contains your business domain logic (typically &ldquo;domain&rdquo;).</p>
<p>The Pekko runtime is available in <code>endless-transaction-pekko</code> and provides <code>PekkoTransactor</code>, an implementation of <code>Transactor</code> which is the entry-point to create a transaction coordinator (for Akka, use <code>endless-transaction-akka</code>). </p><div class="callout warning "><div class="callout-title">Compatibility</div>
<p>Since Pekko/Akka <a href="https://doc.akka.io/docs/akka/current/common/binary-compatibility-rules.html#mixed-versioning-is-not-allowed">do not allow mixed versions</a> in a project, dependencies of <code>endless-transaction-pekko</code> (and <code>endless-transaction-akka</code> respectively) are marked a <code>Provided</code>. This means that your application <code>libraryDependencies</code> needs to directly include Pekko or Akka as a direct dependency. The minimal supported Pekko version is 1.0.0, and Akka version is 2.6.20. </p></div>
</div>
<div>
<a href="https://github.com/endless4s/endless-transaction/tree/master/documentation/src/main/paradox/getting-started.md" title="Edit this page" class="md-source-file md-edit">
<a href="https://github.com/endless4s/endless-transaction/tree/v0.0.2/documentation/src/main/paradox/getting-started.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.0.0+1-99e419f0*
0.0.2
</span>
</div>
</article>
Expand Down
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,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.0.0+1-99e419f0*
<i class="md-icon" title="Version">label_outline</i> 0.0.2
</label>
</li>
</ul>
Expand All @@ -174,13 +174,13 @@
</div>
</div>
<div>
<a href="https://github.com/endless4s/endless-transaction/tree/master/documentation/src/main/paradox/index.md" title="Edit this page" class="md-source-file md-edit">
<a href="https://github.com/endless4s/endless-transaction/tree/v0.0.2/documentation/src/main/paradox/index.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.0.0+1-99e419f0*
0.0.2
</span>
</div>
</article>
Expand Down
Binary file modified logo-open-graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions nutshell.html
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,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.0.0+1-99e419f0*
<i class="md-icon" title="Version">label_outline</i> 0.0.2
</label>
</li>
</ul>
Expand All @@ -177,13 +177,13 @@ <h1><a href="#in-a-nutshell" name="in-a-nutshell" class="anchor"><span class="an
<p>Abstractions in the library are implemented by one of the two available runtimes, Pekko or Akka. Internally, transactions are materialized with a persistent sharded entity implementing the two-phase protocol asynchronously with at least once delivery guarantee.</p>
</div>
<div>
<a href="https://github.com/endless4s/endless-transaction/tree/master/documentation/src/main/paradox/nutshell.md" title="Edit this page" class="md-source-file md-edit">
<a href="https://github.com/endless4s/endless-transaction/tree/v0.0.2/documentation/src/main/paradox/nutshell.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.0.0+1-99e419f0*
0.0.2
</span>
</div>
</article>
Expand Down
2 changes: 1 addition & 1 deletion paradox.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name" : "documentation",
"version" : "0.0.0+1-99e419f0-SNAPSHOT"
"version" : "0.0.2"
}
6 changes: 3 additions & 3 deletions reference.html
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,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.0.0+1-99e419f0*
<i class="md-icon" title="Version">label_outline</i> 0.0.2
</label>
</li>
</ul>
Expand All @@ -178,13 +178,13 @@ <h1><a href="#reference" name="reference" class="anchor"><span class="anchor-lin
</ul>
</div>
<div>
<a href="https://github.com/endless4s/endless-transaction/tree/master/documentation/src/main/paradox/reference.md" title="Edit this page" class="md-source-file md-edit">
<a href="https://github.com/endless4s/endless-transaction/tree/v0.0.2/documentation/src/main/paradox/reference.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.0.0+1-99e419f0*
0.0.2
</span>
</div>
</article>
Expand Down
2 changes: 1 addition & 1 deletion search/search_index.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions transaction.html
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,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.0.0+1-99e419f0*
<i class="md-icon" title="Version">label_outline</i> 0.0.2
</label>
</li>
</ul>
Expand Down Expand Up @@ -224,13 +224,13 @@ <h1><a href="#transaction" name="transaction" class="anchor"><span class="anchor
<img src="diagrams/TransactionEntity.png"/>
</div>
<div>
<a href="https://github.com/endless4s/endless-transaction/tree/master/documentation/src/main/paradox/transaction.md" title="Edit this page" class="md-source-file md-edit">
<a href="https://github.com/endless4s/endless-transaction/tree/v0.0.2/documentation/src/main/paradox/transaction.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.0.0+1-99e419f0*
0.0.2
</span>
</div>
</article>
Expand Down
6 changes: 3 additions & 3 deletions transactor.html
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,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.0.0+1-99e419f0*
<i class="md-icon" title="Version">label_outline</i> 0.0.2
</label>
</li>
</ul>
Expand Down Expand Up @@ -191,13 +191,13 @@ <h1><a href="#transactor" name="transactor" class="anchor"><span class="anchor-l
</ul>
</div>
<div>
<a href="https://github.com/endless4s/endless-transaction/tree/master/documentation/src/main/paradox/transactor.md" title="Edit this page" class="md-source-file md-edit">
<a href="https://github.com/endless4s/endless-transaction/tree/v0.0.2/documentation/src/main/paradox/transactor.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.0.0+1-99e419f0*
0.0.2
</span>
</div>
</article>
Expand Down

0 comments on commit 3b08ae1

Please sign in to comment.