mirror of
https://github.com/corda/corda.git
synced 2025-06-16 06:08:13 +00:00
Regen docsite
This commit is contained in:
195
docs/build/html/running-the-demos.html
vendored
195
docs/build/html/running-the-demos.html
vendored
@ -91,6 +91,7 @@
|
||||
<li class="toctree-l1"><a class="reference internal" href="getting-set-up.html">Getting set up</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="data-model.html">Data model</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="transaction-data-types.html">Data types</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="merkle-trees.html">Transaction Tear-offs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="consensus.html">Consensus model</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="messaging.html">Networking and messaging</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="persistence.html">Persistence</a></li>
|
||||
@ -194,149 +195,59 @@ how this works in <a class="reference internal" href="protocol-state-machines.ht
|
||||
<li>The IRS demo, which shows two nodes establishing an interest rate swap between them and performing fixings with a
|
||||
rates oracle, all driven via the HTTP API.</li>
|
||||
<li>The IRS demo web interface - a web interface to the IRS demo.</li>
|
||||
<li>The attachment demo, which demonstrates uploading attachments to nodes.</li>
|
||||
<li>The SIMM valuation demo, a large demo which shows two nodes agreeing on a portfolio and valuing the initial margin
|
||||
using the Standard Initial Margin Model.</li>
|
||||
</ol>
|
||||
<p>The demos create node data directories in the root of the project. If something goes wrong with them, blow away the
|
||||
directories and try again.</p>
|
||||
<div class="section" id="trader-demo">
|
||||
<h2>Trader demo<a class="headerlink" href="#trader-demo" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Open two terminals, and in the first run:</p>
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<p class="last">If you are planning to use non-default configuration you will need to run with –role=SetupA and –role=SetupB
|
||||
beforehand with the same parameters you plan to supply to the respective nodes.</p>
|
||||
<p class="last">The demos currently must be run from IntelliJ, this will change before M6.</p>
|
||||
</div>
|
||||
<p><strong>Windows</strong>:</p>
|
||||
<div class="highlight-kotlin"><div class="highlight"><pre><span></span>gradlew.bat & .\build\install\r3prototyping\bin\trader-demo --role=BUYER
|
||||
</pre></div>
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<p class="last">If any demos don’t work please jump on our mailing list and let us know.</p>
|
||||
</div>
|
||||
<p><strong>Other</strong>:</p>
|
||||
<div class="highlight-kotlin"><div class="highlight"><pre><span></span><span class="p">./</span><span class="n">gradlew</span> <span class="n">installDist</span> <span class="p">&&</span> <span class="p">./</span><span class="n">build</span><span class="p">/</span><span class="n">install</span><span class="p">/</span><span class="n">r3prototyping</span><span class="p">/</span><span class="n">bin</span><span class="p">/</span><span class="n">trader</span><span class="p">-</span><span class="n">demo</span> <span class="p">--</span><span class="n">role</span><span class="p">=</span><span class="n">BUYER</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>It will compile things, if necessary, then create a directory named trader-demo/buyer with a bunch of files inside and
|
||||
start the node. You should see it waiting for a trade to begin.</p>
|
||||
<p>In the second terminal, run:</p>
|
||||
<p><strong>Windows</strong>:</p>
|
||||
<div class="highlight-kotlin"><div class="highlight"><pre><span></span>.\build\install\r3prototyping\bin\trader-demo --role=SELLER
|
||||
</pre></div>
|
||||
</div>
|
||||
<p><strong>Other</strong>:</p>
|
||||
<div class="highlight-kotlin"><div class="highlight"><pre><span></span><span class="p">./</span><span class="n">build</span><span class="p">/</span><span class="n">install</span><span class="p">/</span><span class="n">r3prototyping</span><span class="p">/</span><span class="n">bin</span><span class="p">/</span><span class="n">trader</span><span class="p">-</span><span class="n">demo</span> <span class="p">--</span><span class="n">role</span><span class="p">=</span><span class="n">SELLER</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>You should see some log lines scroll past, and within a few seconds the messages “Purchase complete - we are a
|
||||
happy customer!” and “Sale completed - we have a happy customer!” should be printed.</p>
|
||||
<p>If it doesn’t work, jump on the mailing list and let us know.</p>
|
||||
<div class="section" id="trader-demo">
|
||||
<h2>Trader demo<a class="headerlink" href="#trader-demo" title="Permalink to this headline">¶</a></h2>
|
||||
<ol class="arabic simple">
|
||||
<li>Open the Corda project in IntelliJ and run the “Install” configuration</li>
|
||||
<li>Open the Corda samples project in IntelliJ and run the “Trader Demo: Run Nodes” configuration</li>
|
||||
<li>Run “Trader Demo: Run Buyer”</li>
|
||||
<li>Run “Trader Demo: Run Seller”</li>
|
||||
</ol>
|
||||
<p>In the “Trader Demo: Run Nodes” windows you should see some log lines scroll past, and within a few seconds the messages
|
||||
“Purchase complete - we are a happy customer!” and “Sale completed - we have a happy customer!” should be printed.</p>
|
||||
</div>
|
||||
<div class="section" id="irs-demo">
|
||||
<h2>IRS demo<a class="headerlink" href="#irs-demo" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Open three terminals. In the first run:</p>
|
||||
<p><strong>Windows</strong>:</p>
|
||||
<div class="highlight-kotlin"><div class="highlight"><pre><span></span>gradlew.bat installDist & .\build\install\r3prototyping\bin\irsdemo.bat --role=NodeA
|
||||
</pre></div>
|
||||
</div>
|
||||
<p><strong>Other</strong>:</p>
|
||||
<div class="highlight-kotlin"><div class="highlight"><pre><span></span><span class="p">./</span><span class="n">gradlew</span> <span class="n">installDist</span> <span class="p">&&</span> <span class="p">./</span><span class="n">build</span><span class="p">/</span><span class="n">install</span><span class="p">/</span><span class="n">r3prototyping</span><span class="p">/</span><span class="n">bin</span><span class="p">/</span><span class="n">irsdemo</span> <span class="p">--</span><span class="n">role</span><span class="p">=</span><span class="n">NodeA</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>And in the second run:</p>
|
||||
<p><strong>Windows</strong>:</p>
|
||||
<div class="highlight-kotlin"><div class="highlight"><pre><span></span>.\build\install\r3prototyping\bin\irsdemo.bat --role=NodeB
|
||||
</pre></div>
|
||||
</div>
|
||||
<p><strong>Other</strong>:</p>
|
||||
<div class="highlight-kotlin"><div class="highlight"><pre><span></span><span class="p">./</span><span class="n">build</span><span class="p">/</span><span class="n">install</span><span class="p">/</span><span class="n">r3prototyping</span><span class="p">/</span><span class="n">bin</span><span class="p">/</span><span class="n">irsdemo</span> <span class="p">--</span><span class="n">role</span><span class="p">=</span><span class="n">NodeB</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>NodeB also doubles up as the interest rates oracle and you should see some rates data get loaded.</p>
|
||||
<p>Now in the third terminal run:</p>
|
||||
<p><strong>Windows</strong>:</p>
|
||||
<div class="highlight-kotlin"><div class="highlight"><pre><span></span>.\build\install\r3prototyping\bin\irsdemo.bat --role=Trade trade1
|
||||
</pre></div>
|
||||
</div>
|
||||
<p><strong>Other</strong>:</p>
|
||||
<div class="highlight-kotlin"><div class="highlight"><pre><span></span><span class="p">./</span><span class="n">build</span><span class="p">/</span><span class="n">install</span><span class="p">/</span><span class="n">r3prototyping</span><span class="p">/</span><span class="n">bin</span><span class="p">/</span><span class="n">irsdemo</span> <span class="p">--</span><span class="n">role</span><span class="p">=</span><span class="n">Trade</span> <span class="n">trade1</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>You should see some activity in the other two terminals as they set up the deal. You can now run this command in
|
||||
a separate window to roll the fake clock forward and trigger lots of fixing events. Things go fast so make sure you
|
||||
can see the other terminals whilst you run this command!:</p>
|
||||
<p><strong>Windows</strong>:</p>
|
||||
<div class="highlight-kotlin"><div class="highlight"><pre><span></span>.\build\install\r3prototyping\bin\irsdemo.bat --role=Date 2017-01-30
|
||||
</pre></div>
|
||||
</div>
|
||||
<p><strong>Other</strong>:</p>
|
||||
<div class="highlight-kotlin"><div class="highlight"><pre><span></span><span class="p">./</span><span class="n">build</span><span class="p">/</span><span class="n">install</span><span class="p">/</span><span class="n">r3prototyping</span><span class="p">/</span><span class="n">bin</span><span class="p">/</span><span class="n">irsdemo</span> <span class="p">--</span><span class="n">role</span><span class="p">=</span><span class="n">Date</span> <span class="m">2017</span><span class="p">-</span><span class="m">01</span><span class="p">-</span><span class="m">30</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<ol class="arabic simple">
|
||||
<li>Open the Corda project in IntelliJ and run the “Install” configuration</li>
|
||||
<li>Open the Corda samples project in IntelliJ and run the “IRS Demo: Run Nodes” configuration</li>
|
||||
<li>Run “IRS Demo: Run Upload Rates” to upload rates to the oracle.</li>
|
||||
<li>Run “IRS Demo: Run Trade” to have nodes agree on a trade.</li>
|
||||
<li>Run “IRS Demo: Run Date Change” to run the fixings.</li>
|
||||
</ol>
|
||||
<p>In the “IRS Demo: Run Nodes” window you’ll see a lot of activity when you run the trade and when you run the date change.
|
||||
The date change rolls the clock forwards and causes the nodes to agree on the fixings over a period.</p>
|
||||
</div>
|
||||
<div class="section" id="irs-web-demo">
|
||||
<h2>IRS web demo<a class="headerlink" href="#irs-web-demo" title="Permalink to this headline">¶</a></h2>
|
||||
<p>To install the web demo please follow these steps;</p>
|
||||
<ol class="arabic simple">
|
||||
<li>Install Node: <a class="reference external" href="https://nodejs.org/en/download/">https://nodejs.org/en/download/</a> and ensure the npm executable is on your classpath</li>
|
||||
<li>Open a terminal</li>
|
||||
<li>Run <cite>npm install -g bower</cite> or <cite>sudo npm install -g bower</cite> if on a Unix system.</li>
|
||||
<li>In the terminal navigate to <cite><corda>/src/main/resources/com/r3corda/demos/irswebdemo</cite></li>
|
||||
<li>Run <cite>bower install</cite></li>
|
||||
</ol>
|
||||
<p>To run the web demo, run the first two steps from the IRS Demo:</p>
|
||||
<p>Open two terminals and in the first:</p>
|
||||
<p><strong>Windows</strong>:</p>
|
||||
<div class="highlight-kotlin"><div class="highlight"><pre><span></span>gradlew.bat installDist & .\build\install\r3prototyping\bin\irsdemo.bat --role=NodeA
|
||||
</pre></div>
|
||||
</div>
|
||||
<p><strong>Other</strong>:</p>
|
||||
<div class="highlight-kotlin"><div class="highlight"><pre><span></span><span class="p">./</span><span class="n">gradlew</span> <span class="n">installDist</span> <span class="p">&&</span> <span class="p">./</span><span class="n">build</span><span class="p">/</span><span class="n">install</span><span class="p">/</span><span class="n">r3prototyping</span><span class="p">/</span><span class="n">bin</span><span class="p">/</span><span class="n">irsdemo</span> <span class="p">--</span><span class="n">role</span><span class="p">=</span><span class="n">NodeA</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>And in the second run:</p>
|
||||
<p><strong>Windows</strong>:</p>
|
||||
<div class="highlight-kotlin"><div class="highlight"><pre><span></span>.\build\install\r3prototyping\bin\irsdemo.bat --role=NodeB
|
||||
</pre></div>
|
||||
</div>
|
||||
<p><strong>Other</strong>:</p>
|
||||
<div class="highlight-kotlin"><div class="highlight"><pre><span></span><span class="p">./</span><span class="n">build</span><span class="p">/</span><span class="n">install</span><span class="p">/</span><span class="n">r3prototyping</span><span class="p">/</span><span class="n">bin</span><span class="p">/</span><span class="n">irsdemo</span> <span class="p">--</span><span class="n">role</span><span class="p">=</span><span class="n">NodeB</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Now open your web browser to this URL:</p>
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<p class="last">If using a custom node port address or port those must be used instead.</p>
|
||||
</div>
|
||||
<p><strong>Node A</strong>:</p>
|
||||
<blockquote>
|
||||
<div><a class="reference external" href="http://localhost:31338/web/irsdemo">http://localhost:31338/web/irsdemo</a></div></blockquote>
|
||||
<p><strong>Node B</strong>:</p>
|
||||
<blockquote>
|
||||
<div><a class="reference external" href="http://localhost:31340/web/irsdemo">http://localhost:31340/web/irsdemo</a></div></blockquote>
|
||||
<p>There is also an IRS web demo installed. To use this follow steps 1-3 in the IRS demo and then navigate to
|
||||
<a class="reference external" href="http://localhost:10005/web/irsdemo">http://localhost:10005/web/irsdemo</a> and <a class="reference external" href="http://localhost:10005/web/irsdemo">http://localhost:10005/web/irsdemo</a> to see both node’s view of the trades.</p>
|
||||
<p>To use the demos click the “Create Deal” button, fill in the form, then click the “Submit” button. Now you will be
|
||||
able to use the time controls at the top left of the home page to run the fixings. Click any individual trade in the
|
||||
blotter to view it.</p>
|
||||
</div>
|
||||
<div class="section" id="attachment-demo">
|
||||
<h2>Attachment demo<a class="headerlink" href="#attachment-demo" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Open two terminals, and in the first run:</p>
|
||||
<p><strong>Windows</strong>:</p>
|
||||
<div class="highlight-kotlin"><div class="highlight"><pre><span></span>gradlew.bat & .\build\install\r3prototyping\bin\attachment-demo --role=RECIPIENT
|
||||
</pre></div>
|
||||
</div>
|
||||
<p><strong>Other</strong>:</p>
|
||||
<div class="highlight-kotlin"><div class="highlight"><pre><span></span><span class="p">./</span><span class="n">gradlew</span> <span class="n">installDist</span> <span class="p">&&</span> <span class="p">./</span><span class="n">build</span><span class="p">/</span><span class="n">install</span><span class="p">/</span><span class="n">r3prototyping</span><span class="p">/</span><span class="n">bin</span><span class="p">/</span><span class="n">attachment</span><span class="p">-</span><span class="n">demo</span> <span class="p">--</span><span class="n">role</span><span class="p">=</span><span class="n">RECIPIENT</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>It will compile things, if necessary, then create a directory named attachment-demo/buyer with a bunch of files inside and
|
||||
start the node. You should see it waiting for a trade to begin.</p>
|
||||
<p>In the second terminal, run:</p>
|
||||
<p><strong>Windows</strong>:</p>
|
||||
<div class="highlight-kotlin"><div class="highlight"><pre><span></span>.\build\install\r3prototyping\bin\attachment-demo --role=SENDER
|
||||
</pre></div>
|
||||
</div>
|
||||
<p><strong>Other</strong>:</p>
|
||||
<div class="highlight-kotlin"><div class="highlight"><pre><span></span><span class="p">./</span><span class="n">build</span><span class="p">/</span><span class="n">install</span><span class="p">/</span><span class="n">r3prototyping</span><span class="p">/</span><span class="n">bin</span><span class="p">/</span><span class="n">attachment</span><span class="p">-</span><span class="n">demo</span> <span class="p">--</span><span class="n">role</span><span class="p">=</span><span class="n">SENDER</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>You should see some log lines scroll past, and within a few seconds the message “File received - we’re happy!” should be printed.</p>
|
||||
<ol class="arabic simple">
|
||||
<li>Open the Corda project in IntelliJ and run the “Install” configuration</li>
|
||||
<li>Open the Corda samples project in IntelliJ and run the “Attachment Demo: Run Nodes” configuration</li>
|
||||
<li>Run “Attachment Demo: Run Recipient” - this waits for a trade to start</li>
|
||||
<li>Run “Attachment Demo: Run Sender” - sends the attachment</li>
|
||||
</ol>
|
||||
<p>In the “Attachment Demo: Run Nodes” window you should see some log lines scroll past, and within a few seconds the
|
||||
message “File received - we’re happy!” should be printed.</p>
|
||||
</div>
|
||||
<div class="section" id="simm-and-portfolio-demo">
|
||||
<h2>SIMM and Portfolio Demo<a class="headerlink" href="#simm-and-portfolio-demo" title="Permalink to this headline">¶</a></h2>
|
||||
@ -345,32 +256,12 @@ start the node. You should see it waiting for a trade to begin.</p>
|
||||
<p class="last">Read more about this demo at <a class="reference internal" href="initialmarginagreement.html"><span class="doc">Initial Margin Agreements</span></a>.</p>
|
||||
</div>
|
||||
<p>To run the demo run:</p>
|
||||
<p><strong>Windows</strong></p>
|
||||
<p>Open a terminal window and navigate to the root directory of Corda and run:</p>
|
||||
<div class="highlight-shell"><div class="highlight"><pre><span></span>gradlew apps:vega:installTemplateNodes
|
||||
<span class="nb">cd</span> build<span class="se">\n</span>odes<span class="se">\n</span>ameserver
|
||||
java -jar corda.jar
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Now open another terminal in the root directory of Corda and run:</p>
|
||||
<div class="highlight-shell"><div class="highlight"><pre><span></span><span class="nb">cd</span> build<span class="se">\n</span>odes<span class="se">\n</span>odea
|
||||
java -jar corda.jar
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Now open a third terminal in the root directory of Corda and run:</p>
|
||||
<div class="highlight-shell"><div class="highlight"><pre><span></span><span class="nb">cd</span> build<span class="se">\n</span>odes<span class="se">\n</span>odeb
|
||||
java -jar corda.jar
|
||||
</pre></div>
|
||||
</div>
|
||||
<p><strong>Other</strong></p>
|
||||
<p>Open one terminal window and run the following commands from the root directory of Corda:</p>
|
||||
<div class="highlight-shell"><div class="highlight"><pre><span></span>./gradlew apps:vega:installTemplateNodes
|
||||
<span class="nb">cd</span> build/nodes
|
||||
./runnodes
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Now open <a class="reference external" href="http://localhost:31339/web/vega">http://localhost:31339/web/vega</a> and <a class="reference external" href="http://localhost:31340/web/vega">http://localhost:31340/web/vega</a> to view the two nodes that this
|
||||
will have started respectively.</p>
|
||||
<ol class="arabic simple">
|
||||
<li>Open the Corda project in IntelliJ and run the “Install” configuration</li>
|
||||
<li>Open the Corda samples project in IntelliJ and run the “Simm Valuation Demo” configuration</li>
|
||||
</ol>
|
||||
<p>Now open <a class="reference external" href="http://localhost:10005/web/simmvaluationdemo">http://localhost:10005/web/simmvaluationdemo</a> and <a class="reference external" href="http://localhost:10005/web/simmvaluationdemo">http://localhost:10005/web/simmvaluationdemo</a> to view the two nodes that this
|
||||
will have started respectively. You can now use the demo by creating trades and agreeing the valuations.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Reference in New Issue
Block a user