corda/docs/build/html/inthebox.html

305 lines
12 KiB
HTML
Raw Normal View History

2015-11-25 13:29:51 +00:00
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
2016-05-09 16:13:23 +00:00
<title>Whats included? &mdash; R3 Corda latest documentation</title>
2015-11-25 13:29:51 +00:00
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
2016-05-09 16:13:23 +00:00
<link rel="top" title="R3 Corda latest documentation" href="index.html"/>
<link rel="next" title="Getting set up" href="getting-set-up.html"/>
2016-05-24 11:27:23 +00:00
<link rel="prev" title="Welcome to the Corda repository!" href="index.html"/>
2015-11-25 13:29:51 +00:00
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
2015-11-25 13:29:51 +00:00
2016-05-09 16:13:23 +00:00
<a href="index.html" class="icon icon-home"> R3 Corda
2015-11-25 13:29:51 +00:00
</a>
<div class="version">
2016-02-25 12:29:28 +00:00
latest
2015-11-25 13:29:51 +00:00
</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>
<br>
<a href="api/index.html">API reference</a>
2015-11-25 13:29:51 +00:00
</div>
<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">
2016-04-13 09:29:54 +00:00
<li class="toctree-l1 current"><a class="current reference internal" href="#">What&#8217;s included?</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#contracts">Contracts</a></li>
<li class="toctree-l2"><a class="reference internal" href="#kotlin">Kotlin</a></li>
</ul>
</li>
2015-11-25 13:29:51 +00:00
<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-06-13 17:27:53 +00:00
<li class="toctree-l1"><a class="reference internal" href="transaction-data-types.html">Transaction Data Types</a></li>
2016-05-24 11:27:23 +00:00
<li class="toctree-l1"><a class="reference internal" href="consensus.html">Consensus Model</a></li>
2015-12-14 17:22:34 +00:00
<li class="toctree-l1"><a class="reference internal" href="messaging.html">Networking and messaging</a></li>
2016-05-09 16:13:23 +00:00
<li class="toctree-l1"><a class="reference internal" href="running-the-demos.html">Running the demos</a></li>
2016-03-04 15:15:51 +00:00
<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>
<li class="toctree-l1"><a class="reference internal" href="tutorial-contract.html">Writing a contract</a></li>
2015-12-14 17:22:34 +00:00
<li class="toctree-l1"><a class="reference internal" href="protocol-state-machines.html">Protocol state machines</a></li>
2016-03-14 15:57:36 +00:00
<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-24 11:27:23 +00:00
<li class="toctree-l1"><a class="reference internal" href="release-process.html">Release process</a></li>
2016-06-13 17:27:53 +00:00
<li class="toctree-l1"><a class="reference internal" href="release-process.html#steps-to-cut-a-release">Steps to cut a release</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>
<li class="toctree-l1"><a class="reference internal" href="visualiser.html">Using the visualiser</a></li>
2016-01-27 15:01:52 +00:00
<li class="toctree-l1"><a class="reference internal" href="codestyle.html">Code style guide</a></li>
2016-05-09 16:13:23 +00:00
<li class="toctree-l1"><a class="reference internal" href="building-the-docs.html">Building the documentation</a></li>
2015-11-25 13:29:51 +00:00
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
2016-05-09 16:13:23 +00:00
<a href="index.html">R3 Corda</a>
2015-11-25 13:29:51 +00:00
</nav>
<div class="wy-nav-content">
<div class="rst-content">
2016-04-13 09:29:54 +00:00
2015-11-25 13:29:51 +00:00
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> &raquo;</li>
<li>What&#8217;s included?</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/inthebox.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="what-s-included">
<h1>What&#8217;s included?<a class="headerlink" href="#what-s-included" title="Permalink to this headline"></a></h1>
<p>The current prototype consists of a small amount of code that defines:</p>
<ul class="simple">
2016-03-14 15:57:36 +00:00
<li>Key data structures.</li>
2015-11-25 13:29:51 +00:00
<li>Algorithms that work with them, such as serialising, hashing, signing, and verification of the signatures.</li>
2016-03-14 15:57:36 +00:00
<li>Two smart contracts that implement a notion of a cash claim and basic commercial paper (implemented twice, in two
different programming languages). These are simplified versions of the real things.</li>
2015-11-25 13:29:51 +00:00
<li>Unit tests that check the algorithms do what is expected, and which verify the behaviour of the smart contracts.</li>
<li>API documentation and tutorials (what you&#8217;re reading)</li>
2016-03-14 15:57:36 +00:00
<li>A simple standalone node that uses an embedded message queue broker as its P2P messaging layer.</li>
2016-02-03 15:55:37 +00:00
<li>A trading demo that runs the node in either a listening/buying mode, or a connecting/selling mode, and swaps some
2016-03-14 15:57:36 +00:00
fake commercial paper assets for some self-issued IOU cash, using a generic <em>protocol framework</em>.</li>
<li>It also includes two oracles: one for precise timestamping and another for interest rate swaps.</li>
2015-11-25 13:29:51 +00:00
</ul>
<p>Some things it does not currently include but should gain later are:</p>
<ul class="simple">
2015-11-25 17:49:58 +00:00
<li>Sandboxing, distribution or publication of smart contract code</li>
2015-11-25 13:29:51 +00:00
<li>A peer to peer network</li>
<li>Database persistence</li>
<li>An API for integrating external software</li>
<li>A user interface for administration</li>
<li>Many other things</li>
</ul>
<p>You can browse <a class="reference external" href="https://r3-cev.atlassian.net/">the JIRA bug tracker</a>.</p>
<p>The prototype&#8217;s goal is rapid exploration of ideas. Therefore in places it takes shortcuts that a production system
would not in order to boost productivity:</p>
<ul class="simple">
2016-03-14 15:57:36 +00:00
<li>It uses an object graph serialization framework instead of a well specified, vendor neutral protocol.</li>
2015-11-25 13:29:51 +00:00
<li>It uses secp256r1, an obsolete elliptic curve.</li>
2016-03-14 15:57:36 +00:00
<li>It uses the default, out of the box Apache Artemis MQ protocol instead of AMQP/1.0 (although switching should be easy)</li>
2015-11-25 13:29:51 +00:00
</ul>
<div class="section" id="contracts">
<h2>Contracts<a class="headerlink" href="#contracts" title="Permalink to this headline"></a></h2>
<p>The primary goal of this prototype is to implement various kinds of contracts and verify that useful business logic
can be expressed with the data model, developing and refining an API along the way. To that end there are currently
two contracts in the repository:</p>
<ol class="arabic simple">
<li>Cash</li>
<li>Commercial paper</li>
</ol>
<p><code class="docutils literal"><span class="pre">Cash</span></code> implements the idea of a claim on some quantity of deposits at some institutional party, denominated in some currency,
identified by some <em>deposit reference</em>. A deposit reference is an opaque byte array which is usable by
the issuing party for internal bookkeeping purposes.</p>
<p>Cash states are <em>fungible</em> with each other (can be merged and split arbitrarily) if they use the same currency,
party and deposit reference.</p>
<p><code class="docutils literal"><span class="pre">CommercialPaper</span></code> implements an asset with a <em>face value</em> denominated in a certain currency, which may be redeemed at
the issuing party after a certain time. Commercial paper states define the face value (e.g. $1000) and the time
at which they may be redeemed. The contract allows the paper to be issued, traded and redeemed. The commercial paper
contract is implemented twice, once in Java and once in a language called Kotlin.</p>
2016-04-13 09:29:54 +00:00
<p><code class="docutils literal"><span class="pre">InterestRateSwap</span></code> implements a vanilla OTC same currency bilateral fixed / floating leg swap. For further details,
see <a class="reference internal" href="irs.html"><span class="doc">The Interest Rate Swap Contract</span></a></p>
<p>Each contract comes with unit tests.</p>
</div>
<div class="section" id="kotlin">
<h2>Kotlin<a class="headerlink" href="#kotlin" title="Permalink to this headline"></a></h2>
<p>The prototype is written in a language called <a class="reference external" href="https://kotlinlang.org/">Kotlin</a>. Kotlin is a language that targets the JVM
and can be thought of as a simpler Scala, with much better Java interop. It is developed by and has commercial support
from JetBrains, the makers of the IntelliJ IDE and other popular developer tools.</p>
<p>As Kotlin is very new, without a doubt you have not encountered it before. Don&#8217;t worry: it is designed as a better
Java for industrial use and as such, the syntax was carefully designed to be readable even to people who don&#8217;t know
the language, after only a few minutes of introduction.</p>
<p>Due to the seamless Java interop the use of Kotlin to extend the platform is <em>not</em> required and the tutorial shows how
to write contracts in both Kotlin and Java. You can <a class="reference external" href="https://medium.com/&#64;octskyward/why-kotlin-is-my-next-programming-language-c25c001e26e3">read more about why Kotlin is a potentially strong successor to Java here</a>.</p>
<p>Kotlin programs use the regular Java standard library and ordinary Java frameworks. Frameworks used at this time are:</p>
<ul class="simple">
<li>JUnit for unit testing</li>
<li>Kryo for serialisation (this is not intended to be permanent)</li>
<li>Gradle for the build</li>
<li>Guava for a few utility functions</li>
</ul>
</div>
2015-11-25 13:29:51 +00:00
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="getting-set-up.html" class="btn btn-neutral float-right" title="Getting set up" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
2015-11-25 13:29:51 +00:00
2016-05-24 11:27:23 +00:00
<a href="index.html" class="btn btn-neutral" title="Welcome to the Corda repository!" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
2015-11-25 13:29:51 +00:00
</div>
<hr/>
<div role="contentinfo">
<p>
2016-05-09 16:13:23 +00:00
&copy; Copyright 2016, Distributed Ledger Group, LLC.
2015-11-25 13:29:51 +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>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
2016-02-25 12:29:28 +00:00
VERSION:'latest',
2015-11-25 13:29:51 +00:00
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>
</body>
</html>