Skip to content

Commit

Permalink
deploy: e31a1ab
Browse files Browse the repository at this point in the history
  • Loading branch information
scarmuega committed Jan 20, 2024
1 parent 01629aa commit 3673caa
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 40 deletions.
23 changes: 4 additions & 19 deletions print.html
Original file line number Diff line number Diff line change
Expand Up @@ -178,28 +178,13 @@ <h1 id="introduction"><a class="header" href="#introduction">Introduction</a></h
<h2 id="motivation"><a class="header" href="#motivation">Motivation</a></h2>
<p>Since blockchain is a sequence of transactions it is far from trivial to get a fast read only access to data. Scrolls is a tool for building and maintaining read-optimized collections of Cardano's on-chain entities. It crawls the history of the chain and aggregates all data to reflect the current state of affairs. Once the whole history has been processed, Scrolls watches the tip of the chain to keep the collections up-to-date. </p>
<div style="break-before: page; page-break-before: always;"></div><h1 id="reducers"><a class="header" href="#reducers">Reducers</a></h1>
<p>Scroll Reducers are Map/Reduce algorithms that turn block data into a relevant information to be queried by end-users.</p>
<p>There are several ways to implement reducers in Scrolls:</p>
<ul>
<li><a href="reducers/deno.html">Deno</a>: custom reducers in js</li>
<li><a href="reducers/typescript.html">Typescript</a>: using custom Typescript code to implement the map/reduce logic</li>
<li><a href="reducers/rust.html">Rust</a>: using custom Rust code to implement the map/reduce logic</li>
</ul>
<div style="break-before: page; page-break-before: always;"></div><h1 id="deno"><a class="header" href="#deno">Deno</a></h1>
<p>With the deno reducer is possible to create a custom reducer for logics that the builtin reducers don't have support. This reducer is only enable with the deno feature on build.</p>
<h2 id="configuration"><a class="header" href="#configuration">Configuration</a></h2>
<p>Example of a configuration</p>
<pre><code class="language-toml">[reducer]
type = &quot;Deno&quot;
main_module = &quot;./examples/deno/enrich.js&quot;
use_async = true
</code></pre>
<h3 id="section-reducer"><a class="header" href="#section-reducer">Section: <code>reducer</code></a></h3>
<ul>
<li><code>type</code>: the literal value <code>Deno</code>.</li>
<li><code>main_module</code>: the js file with the reducer logic</li>
<li><code>use_async</code>: run the js in async mode</li>
</ul>
<h2 id="run-code"><a class="header" href="#run-code">Run code</a></h2>
<p>To run the code with the deno will be necessary to use deno feature</p>
<pre><code class="language-sh">cargo run --features=deno -- daemon --config ./examples/deno/enrich.js
</code></pre>

</main>

Expand Down
18 changes: 0 additions & 18 deletions reducers/deno.html
Original file line number Diff line number Diff line change
Expand Up @@ -174,24 +174,6 @@ <h1 class="menu-title">Scrolls</h1>
<div id="content" class="content">
<main>
<h1 id="deno"><a class="header" href="#deno">Deno</a></h1>
<p>With the deno reducer is possible to create a custom reducer for logics that the builtin reducers don't have support. This reducer is only enable with the deno feature on build.</p>
<h2 id="configuration"><a class="header" href="#configuration">Configuration</a></h2>
<p>Example of a configuration</p>
<pre><code class="language-toml">[reducer]
type = &quot;Deno&quot;
main_module = &quot;./examples/deno/enrich.js&quot;
use_async = true
</code></pre>
<h3 id="section-reducer"><a class="header" href="#section-reducer">Section: <code>reducer</code></a></h3>
<ul>
<li><code>type</code>: the literal value <code>Deno</code>.</li>
<li><code>main_module</code>: the js file with the reducer logic</li>
<li><code>use_async</code>: run the js in async mode</li>
</ul>
<h2 id="run-code"><a class="header" href="#run-code">Run code</a></h2>
<p>To run the code with the deno will be necessary to use deno feature</p>
<pre><code class="language-sh">cargo run --features=deno -- daemon --config ./examples/deno/enrich.js
</code></pre>

</main>

Expand Down
5 changes: 4 additions & 1 deletion reducers/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,11 @@ <h1 class="menu-title">Scrolls</h1>
<div id="content" class="content">
<main>
<h1 id="reducers"><a class="header" href="#reducers">Reducers</a></h1>
<p>Scroll Reducers are Map/Reduce algorithms that turn block data into a relevant information to be queried by end-users.</p>
<p>There are several ways to implement reducers in Scrolls:</p>
<ul>
<li><a href="deno.html">Deno</a>: custom reducers in js</li>
<li><a href="typescript.html">Typescript</a>: using custom Typescript code to implement the map/reduce logic</li>
<li><a href="rust.html">Rust</a>: using custom Rust code to implement the map/reduce logic</li>
</ul>

</main>
Expand Down
Loading

0 comments on commit 3673caa

Please sign in to comment.