blob: 32a725122e7c5414226c5a4def725633fc899a8a [file] [log] [blame]
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1"/>
<title>Storm Compatibility - GearPump 0.6.2 Documentation</title>
<link rel="stylesheet" href="css/bootstrap-3.3.5.min.css">
<style>
body {
padding-top: 60px;
padding-bottom: 40px;
}
</style>
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="css/pygments-default.css">
<script src="js/vendor/modernizr-2.6.1-respond-1.1.0.min.js"></script>
</head>
<body>
<!--[if lt IE 7]>
<p class="chromeframe">You are using an outdated browser. <a href="http://browsehappy.com/">Upgrade your browser today</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to better experience this site.</p>
<![endif]-->
<div class="navbar navbar-inverse navbar-fixed-top" id="topbar">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="/">GearPump
<span class="label label-primary" style="font-size: .6em">0.6.2</span>
</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="index.html">Overview</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Introduction<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="submit-your-1st-application.html">Submit Your 1st Application</a></li>
<li><a href="commandline.html">Client Command Line</a></li>
<li class="divider"></li>
<li><a href="basic-concepts.html">Basic Concepts</a></li>
<li><a href="features.html">Technical Highlights</a></li>
<li><a href="message-delivery.html">Reliable Message Delivery</a></li>
<li><a href="performance-report.html">Performance</a></li>
<li><a href="gearpump-internals.html">Gearpump Internals</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Deploying<b class="caret"></b></a>
<ul class="dropdown-menu">
<li class="dropdown-header">Deployment</li>
<li><a href="deployment-docker.html">Docker</a><li>
<li><a href="deployment-local.html">Local</a><li>
<li><a href="deployment-standalone.html">Standalone</a></li>
<li><a href="deployment-yarn.html">YARN</a></li>
<li class="divider"></li>
<li><a href="deployment-ha.html">High Availability</a></li>
<li><a href="deployment-msg-delivery.html">Reliable Message Delivery</a></li>
<li><a href="deployment-configuration.html">Configuration</a></li>
<li class="divider"></li>
<li><a href="deployment-security.html">Security</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Programming Guide<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="dev-write-1st-app.html">Write Your 1st App</a></li>
<li><a href="dev-custom-serializer.html">Customized Message Passing</a></li>
<li class="divider"></li>
<li><a href="api/scala/index.html">Scala API</a></li>
<li><a href="api/java/index.html">Java API</a></li>
<li><a href="dev-rest-api.html">RESTful API</a></li>
<li class="divider"></li>
<li><a href="dev-connectors.html">Gearpump Connectors</a></li>
<li class="divider"></li>
<li><a href="dev-storm.html">Storm Compatibility</a></li>
<!--
<li><a href="dev-samoa.html">Samoa Compatibility</a></li>
<li class="divider"></li>
<li><a href="dev-iot.html">Gearpump with IoT</a></li>
-->
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">More<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="how-to-contribute.html">How to Contribute</a></li>
<li><a href="coding-style.html">Coding Style</a></li>
<li class="divider"></li>
<li><a href="faq.html">FAQ</a><li>
<li><a href="about.html">About</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<div class="container" id="content">
<h1 class="title">Storm Compatibility</h1>
<p>Gearpump provides <strong>binary compatibility</strong> for Apache Storm applications. That is to say, users could easily grab an existing Storm jar and run it
on Gearpump. This documentation illustrates Gearpump&#8217;s comapatibility with Storm.</p>
<h2 id="how-to-run-a-storm-application-on-gearpump">How to run a Storm application on Gearpump</h2>
<p>This section shows how to run an existing Storm jar in a local Gearpump cluster.</p>
<ol>
<li>
<p>launch a local cluster</p>
<div class="highlight"><pre><code>./target/pack/bin/local
</code></pre></div>
</li>
<li>
<p>submit a topology from storm-starter.
<code>
bin/storm -verbose -config storm.yaml -jar storm-starter-${STORM_VERSION}.jar storm.starter.ExclamationTopology exclamation
</code></p>
<p>Users are able to configure their applications through following options</p>
<ul>
<li><code>jar</code> - set the path of a storm application jar</li>
<li><code>config</code> - submit a customized storm configuration file</li>
</ul>
<p>That&#8217;s it. Check the dashboard and you should see data flowing through your topology.</p>
<p><em>Note that submission from UI is not supported yet</em>.</p>
</li>
</ol>
<h2 id="how-is-it-different-from-running-on-storm">How is it different from running on Storm</h2>
<h3 id="topology-submission">Topology submission</h3>
<p>When a client submits a Storm topology, Gearpump launches locally a simplified version of Storm&#8217;s Nimbus server <code>GearpumpNimbus</code>. <code>GearpumpNimbus</code> then translates topology to a directed acyclic graph (DAG) of Gearpump, which is submitted to Gearpump master and deployed as a Gearpump application.</p>
<p><img src="img/storm_gearpump_cluster.png" alt="storm_gearpump_cluster" /></p>
<p><code>GearpumpNimbus</code> supports the following methods</p>
<ul>
<li><code>submitTopology</code> / <code>submitTopologyWithOpts</code></li>
<li><code>killTopology</code> / <code>killTopologyWithOpts</code></li>
<li><code>getTopology</code> / <code>getUserTopology</code></li>
<li><code>getClusterInfo</code></li>
</ul>
<h3 id="topology-translation">Topology translation</h3>
<p>Here&#8217;s an example of <code>WordCountTopology</code> with acker bolts (ackers) being translated into a Gearpump DAG.</p>
<p><img src="img/storm_gearpump_dag.png" alt="storm_gearpump_dag" /></p>
<p>Gearpump creates a <code>StormProducer</code> for each Storm spout and a <code>StormProcessor</code> for each Storm bolt (except for ackers) with the same parallelism, and wires them together using the same grouping strategy (partitioning in Gearpump) as in Storm.</p>
<p>At runtime, spouts and bolts are running inside <code>StormProducer</code> tasks and <code>StormProcessor</code> tasks respectively. Messages emitted by spout are passed to <code>StormProducer</code>, transferred to <code>StormProcessor</code> and passed down to bolt. Messages are serialized / deserialized with Storm serializers.</p>
<p>Storm ackers are dropped since Gearpump has a different mechanism of message tracking and flow control.</p>
<h3 id="message-tracking">Message tracking</h3>
<p>Storm tracks the lineage of each message with ackers to guarantee at-least-once message delivery. Failed messages are re-sent from spout.</p>
<p>Gearpump <a href="gearpump-internals.html#how-do-we-detect-message-loss">tracks messages between a sender and receiver in an efficient way</a>. Message loss causes the whole application to replay from the <a href="gearpump-internals.html#application-clock-and-global-clock-service">minimum timestamp of all pending messages in the system</a>.</p>
<p><em>Note that ack from bolt is a no-op while fail throws an exception.</em></p>
<h3 id="flow-control">Flow control</h3>
<p>Storm throttles flow rate at spout, which stops sending messages if the number of unacked messages exceeds <code>topology.max.spout.pending</code>.</p>
<p>Gearpump has flow control between tasks such that <a href="gearpump-internals.html#how-do-we-do-flow-control">sender cannot flood receiver</a>, which is backpressured till the source.</p>
<h3 id="configurations">Configurations</h3>
<p>All Storm configurations are respected with the following priority order</p>
<div class="highlight"><pre><code>defaults.yaml &lt; storm.yaml &lt; application config &lt; component config &lt; custom user config
</code></pre></div>
<p>where</p>
<ul>
<li>application config is submit from Storm application along with the topology</li>
<li>component config is set in spout / bolt with <code>getComponentConfiguration</code></li>
<li>custom user config is specified with the <code>-config</code> option when submitting Storm application from command line</li>
</ul>
<h2 id="limitations">Limitations</h2>
<ol>
<li>Trident support is ongoing.</li>
</ol>
</div> <!-- /container -->
<script src="js/vendor/jquery-2.1.4.min.js"></script>
<script src="js/vendor/bootstrap-3.3.5.min.js"></script>
<script src="js/vendor/anchor-1.1.1.min.js"></script>
<script src="js/main.js"></script>
<!-- MathJax Section -->
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: { equationNumbers: { autoNumber: "AMS" } }
});
</script>
<script>
// Note that we load MathJax this way to work with local file (file://), HTTP and HTTPS.
// We could use "//cdn.mathjax...", but that won't support "file://".
(function(d, script) {
script = d.createElement('script');
script.type = 'text/javascript';
script.async = true;
script.onload = function(){
MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ["$", "$"], ["\\\\(","\\\\)"] ],
displayMath: [ ["$$","$$"], ["\\[", "\\]"] ],
processEscapes: true,
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre']
}
});
};
script.src = ('https:' == document.location.protocol ? 'https://' : 'http://') +
'cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML';
d.getElementsByTagName('head')[0].appendChild(script);
}(document));
</script>
</body>
</html>