2016-05-09 16:13:23 +00:00
2016-04-18 17:44:21 +00:00
<!DOCTYPE html>
2016-05-09 16:13:23 +00:00
<!-- [if IE 8]><html class="no - js lt - ie9" lang="en" > <![endif] -->
<!-- [if gt IE 8]><! --> < html class = "no-js" lang = "en" > <!-- <![endif] -->
2016-04-18 17:44:21 +00:00
< head >
2016-05-09 16:13:23 +00:00
< meta charset = "utf-8" >
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" >
< title > Running the demos — R3 Corda latest documentation< / title >
2016-04-18 17:44:21 +00:00
2016-05-09 16:13:23 +00:00
2016-04-18 17:44:21 +00:00
2016-05-09 16:13:23 +00:00
2016-04-18 17:44:21 +00:00
2016-05-09 16:13:23 +00:00
2016-04-18 17:44:21 +00:00
2016-05-09 16:13:23 +00:00
2016-04-18 17:44:21 +00:00
2016-05-09 16:13:23 +00:00
< link rel = "stylesheet" href = "_static/css/custom.css" type = "text/css" / >
2016-04-18 17:44:21 +00:00
2016-05-09 16:13:23 +00:00
2016-04-18 17:44:21 +00:00
2016-05-09 16:13:23 +00:00
< link rel = "top" title = "R3 Corda latest documentation" href = "index.html" / >
< link rel = "next" title = "Node administration" href = "node-administration.html" / >
< link rel = "prev" title = "Networking and messaging" href = "messaging.html" / >
2016-04-18 17:44:21 +00:00
2016-05-09 16:13:23 +00:00
< script src = "_static/js/modernizr.min.js" > < / script >
2016-04-18 17:44:21 +00:00
< / head >
< body class = "wy-body-for-nav" role = "document" >
2016-05-09 16:13:23 +00:00
< div class = "wy-grid-for-nav" >
2016-04-18 17:44:21 +00:00
2016-05-09 16:13:23 +00:00
2016-04-18 17:44:21 +00:00
< nav data-toggle = "wy-nav-shift" class = "wy-nav-side" >
2016-05-09 16:13:23 +00:00
< div class = "wy-side-scroll" >
< div class = "wy-side-nav-search" >
< a href = "index.html" class = "icon icon-home" > R3 Corda
< / a >
< div class = "version" >
latest
< / div >
< div role = "search" >
< form id = "rtd-search-form" class = "wy-form" action = "search.html" method = "get" >
< input type = "text" name = "q" placeholder = "Search docs" / >
< input type = "hidden" name = "check_keywords" value = "yes" / >
< input type = "hidden" name = "area" value = "default" / >
< / form >
< / div >
2016-04-18 17:44:21 +00:00
2016-05-09 16:13:23 +00:00
< br >
< a href = "api/index.html" > API reference< / a >
2016-04-18 17:44:21 +00:00
2016-05-09 16:13:23 +00:00
< / div >
2016-04-18 17:44:21 +00:00
2016-05-09 16:13:23 +00:00
< div class = "wy-menu wy-menu-vertical" data-spy = "affix" role = "navigation" aria-label = "main navigation" >
< p class = "caption" > < span class = "caption-text" > Overview< / span > < / p >
< ul class = "current" >
< li class = "toctree-l1" > < a class = "reference internal" href = "inthebox.html" > What’ s included?< / a > < / li >
< 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 >
2016-05-23 16:05:37 +00:00
< li class = "toctree-l1" > < a class = "reference internal" href = "consensus.html" > Consensus Model< / a > < / li >
2016-05-09 16:13:23 +00:00
< li class = "toctree-l1" > < a class = "reference internal" href = "messaging.html" > Networking and messaging< / a > < / li >
< li class = "toctree-l1 current" > < a class = "current reference internal" href = "#" > Running the demos< / a > < ul >
< li class = "toctree-l2" > < a class = "reference internal" href = "#trader-demo" > Trader demo< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "#irs-demo" > IRS demo< / a > < / li >
< / ul >
< / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "node-administration.html" > Node administration< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "irs.html" > The Interest Rate Swap Contract< / a > < / li >
< / ul >
< p class = "caption" > < span class = "caption-text" > Tutorials< / span > < / p >
< ul >
2016-05-24 11:27:23 +00:00
< li class = "toctree-l1" > < a class = "reference internal" href = "where-to-start.html" > Where to start< / a > < / li >
2016-05-23 16:05:37 +00:00
< li class = "toctree-l1" > < a class = "reference internal" href = "tutorial-contract.html" > Writing a contract< / a > < / li >
2016-05-09 16:13:23 +00:00
< li class = "toctree-l1" > < a class = "reference internal" href = "protocol-state-machines.html" > Protocol state machines< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "oracles.html" > Writing oracle services< / a > < / li >
< / ul >
< p class = "caption" > < span class = "caption-text" > Appendix< / span > < / p >
< ul >
2016-05-23 16:05:37 +00:00
< li class = "toctree-l1" > < a class = "reference internal" href = "release-process.html" > Release process< / a > < / li >
2016-05-24 11:27:23 +00:00
< li class = "toctree-l1" > < a class = "reference internal" href = "release-notes.html" > Release notes< / a > < / li >
2016-05-09 16:13:23 +00:00
< li class = "toctree-l1" > < a class = "reference internal" href = "visualiser.html" > Using the visualiser< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "codestyle.html" > Code style guide< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "building-the-docs.html" > Building the documentation< / a > < / li >
< / ul >
< / div >
< / div >
< / nav >
2016-04-18 17:44:21 +00:00
2016-05-09 16:13:23 +00:00
< section data-toggle = "wy-nav-shift" class = "wy-nav-content-wrap" >
2016-04-18 17:44:21 +00:00
2016-05-09 16:13:23 +00:00
< nav class = "wy-nav-top" role = "navigation" aria-label = "top navigation" >
< i data-toggle = "wy-nav-top" class = "fa fa-bars" > < / i >
< a href = "index.html" > R3 Corda< / a >
< / nav >
2016-04-18 17:44:21 +00:00
2016-05-09 16:13:23 +00:00
< div class = "wy-nav-content" >
< div class = "rst-content" >
2016-04-18 17:44:21 +00:00
2016-05-09 16:13:23 +00:00
2016-04-18 17:44:21 +00:00
2016-05-09 16:13:23 +00:00
< div role = "navigation" aria-label = "breadcrumbs navigation" >
< ul class = "wy-breadcrumbs" >
< li > < a href = "index.html" > Docs< / a > » < / li >
< li > Running the demos< / li >
< li class = "wy-breadcrumbs-aside" >
< a href = "_sources/running-the-demos.txt" rel = "nofollow" > View page source< / a >
< / li >
< / ul >
< hr / >
< / div >
< div role = "main" class = "document" itemscope = "itemscope" itemtype = "http://schema.org/Article" >
< div itemprop = "articleBody" >
< div class = "section" id = "running-the-demos" >
< h1 > Running the demos< a class = "headerlink" href = "#running-the-demos" title = "Permalink to this headline" > ¶< / a > < / h1 >
< p > The repository contains a small number of demo programs that run two-node networks, demonstrating functionality developed
so far. We have:< / p >
< ol class = "arabic simple" >
< li > The trader demo, which shows a delivery-vs-payment atomic swap of commercial paper for cash. You can learn more about
how this works in < a class = "reference internal" href = "protocol-state-machines.html" > < span class = "doc" > Protocol state machines< / span > < / a > .< / li >
< 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 >
< / 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 >
2016-05-24 11:48:53 +00:00
< div class = "admonition warning" >
< p class = "first admonition-title" > Warning< / p >
< p class = "last" > Corda is developed on MacOS and works best on UNIX systems. The trader demo is easily run on Windows but
you won’ t get the nice coloured output. The IRS demo relies on a shell script wrapper and isn’ t so easily run on
Windows currently: we will fix this soon.< / p >
< / div >
2016-05-09 16:13:23 +00:00
< div class = "section" id = "trader-demo" >
< h2 > Trader demo< a class = "headerlink" href = "#trader-demo" title = "Permalink to this headline" > ¶< / a > < / h2 >
2016-05-24 11:48:53 +00:00
< div class = "admonition note" >
< p class = "first admonition-title" > Note< / p >
< p class = "last" > On Windows, use the same commands, but run the batch file instead of the shell file (add .bat to the command)< / p >
< / div >
2016-05-09 16:13:23 +00:00
< p > Open two terminals, and in the first run::< / p >
2016-05-24 11:48:53 +00:00
< div class = "highlight-kotlin" > < div class = "highlight" > < pre > < span > < / span > < span class = "n" > gradle< / 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 >
2016-05-09 16:13:23 +00:00
< / pre > < / div >
< / div >
2016-05-23 16:05:37 +00:00
< 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 >
2016-05-09 16:13:23 +00:00
< p > In the second terminal, run:< / p >
2016-05-24 11:48:53 +00:00
< 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 >
2016-05-09 16:13:23 +00:00
< / 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 >
< div class = "section" id = "irs-demo" >
< h2 > IRS demo< a class = "headerlink" href = "#irs-demo" title = "Permalink to this headline" > ¶< / a > < / h2 >
2016-05-24 11:48:53 +00:00
< div class = "admonition warning" >
< p class = "first admonition-title" > Warning< / p >
< p class = "last" > This demo currently works best on MacOS or Linux< / p >
< / div >
2016-05-09 16:13:23 +00:00
< p > Open three terminals. In the first run::< / p >
< div class = "highlight-kotlin" > < div class = "highlight" > < pre > < span > < / span > < span class = "p" > ./< / span > < span class = "n" > scripts< / span > < span class = "p" > /< / span > < span class = "n" > irs< / span > < span class = "p" > -< / span > < span class = "n" > demo< / span > < span class = "p" > .< / span > < span class = "n" > sh< / span > < span class = "n" > nodeA< / span >
< / pre > < / div >
< / div >
< p > And in the second run::< / p >
< div class = "highlight-kotlin" > < div class = "highlight" > < pre > < span > < / span > < span class = "p" > ./< / span > < span class = "n" > scripts< / span > < span class = "p" > /< / span > < span class = "n" > irs< / span > < span class = "p" > -< / span > < span class = "n" > demo< / span > < span class = "p" > .< / span > < span class = "n" > sh< / span > < span class = "n" > nodeB< / span >
< / pre > < / div >
< / div >
< p > The node in the first terminal will complain that it didn’ t know about nodeB, so restart it. It’ ll then find the
location and identity keys of nodeA and be happy. 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 >
< div class = "highlight-kotlin" > < div class = "highlight" > < pre > < span > < / span > < span class = "p" > ./< / span > < span class = "n" > scripts< / span > < span class = "p" > /< / span > < span class = "n" > irs< / span > < span class = "p" > -< / span > < span class = "n" > demo< / span > < span class = "p" > .< / span > < span class = "n" > sh< / span > < span class = "n" > trade< / span > < span class = "n" > trade1< / span >
< / pre > < / div >
< / div >
2016-05-24 11:48:53 +00:00
< 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 >
< div class = "highlight-kotlin" > < div class = "highlight" > < pre > < span > < / span > < span class = "p" > ./< / span > < span class = "n" > scripts< / span > < span class = "p" > /< / span > < span class = "n" > irs< / span > < span class = "p" > -< / span > < span class = "n" > demo< / span > < span class = "p" > .< / span > < span class = "n" > sh< / 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 >
2016-05-09 16:13:23 +00:00
< / div >
< / div >
2016-04-18 17:44:21 +00:00
2016-05-09 16:13:23 +00:00
< / div >
< / div >
< footer >
< div class = "rst-footer-buttons" role = "navigation" aria-label = "footer navigation" >
< a href = "node-administration.html" class = "btn btn-neutral float-right" title = "Node administration" accesskey = "n" > Next < span class = "fa fa-arrow-circle-right" > < / span > < / a >
< a href = "messaging.html" class = "btn btn-neutral" title = "Networking and messaging" accesskey = "p" > < span class = "fa fa-arrow-circle-left" > < / span > Previous< / a >
< / div >
2016-04-18 17:44:21 +00:00
2016-05-09 16:13:23 +00:00
< hr / >
2016-04-18 17:44:21 +00:00
2016-05-09 16:13:23 +00:00
< div role = "contentinfo" >
< p >
© Copyright 2016, Distributed Ledger Group, LLC.
2016-04-18 17:44:21 +00:00
2016-05-09 16:13:23 +00:00
< / p >
< / div >
Built with < a href = "http://sphinx-doc.org/" > Sphinx< / a > using a < a href = "https://github.com/snide/sphinx_rtd_theme" > theme< / a > provided by < a href = "https://readthedocs.org" > Read the Docs< / a > .
< / footer >
2016-04-18 17:44:21 +00:00
< / div >
2016-05-09 16:13:23 +00:00
< / div >
2016-04-18 17:44:21 +00:00
< / section >
2016-05-09 16:13:23 +00:00
< / div >
< script type = "text/javascript" >
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'latest',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
};
< / script >
< script type = "text/javascript" src = "_static/jquery.js" > < / script >
< script type = "text/javascript" src = "_static/underscore.js" > < / script >
< script type = "text/javascript" src = "_static/doctools.js" > < / script >
< script type = "text/javascript" src = "_static/js/theme.js" > < / script >
< script type = "text/javascript" >
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
< / script >
2016-04-18 17:44:21 +00:00
< / body >
< / html >