Skip to content

Commit

Permalink
Deploying to master from @ endless4s/endless-transaction@0b84ae5 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
jchapuis committed Mar 1, 2024
1 parent 3b08ae1 commit acfa34f
Show file tree
Hide file tree
Showing 13 changed files with 61 additions and 61 deletions.
10 changes: 5 additions & 5 deletions 2pc.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="description" content="endless-transaction is a Scala library that provides a functional abstraction for distributed transactions based on cats-effect and the endless library.">
<meta property="og:title" content="Endless4s">
<meta property="og:title" content="endless4s-transaction">
<meta property="og:description" content="endless-transaction is a Scala library that provides a functional abstraction for distributed transactions based on cats-effect and the endless library.">
<meta property="og:image" content="https://endless4s.github.io/logo-open-graph.png">
<meta property="og:image" content="https://endless4s.github.io/transaction/logo-open-graph.png">
<meta name="generator" content="Paradox, paradox-material-theme=0.6.0, mkdocs-material=3.0.3">

<meta name="lang:clipboard.copy" content="Copy to clipboard">
Expand Down 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.2
<i class="md-icon" title="Version">label_outline</i> 0.0.3
</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/v0.0.2/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.3/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.2
0.0.3
</span>
</div>
</article>
Expand Down
10 changes: 5 additions & 5 deletions abstractions.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="description" content="endless-transaction is a Scala library that provides a functional abstraction for distributed transactions based on cats-effect and the endless library.">
<meta property="og:title" content="Endless4s">
<meta property="og:title" content="endless4s-transaction">
<meta property="og:description" content="endless-transaction is a Scala library that provides a functional abstraction for distributed transactions based on cats-effect and the endless library.">
<meta property="og:image" content="https://endless4s.github.io/logo-open-graph.png">
<meta property="og:image" content="https://endless4s.github.io/transaction/logo-open-graph.png">
<meta name="generator" content="Paradox, paradox-material-theme=0.6.0, mkdocs-material=3.0.3">

<meta name="lang:clipboard.copy" content="Copy to clipboard">
Expand Down 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.2
<i class="md-icon" title="Version">label_outline</i> 0.0.3
</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/v0.0.2/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.3/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.2
0.0.3
</span>
</div>
</article>
Expand Down
10 changes: 5 additions & 5 deletions branch.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="description" content="endless-transaction is a Scala library that provides a functional abstraction for distributed transactions based on cats-effect and the endless library.">
<meta property="og:title" content="Endless4s">
<meta property="og:title" content="endless4s-transaction">
<meta property="og:description" content="endless-transaction is a Scala library that provides a functional abstraction for distributed transactions based on cats-effect and the endless library.">
<meta property="og:image" content="https://endless4s.github.io/logo-open-graph.png">
<meta property="og:image" content="https://endless4s.github.io/transaction/logo-open-graph.png">
<meta name="generator" content="Paradox, paradox-material-theme=0.6.0, mkdocs-material=3.0.3">

<meta name="lang:clipboard.copy" content="Copy to clipboard">
Expand Down 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.2
<i class="md-icon" title="Version">label_outline</i> 0.0.3
</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/v0.0.2/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.3/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.2
0.0.3
</span>
</div>
</article>
Expand Down
10 changes: 5 additions & 5 deletions coordinator.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="description" content="endless-transaction is a Scala library that provides a functional abstraction for distributed transactions based on cats-effect and the endless library.">
<meta property="og:title" content="Endless4s">
<meta property="og:title" content="endless4s-transaction">
<meta property="og:description" content="endless-transaction is a Scala library that provides a functional abstraction for distributed transactions based on cats-effect and the endless library.">
<meta property="og:image" content="https://endless4s.github.io/logo-open-graph.png">
<meta property="og:image" content="https://endless4s.github.io/transaction/logo-open-graph.png">
<meta name="generator" content="Paradox, paradox-material-theme=0.6.0, mkdocs-material=3.0.3">

<meta name="lang:clipboard.copy" content="Copy to clipboard">
Expand Down 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.2
<i class="md-icon" title="Version">label_outline</i> 0.0.3
</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/v0.0.2/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.3/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.2
0.0.3
</span>
</div>
</article>
Expand Down
16 changes: 8 additions & 8 deletions example.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="description" content="endless-transaction is a Scala library that provides a functional abstraction for distributed transactions based on cats-effect and the endless library.">
<meta property="og:title" content="Endless4s">
<meta property="og:title" content="endless4s-transaction">
<meta property="og:description" content="endless-transaction is a Scala library that provides a functional abstraction for distributed transactions based on cats-effect and the endless library.">
<meta property="og:image" content="https://endless4s.github.io/logo-open-graph.png">
<meta property="og:image" content="https://endless4s.github.io/transaction/logo-open-graph.png">
<meta name="generator" content="Paradox, paradox-material-theme=0.6.0, mkdocs-material=3.0.3">

<meta name="lang:clipboard.copy" content="Copy to clipboard">
Expand Down 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.2
<i class="md-icon" title="Version">label_outline</i> 0.0.3
</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/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](
<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.3/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/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] =
<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.3/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/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
<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.3/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/v0.0.2/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.3/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.2
0.0.3
</span>
</div>
</article>
Expand Down
12 changes: 6 additions & 6 deletions getting-started.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="description" content="endless-transaction is a Scala library that provides a functional abstraction for distributed transactions based on cats-effect and the endless library.">
<meta property="og:title" content="Endless4s">
<meta property="og:title" content="endless4s-transaction">
<meta property="og:description" content="endless-transaction is a Scala library that provides a functional abstraction for distributed transactions based on cats-effect and the endless library.">
<meta property="og:image" content="https://endless4s.github.io/logo-open-graph.png">
<meta property="og:image" content="https://endless4s.github.io/transaction/logo-open-graph.png">
<meta name="generator" content="Paradox, paradox-material-theme=0.6.0, mkdocs-material=3.0.3">

<meta name="lang:clipboard.copy" content="Copy to clipboard">
Expand Down 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.2
<i class="md-icon" title="Version">label_outline</i> 0.0.3
</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.2&quot;
<pre class="prettyprint"><code class="language-scala">libraryDependencies += &quot;io.github.endless4s&quot; %% &quot;endless-transaction&quot; % &quot;0.0.3&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/v0.0.2/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.3/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.2
0.0.3
</span>
</div>
</article>
Expand Down
10 changes: 5 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="description" content="endless-transaction is a Scala library that provides a functional abstraction for distributed transactions based on cats-effect and the endless library.">
<meta property="og:title" content="Endless4s">
<meta property="og:title" content="endless4s-transaction">
<meta property="og:description" content="endless-transaction is a Scala library that provides a functional abstraction for distributed transactions based on cats-effect and the endless library.">
<meta property="og:image" content="https://endless4s.github.io/logo-open-graph.png">
<meta property="og:image" content="https://endless4s.github.io/transaction/logo-open-graph.png">
<meta name="generator" content="Paradox, paradox-material-theme=0.6.0, mkdocs-material=3.0.3">

<meta name="lang:clipboard.copy" content="Copy to clipboard">
Expand Down 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.2
<i class="md-icon" title="Version">label_outline</i> 0.0.3
</label>
</li>
</ul>
Expand All @@ -174,13 +174,13 @@
</div>
</div>
<div>
<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">
<a href="https://github.com/endless4s/endless-transaction/tree/v0.0.3/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.2
0.0.3
</span>
</div>
</article>
Expand Down
Loading

0 comments on commit acfa34f

Please sign in to comment.