http://git-wip-us.apache.org/repos/asf/incubator-edgent-website/blob/9b42cd73/content/docs/edgent-getting-started-samples.html ---------------------------------------------------------------------- diff --git a/content/docs/edgent-getting-started-samples.html b/content/docs/edgent-getting-started-samples.html new file mode 100644 index 0000000..467aff4 --- /dev/null +++ b/content/docs/edgent-getting-started-samples.html @@ -0,0 +1,810 @@ +<!DOCTYPE html> + <head> + + <meta charset="utf-8"> +<meta http-equiv="X-UA-Compatible" content="IE=edge"> +<meta name="viewport" content="width=device-width, initial-scale=1"> +<meta name="description" content=""> +<meta name="keywords" content=" "> +<title>Getting started with Apache Edgent Samples | Apache Edgent Documentation</title> +<link rel="stylesheet" type="text/css" href="../css/syntax.css"> +<link rel="stylesheet" type="text/css" href="../css/font-awesome.min.css"> +<!--<link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css">--> +<link rel="stylesheet" type="text/css" href="../css/modern-business.css"> +<link rel="stylesheet" type="text/css" href="../css/lavish-bootstrap.css"> +<link rel="stylesheet" type="text/css" href="../css/customstyles.css"> +<link rel="stylesheet" type="text/css" href="../css/theme-blue.css"> +<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> +<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script> +<script src="../js/jquery.navgoco.min.js"></script> +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script> +<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/2.0.0/anchor.min.js"></script> +<script src="../js/toc.js"></script> +<script src="../js/customscripts.js"></script> +<link rel="shortcut icon" href="../common_images/favicon.ico" type="image/x-icon"> +<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> +<!-- WARNING: Respond.js doesn't work if you view the page via file:// --> +<!--[if lt IE 9]> +<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> +<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> +<![endif]--> + + + + + + + + + +<script> + $(function () { + $('[data-toggle="tooltip"]').tooltip() + }) +</script> + + + + </head> + +<body> + + <!-- Navigation --> +<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"> + <div class="container topnavlinks"> + <div class="navbar-header"> + <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + + <a class="fa fa-home fa-lg navbar-brand" href="../docs/home.html"> <span class="projectTitle"> Apache Edgent Documentation</span></a> + + </div> + <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> + <ul class="nav navbar-nav navbar-right"> + <!-- entries without drop-downs appear here --> + <!-- conditional logic to control which topnav appears for the audience defined in the configuration file.--> + + + + + + + + + + <li class="dropdown"> + + + + <a href="#" class="dropdown-toggle" data-toggle="dropdown">GitHub Repos<b class="caret"></b></a> + <ul class="dropdown-menu"> + + + + <li><a href="https://github.com/apache/incubator-edgent" target="_blank">Source code</a></li> + + + + + + <li><a href="https://github.com/apache/incubator-edgent-website" target="_blank">Website/Documentation</a></li> + + + + + + </ul> + </li> + + + + + <li class="dropdown"> + + + + <a href="#" class="dropdown-toggle" data-toggle="dropdown">Javadoc<b class="caret"></b></a> + <ul class="dropdown-menu"> + + + + <li><a href="..\javadoc\latest">latest</a></li> + + + + + + <li><a href="..\javadoc\r1.1.0">1.1.0</a></li> + + + + + + <li><a href="..\javadoc\r1.0.0">1.0.0</a></li> + + + + + + <li><a href="..\javadoc\r0.4.0">0.4.0</a></li> + + + + + + </ul> + </li> + + + + + <!-- entries with drop-downs appear here --> + <!-- conditional logic to control which topnav appears for the audience defined in the configuration file.--> + + <li class="dropdown"> + + + + <a href="#" class="dropdown-toggle" data-toggle="dropdown">Edgent Resources<b class="caret"></b></a> + <ul class="dropdown-menu"> + + + + <li><a href="downloads">Download</a></li> + + + + + + <li><a href="faq">FAQ</a></li> + + + + + + <li class="dropdownActive"><a href="/">edgent.apache.org</a></li> + + + + + + </ul> + </li> + + + + + <!-- special insertion --> + + + <!-- Send feedback function --> +<script> +function SendLinkByMail(href) { +var subject= "Apache Edgent Documentation feedback"; +var body = "I have some feedback about the Getting started with Apache Edgent Samples page: "; +body += window.location.href; +body += ""; +var uri = "mailto:?subject="; +uri += encodeURIComponent(subject); +uri += "&body="; +uri += encodeURIComponent(body); +window.location.href = uri; +} +</script> + +<li><a href="mailto:d...@edgent.incubator.apache.org" target="_blank"><i class="fa fa-envelope-o"></i> Feedback</a></li> + + + <!--uncomment this block if you want simple search instead of algolia--> + <li> + <!--start search--> + <div id="search-demo-container"> + <input type="text" id="search-input" placeholder="search..."> + <ul id="results-container"></ul> + </div> + <script src="../js/jekyll-search.js" type="text/javascript"></script> + <script type="text/javascript"> + SimpleJekyllSearch.init({ + searchInput: document.getElementById('search-input'), + resultsContainer: document.getElementById('results-container'), + dataSource: '../search.json', + searchResultTemplate: '<li><a href="{url}" title="Getting started with Apache Edgent Samples">{title}</a></li>', + noResultsText: 'No results found.', + limit: 10, + fuzzy: true, + }) + </script> + <!--end search--> + </li> + + + </div> + <!-- /.container --> +</nav> + + + + <!-- Page Content --> + <div class="container"> + <div class="col-lg-12"> </div> + + +<!-- Content Row --> +<div class="row"> + <!-- Sidebar Column --> + <div class="col-md-3"> + + <script> + + $(document).ready(function() { + // Initialize navgoco with default options + $("#mysidebar").navgoco({ + caretHtml: '', + accordion: true, + openClass: 'active', // open + save: true, + cookie: { + name: 'navgoco', + expires: false, + path: '/' + }, + slide: { + duration: 400, + easing: 'swing' + } + }); + + $("#collapseAll").click(function(e) { + e.preventDefault(); + $("#mysidebar").navgoco('toggle', false); + }); + + $("#expandAll").click(function(e) { + e.preventDefault(); + $("#mysidebar").navgoco('toggle', true); + }); + + }); + + </script> + + + + + + + + + + + + + <ul id="mysidebar" class="nav"> + + <span class="siteTagline">Edgent</span> + <span class="versionTagline">Version 1.1.0-incubating</span> + + + + + + + <li><a href="#">Overview</a> + <ul> + + + + + <li><a href="../docs/edgent_index.html">Introduction</a></li> + + + + + + + + + + <li><a href="../docs/home.html">Edgent Overview</a></li> + + + + + + + + + + <li><a href="../docs/power-of-edgent.html">The Power of Edgent</a></li> + + + + + + + + + + <li><a href="../docs/faq.html">FAQ</a></li> + + + + + + + </ul> + + + + <li><a href="#">Get Started</a> + <ul> + + + + + <li><a href="../docs/downloads.html">Downloads</a></li> + + + + + + + + + + <li><a href="../docs/edgent-getting-started.html">Getting Started Guide</a></li> + + + + + + + + + + <li class="active"><a href="../docs/edgent-getting-started-samples.html">Quickstart with Edgent Samples</a></li> + + + + + + + + + + <li><a href="../docs/application-development.html">Understanding App Development</a></li> + + + + + + + + + + <li><a href="../docs/quickstart.html">Quickstart IBM Watson IoT Platform</a></li> + + + + + + + + + + <li><a href="../docs/streaming-concepts.html">Streaming concepts</a></li> + + + + + + + + + + <li><a href="../docs/common-edgent-operations.html">Common operations</a></li> + + + + + + + </ul> + + + + <li><a href="#">Edgent Cookbook</a> + <ul> + + + + + <li><a href="../recipes/recipe_hello_edgent.html">Hello Edgent!</a></li> + + + + + + + + + + <li><a href="../recipes/recipe_source_function.html">Writing a source function</a></li> + + + + + + + + + + <li><a href="../recipes/recipe_value_out_of_range.html">Detecting a sensor value out of expected range</a></li> + + + + + + + + + + <li><a href="../recipes/recipe_different_processing_against_stream.html">Applying different processing against a single stream</a></li> + + + + + + + + + + <li><a href="../recipes/recipe_combining_streams_processing_results.html">Splitting a stream to apply different processing and combining the results into a single stream</a></li> + + + + + + + + + + <li><a href="../recipes/recipe_external_filter_range.html">Using an external configuration file for filter ranges</a></li> + + + + + + + + + + <li><a href="../recipes/recipe_adaptable_filter_range.html">Changing a filter's range</a></li> + + + + + + + + + + <li><a href="../recipes/recipe_adaptable_polling_source.html">Changing a polled source stream's period</a></li> + + + + + + + + + + <li><a href="../recipes/recipe_adaptable_deadtime_filter.html">Using an adaptable deadtime filter</a></li> + + + + + + + + + + <li><a href="../recipes/recipe_dynamic_analytic_control.html">Dynamically enabling analytic flows</a></li> + + + + + + + + + + <li><a href="../recipes/recipe_parallel_analytics.html">How can I run analytics on several tuples in parallel?</a></li> + + + + + + + + + + <li><a href="../recipes/recipe_concurrent_analytics.html">How can I run several analytics on a tuple concurrently?</a></li> + + + + + + + + + + <li><a href="../recipes/recipe_writing_a_connector.html">How do I write a connector?</a></li> + + + + + + + </ul> + + + + <li><a href="#">Using the Console</a> + <ul> + + + + + <li><a href="../docs/console.html">Using the console</a></li> + + + + + + + </ul> + + + + <li><a href="#">Get Involved</a> + <ul> + + + + + <li><a href="../docs/community.html">How to participate</a></li> + + + + + + + + + + <li><a href="../docs/committers.html">Committers</a></li> + + + + + + + </ul> + + + + + + <!-- if you aren't using the accordion, uncomment this block: + + <p class="external"> + <a href="#" id="collapseAll">Collapse All</a> | <a href="#" id="expandAll">Expand All</a> + </p> + --> + <br/> + </li> + </ul> + <div class="row"> + <div class="col-md-12"> + +<!-- this handles the automatic toc. use ## for subheads to auto-generate the on-page minitoc. if you use html tags, you must supply an ID for the heading element in order for it to appear in the minitoc. --> +<script> +$( document ).ready(function() { + // Handler for .ready() called. + +$('#toc').toc({ minimumHeaders: 0, listType: 'ul', showSpeed: 0, headers: 'h2,h3,h4' }); + +/* this offset helps account for the space taken up by the floating toolbar. */ +$('#toc').on('click', 'a', function() { + var target = $(this.getAttribute('href')) + , scroll_target = target.offset().top + + $(window).scrollTop(scroll_target - 10); + return false +}) + +}); +</script> + + +<div id="toc"></div> + + </div> + </div> + </div> + + <!-- this highlights the active parent class in the navgoco sidebar. this is critical so that the parent expands when you're viewing a page. This must appear below the sidebar code above. Otherwise, if placed inside customscripts.js, the script runs before the sidebar code runs and the class never gets inserted.--> + <script>$("li.active").parents('li').toggleClass("active");</script> + + + <!-- Content Column --> + <div class="col-md-9"> + + <div class="post-header"> + <h1 class="post-title-main">Getting started with Apache Edgent Samples</h1> +</div> + +<div class="post-content"> + + + +<!-- this handles the automatic toc. use ## for subheads to auto-generate the on-page minitoc. if you use html tags, you must supply an ID for the heading element in order for it to appear in the minitoc. --> +<script> +$( document ).ready(function() { + // Handler for .ready() called. + +$('#toc').toc({ minimumHeaders: 0, listType: 'ul', showSpeed: 0, headers: 'h2,h3,h4' }); + +/* this offset helps account for the space taken up by the floating toolbar. */ +$('#toc').on('click', 'a', function() { + var target = $(this.getAttribute('href')) + , scroll_target = target.offset().top + + $(window).scrollTop(scroll_target - 10); + return false +}) + +}); +</script> + + +<div id="toc"></div> + + + + + <a target="_blank" href="https://github.com/apache/incubator-edgent-website/blob/master/site/docs/edgent-getting-started-samples.md" class="btn btn-default githubEditButton" role="button"><i class="fa fa-github fa-lg"></i> Edit me</a> + + <p>Getting started with the Edgent samples is a great way to start using Edgent and +jump-start your Edgent application development.</p> + +<p>Be sure to see <em>Additional Resources</em> below for more great info!</p> + +<h1 id="quickstart">Quickstart</h1> + +<p>Convenience binaries (jars) for the Edgent runtime releases are distributed +to the ASF Nexus Repository and the Maven Central Repository. You don't have +to manually download the Edgent jars and there is no need to download the +Edgent runtime sources and build them unless you want to.</p> + +<p>By default the samples depend on Java8. Download and install Java8 if needed.</p> + +<h2 id="download-the-edgent-samples">Download the Edgent Samples</h2> + +<p>Get the Edgent Samples either by cloning or downloading the <a href="https://github.com/apache/incubator-edgent-samples">Edgent Samples GitHub repository</a>:</p> +<div class="highlight"><pre><code class="language-sh" data-lang="sh">git clone https://github.com/apache/incubator-edgent-samples +<span class="nb">cd </span>incubator-edgent-samples +git checkout develop +</code></pre></div> +<p>or to download:</p> + +<ul> +<li>Open the <em>Clone or download</em> pulldown at the <a href="https://github.com/apache/incubator-edgent-samples">Edgent Samples GitHub repository</a></li> +<li>Click on <em>Download ZIP</em></li> +<li>Unpack the downloaded ZIP</li> +</ul> +<div class="highlight"><pre><code class="language-sh" data-lang="sh"> unzip incubator-edgent-samples-develop.zip +</code></pre></div> +<h2 id="build-the-samples">Build the Samples</h2> +<div class="highlight"><pre><code class="language-sh" data-lang="sh"><span class="nb">cd</span> <the cloned or unpacked downloaded samples folder> +./mvnw clean package <span class="c"># build for Java8</span> +</code></pre></div> +<h2 id="run-the-helloedgent-sample">Run the HelloEdgent sample</h2> +<div class="highlight"><pre><code class="language-sh" data-lang="sh"><span class="nb">cd </span>topology +./run-sample.sh HelloEdgent <span class="c"># prints a hello message and terminates</span> + Hello + Edgent! + ... +</code></pre></div> +<h1 id="additional-resources">Additional Resources</h1> + +<p>See <a href="power-of-edgent">The Power of Edgent</a> to help you quickly start to get a sense of Edgent's capabilities. +See the <a href="edgent-getting-started">Getting Started Guide</a> for a tutorial.</p> + +<p>Much more information about the samples is available in the README.md at the <a href="https://github.com/apache/incubator-edgent-samples">Edgent Samples GitHub repository</a>, including:</p> + +<ul> +<li>application development and packaging</li> +<li>application template project</li> +<li>list of samples</li> +<li>using an IDE</li> +</ul> + + +<div class="tags"> + +</div> + +<!-- + + <div id="disqus_thread"></div> + <script type="text/javascript"> + /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */ + var disqus_shortname = 'idrbwjekyll'; // required: replace example with your forum shortname + + /* * * DON'T EDIT BELOW THIS LINE * * */ + (function() { + var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; + dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; + (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); + })(); + </script> + <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> + --> + +</div> + + + +<footer> + <div class="row"> + <div class="col-lg-12 footer"> + + Site last + generated: Dec 15, 2017 <br/> + + </div> + </div> + <br/> + <div class="row"> + <div class="col-md-12"> + <p class="small">Apache Edgent is an effort undergoing Incubation at The Apache Software + Foundation (ASF), sponsored by the Incubator. Incubation is required of all newly accepted projects + until a further review indicates that the infrastructure, communications, and decision making process + have stabilized in a manner consistent with other successful ASF projects. While incubation status is + not necessarily a reflection of the completeness or stability of the code, it does indicate that the + project has yet to be fully endorsed by the ASF.</p> + </div> + </div> + <div class="row"> + <div class="col-md-12"> + <p class="small">Copyright © 2016 The Apache Software Foundation. Licensed under the Apache + License, Version 2.0. + Apache, the Apache Feather logo, and the Apache Incubator project logo are trademarks of The Apache + Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their + respective owners.</p> + </div> + </div> + + <div class="container"> + <div class="row"> + <div> + <img class="img-responsive center-block" src="../img/edgent_incubation.png" style="display: block; margin: auto;"alt=""> + </div> + </div> +</footer> + + </div><!-- /.row --> + + </div> <!-- /.container --> + +</body> + + +</html> +
http://git-wip-us.apache.org/repos/asf/incubator-edgent-website/blob/9b42cd73/content/docs/edgent-getting-started.html ---------------------------------------------------------------------- diff --git a/content/docs/edgent-getting-started.html b/content/docs/edgent-getting-started.html index 08fa1d2..79f4dec 100644 --- a/content/docs/edgent-getting-started.html +++ b/content/docs/edgent-getting-started.html @@ -160,12 +160,6 @@ - <li><a href="samples">Samples</a></li> - - - - - <li><a href="faq">FAQ</a></li> @@ -315,6 +309,26 @@ window.location.href = uri; + <li><a href="../docs/home.html">Edgent Overview</a></li> + + + + + + + + + + <li><a href="../docs/power-of-edgent.html">The Power of Edgent</a></li> + + + + + + + + + <li><a href="../docs/faq.html">FAQ</a></li> @@ -342,7 +356,37 @@ window.location.href = uri; - <li class="active"><a href="../docs/edgent-getting-started.html">Getting started guide</a></li> + <li class="active"><a href="../docs/edgent-getting-started.html">Getting Started Guide</a></li> + + + + + + + + + + <li><a href="../docs/edgent-getting-started-samples.html">Quickstart with Edgent Samples</a></li> + + + + + + + + + + <li><a href="../docs/application-development.html">Understanding App Development</a></li> + + + + + + + + + + <li><a href="../docs/quickstart.html">Quickstart IBM Watson IoT Platform</a></li> @@ -510,33 +554,6 @@ window.location.href = uri; - <li><a href="#">Sample Programs</a> - <ul> - - - - - <li><a href="../docs/samples.html">Samples</a></li> - - - - - - - - - - <li><a href="../docs/quickstart.html">Quickstart IBM Watson IoT Platform</a></li> - - - - - - - </ul> - - - <li><a href="#">Using the Console</a> <ul> @@ -672,97 +689,59 @@ $('#toc').on('click', 'a', function() { <li>Reduce the amount of data that you store</li> </ul> -<p>For more information, see the <a href="home">Edgent overview</a>.</p> +<p>Edgent accellerates your development of applications to push data analytics and machine learning to <em>edge devices</em>. (Edge devices include things like routers, gateways, machines, equipment, sensors, appliances, or vehicles that are connected to a network.) Edgent applications process data locally—such as, in a car, on an Android phone, or on a Raspberry Pi—before it sends data over a network.</p> -<h3 id="apache-edgent-and-streaming-analytics">Apache Edgent and streaming analytics</h3> - -<p>The fundamental building block of an Edgent application is a <strong>stream</strong>: a continuous sequence of tuples (messages, events, sensor readings, and so on).</p> +<p>For example, if your device takes temperature readings from a sensor 1,000 times per second, it is more efficient to process the data locally and send only interesting or unexpected results over the network.</p> -<p>The Edgent API provides the ability to process or analyze each tuple as it appears on a stream, resulting in a derived stream.</p> +<p>See <a href="power-of-edgent">The Power of Edgent</a> to help you quickly start to get a sense of Edgent's capabilities.</p> -<p>Source streams are streams that originate data for analysis, such as readings from a device's temperature sensor.</p> +<p>Releases of Edgent prior to 1.2.0 distributed Edgent and the samples differently than today. See <a href="old-edgent-getting-started">Old Getting Started</a> if you are trying to use an older version.</p> -<p>Streams are terminated using sink functions that can perform local device control or send information to centralized analytic systems through a message hub.</p> +<p>There's a lot of information available to get started with Edgent and no "best order" for navigating it. See the navigation sidebar on the left hand side of this page. In particular it is recommended that you review and visit the various items under <em>Get Started</em>.</p> -<p>Edgent's primary API is functional where streams are sourced, transformed, analyzed or sinked though functions, typically represented as lambda expressions, such as <code>reading -> reading < 50 || reading > 80</code> to filter temperature readings in Fahrenheit.</p> +<p>If you want to get a developent environment setup quickly see the <a href="edgent-getting-started-samples">Quickstart with Edgent Samples</a> item. </p> -<h3 id="downloading-apache-edgent">Downloading Apache Edgent</h3> +<p>The <em>Edgent Cookbook</em> topic includes many well documented recipies that are good for learning and jump-starting the development of your application.</p> -<p>To use Edgent, you need the Edgent JAR files, which you may obtain by completing the following steps.</p> +<p>The rest of this page is a detailed introduction to Edgent using a simple simulated Temperature Sensor application.</p> -<ol> -<li>Locate the Edgent release you would like to use on the <a href="downloads">downloads page</a></li> -<li>In the Bundles column for the desired release: +<h2 id="apache-edgent-and-streaming-analytics">Apache Edgent and streaming analytics</h2> -<ul> -<li>Click on the <em>Binary</em> link if you simply want to use Edgent. This is the easiest method is to get up and running as it contains a pre-built version of Edgent.</li> -<li>Click on the <em>Source</em> link if you would like access to the Edgent source files. If you choose this method, you must manually build Edgent yourself.</li> -</ul></li> -<li>Download the .tgz file from one of the mirror sites</li> -<li>Unpack the downloaded file: <code>tar zxvf apache-edgent-X.X.X-incubating-XXX.tgz</code></li> -<li>Obtain the JARs +<p>The fundamental building block of an Edgent application is a <strong>stream</strong>: a continuous sequence of tuples (messages, events, sensor readings, and so on).</p> -<ul> -<li>If you are using a binary bundle, then the Java 8 JARs are located in <code>edgent-X.X.X/java8</code></li> -<li>If you are using a source bundle, build the source code: +<p>The Edgent API provides the ability to process or analyze each tuple as it appears on a stream, resulting in a derived stream.</p> -<ol> -<li>Install <a href="https://gradle.org/">Gradle</a> if it is not yet installed</li> -<li>Navigate to the unpacked directory: <code>cd edgent-X.X.X-src</code></li> -<li>Run <code>gradle</code> to initialize the Gradle wrapper</li> -<li>Build the code and Javadoc: <code>./gradlew assemble</code></li> -<li>The Java 8 JARs are located in <code>edgent-X.X.X-src/build/distributions/java8</code></li> -</ol></li> -</ul></li> -</ol> +<p>Source streams are streams that originate data for analysis, such as readings from a device's temperature sensor.</p> -<h3 id="setting-up-your-environment">Setting up your environment</h3> +<p>Streams are terminated using sink functions that can perform local device control or send information to external services such as centralized analytic systems through a message hub.</p> -<p>Ensure that you are running a supported environment. For more information, see the <a href="home">Edgent overview</a>. This guide assumes you're running Java 8. The Edgent Java 8 JAR files are located in either the <code>edgent-X.X.X/java8</code> or <code>edgent-X.X.X-src/build/distributions/java8</code> directory, depending on whether you downloaded a binary or source bundle.</p> +<p>Edgent's primary API is functional where streams are sourced, transformed, analyzed or sinked though functions, typically represented as Java8 lambda expressions, such as <code>reading -> reading < 50 || reading > 80</code> to filter temperature readings in Fahrenheit.</p> -<ol> -<li><p>Create a new Java project in Eclipse, and specify Java 8 as the execution environment JRE:</p> +<p>A <strong>topology</strong> is a graph of streams and their processing transformations. A <strong>provider</strong> is a factory for creating and executing topologies.</p> -<p><img src="images/New_Java_Project.jpg"></p></li> -<li><p>Include one or more Edgent JARs in your project's build path depending on what features your application uses:</p> +<p>Basic Edgent Applications follow a common structure:</p> <ol> -<li>Include one or more of the topology providers: - -<ul> -<li><code>java8/lib/edgent.providers.development.jar</code> (if using the <a href="/javadoc/latest/org/apache/edgent/providers/development/DevelopmentProvider.html">DevelopmentProvider</a>)</li> -<li><code>java8/lib/edgent.providers.direct.jar</code>(if using the <a href="/javadoc/latest/org/apache/edgent/providers/direct/DirectProvider.html">DirectProvider</a>)</li> -<li><code>java8/lib/edgent.providers.iot.jar</code> (if using the <a href="/javadoc/latest/org/apache/edgent/providers/iot/IotProvider.html">IotProvider</a>)</li> -</ul></li> -<li>Include the JARs for any Edgent connectors or analytic features you use in <code>java8/connectors</code> and <code>java8/analytics</code>, respectively</li> -<li>Include the JARs for any Edgent utility features you use: - -<ul> -<li><code>java8/utils/metrics/lib/edgent.utils.metrics.jar</code> (for the <a href="/javadoc/latest/org/apache/edgent/metrics/package-summary.html">org.apache.edgent.metrics</a> package)</li> -<li><code>java8/utils/streamscope/lib/edgent.utils.streamscope.jar</code> (for the <a href="/javadoc/latest/org/apache/edgent/streamscope/package-summary.html">org.apache.edgent.streamscope</a> package)</li> -</ul></li> -<li>Include the JAR for the <a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/package-summary.html">java.util.logging</a> framework for <a href="https://www.slf4j.org/">SLF4J</a>: <code>java8/ext/slf4j-jdk14-X.X.X.jar</code></li> -</ol> - -<p><img src="images/Build_Path_JARs.jpg"></p></li> +<li>Get a provider</li> +<li>Create the topology and compose its processing graph</li> +<li>Submit the topology for execution</li> </ol> -<p>Your environment is set up! You can start writing your first Edgent application.</p> +<p>More sophisticated applications may consist of multiple topologies that may be dynamically created and started and stopped using commands from external applications.</p> -<h2 id="creating-a-simple-application">Creating a simple application</h2> +<h2 id="temperature-sensor-application">Temperature Sensor Application</h2> <p>If you're new to Edgent or to writing streaming applications, the best way to get started is to write a simple program.</p> -<p>Edgent is a framework that pushes data analytics and machine learning to <em>edge devices</em>. (Edge devices include things like routers, gateways, machines, equipment, sensors, appliances, or vehicles that are connected to a network.) Edgent enables you to process data locally—such as, in a car engine, on an Android phone, or on a Raspberry Pi—before you send data over a network.</p> +<p>First we'll go over the details of the application, then we'll run it.</p> + +<p>Let's create a simple Temperature Sensor Application. The application takes temperature readings from a sensor 1,000 times per second. Instead of reporting each reading, it is more efficient to process the data locally and send only interesting or unexpected results over the network.</p> -<p>For example, if your device takes temperature readings from a sensor 1,000 times per second, it is more efficient to process the data locally and send only interesting or unexpected results over the network. To simulate this, let's define a (simulated) TempSensor class:</p> +<p>To simulate this, let's define a (simulated) TempSensor class:</p> <div class="highlight"><pre><code class="language-java" data-lang="java"><span class="kn">import</span> <span class="nn">java.util.Random</span><span class="o">;</span> <span class="kn">import</span> <span class="nn">org.apache.edgent.function.Supplier</span><span class="o">;</span> -<span class="cm">/** - * Every time get() is called, TempSensor generates a temperature reading. - */</span> <span class="kd">public</span> <span class="kd">class</span> <span class="nc">TempSensor</span> <span class="kd">implements</span> <span class="n">Supplier</span><span class="o"><</span><span class="n">Double</span><span class="o">></span> <span class="o">{</span> <span class="kt">double</span> <span class="n">currentTemp</span> <span class="o">=</span> <span class="mf">65.0</span><span class="o">;</span> <span class="n">Random</span> <span class="n">rand</span><span class="o">;</span> @@ -772,7 +751,7 @@ $('#toc').on('click', 'a', function() { <span class="o">}</span> <span class="nd">@Override</span> - <span class="kd">public</span> <span class="n">Double</span> <span class="nf">get</span><span class="o">()</span> <span class="o">{</span> + <span class="kd">public</span> <span class="n">Double</span> <span class="n">get</span><span class="o">()</span> <span class="o">{</span> <span class="c1">// Change the current temperature some random amount</span> <span class="kt">double</span> <span class="n">newTemp</span> <span class="o">=</span> <span class="n">rand</span><span class="o">.</span><span class="na">nextGaussian</span><span class="o">()</span> <span class="o">+</span> <span class="n">currentTemp</span><span class="o">;</span> <span class="n">currentTemp</span> <span class="o">=</span> <span class="n">newTemp</span><span class="o">;</span> @@ -780,9 +759,9 @@ $('#toc').on('click', 'a', function() { <span class="o">}</span> <span class="o">}</span> </code></pre></div> -<p>Every time you call <code>TempSensor.get()</code>, it returns a new temperature reading. The continuous temperature readings are a stream of data that an Edgent application can process.</p> +<p>Every time <code>TempSensor.get()</code> is called, it returns a new temperature reading.</p> -<p>Our sample Edgent application processes this stream by filtering the data and printing the results. Let's define a TempSensorApplication class for the application:</p> +<p>Our application composes a topology that creates a continuous stream of temperature readings and processes this stream by filtering the data and printing the results. Let's define a TempSensorApplication class for the application:</p> <div class="highlight"><pre><code class="language-java" data-lang="java"><span class="kn">import</span> <span class="nn">java.util.concurrent.TimeUnit</span><span class="o">;</span> <span class="kn">import</span> <span class="nn">org.apache.edgent.providers.direct.DirectProvider</span><span class="o">;</span> @@ -790,69 +769,76 @@ $('#toc').on('click', 'a', function() { <span class="kn">import</span> <span class="nn">org.apache.edgent.topology.Topology</span><span class="o">;</span> <span class="kd">public</span> <span class="kd">class</span> <span class="nc">TempSensorApplication</span> <span class="o">{</span> - <span class="kd">public</span> <span class="kd">static</span> <span class="kt">void</span> <span class="nf">main</span><span class="o">(</span><span class="n">String</span><span class="o">[]</span> <span class="n">args</span><span class="o">)</span> <span class="kd">throws</span> <span class="n">Exception</span> <span class="o">{</span> + <span class="kd">public</span> <span class="kd">static</span> <span class="kt">void</span> <span class="n">main</span><span class="o">(</span><span class="n">String</span><span class="o">[]</span> <span class="n">args</span><span class="o">)</span> <span class="kd">throws</span> <span class="n">Exception</span> <span class="o">{</span> <span class="n">TempSensor</span> <span class="n">sensor</span> <span class="o">=</span> <span class="k">new</span> <span class="n">TempSensor</span><span class="o">();</span> <span class="n">DirectProvider</span> <span class="n">dp</span> <span class="o">=</span> <span class="k">new</span> <span class="n">DirectProvider</span><span class="o">();</span> <span class="n">Topology</span> <span class="n">topology</span> <span class="o">=</span> <span class="n">dp</span><span class="o">.</span><span class="na">newTopology</span><span class="o">();</span> + <span class="n">TStream</span><span class="o"><</span><span class="n">Double</span><span class="o">></span> <span class="n">tempReadings</span> <span class="o">=</span> <span class="n">topology</span><span class="o">.</span><span class="na">poll</span><span class="o">(</span><span class="n">sensor</span><span class="o">,</span> <span class="mi">1</span><span class="o">,</span> <span class="n">TimeUnit</span><span class="o">.</span><span class="na">MILLISECONDS</span><span class="o">);</span> <span class="n">TStream</span><span class="o"><</span><span class="n">Double</span><span class="o">></span> <span class="n">filteredReadings</span> <span class="o">=</span> <span class="n">tempReadings</span><span class="o">.</span><span class="na">filter</span><span class="o">(</span><span class="n">reading</span> <span class="o">-></span> <span class="n">reading</span> <span class="o"><</span> <span class="mi">50</span> <span class="o">||</span> <span class="n">reading</span> <span class="o">></span> <span class="mi">80</span><span class="o">);</span> - <span class="n">filteredReadings</span><span class="o">.</span><span class="na">print</span><span class="o">();</span> + <span class="n">dp</span><span class="o">.</span><span class="na">submit</span><span class="o">(</span><span class="n">topology</span><span class="o">);</span> <span class="o">}</span> <span class="o">}</span> </code></pre></div> -<p>To understand how the application processes the stream, let's review each line.</p> +<p>Let's review each line.</p> <h3 id="specifying-a-provider">Specifying a provider</h3> -<p>Your first step when you write an Edgent application is to create a <a href="/javadoc/latest/index.html?org/apache/edgent/providers/direct/DirectProvider.html"><code>DirectProvider</code></a>:</p> +<p>Your first step when you write an Edgent application is to create a <em>Provider</em>. In this case we're using a <a href="/javadoc/latest/index.html?org/apache/edgent/providers/direct/DirectProvider.html">DirectProvider</a>:</p> <div class="highlight"><pre><code class="language-java" data-lang="java"><span class="n">DirectProvider</span> <span class="n">dp</span> <span class="o">=</span> <span class="k">new</span> <span class="n">DirectProvider</span><span class="o">();</span> </code></pre></div> -<p>A <code>Provider</code> is an object that contains information on how and where your Edgent application will run. A <code>DirectProvider</code> is a type of Provider that runs your application directly within the current virtual machine when its <a href="/javadoc/latest/org/apache/edgent/providers/direct/DirectProvider.html#submit-org.apache.edgent.topology.Topology-"><code>submit()</code></a> method is called.</p> +<p>A <code>Provider</code> is an object that contains information on how and where your Edgent application will run. A <code>DirectProvider</code> is a type of Provider that runs your application directly within the current virtual machine when its <a href="/javadoc/latest/org/apache/edgent/providers/direct/DirectProvider.html#submit-org.apache.edgent.topology.Topology-">submit()</a> method is called.</p> + +<p>The <a href="/javadoc/latest/index.html?org/apache/edgent/providers/iot/IotProvider.html">IotProvider</a> is an alternative that offers very useful and powerful capabilities.</p> <h3 id="creating-a-topology">Creating a topology</h3> -<p>Additionally, a Provider is used to create a <a href="/javadoc/latest/index.html?org/apache/edgent/topology/Topology.html"><code>Topology</code></a> instance:</p> +<p>The Provider is used to create a <a href="/javadoc/latest/index.html?org/apache/edgent/topology/Topology.html">Topology</a> instance:</p> <div class="highlight"><pre><code class="language-java" data-lang="java"><span class="n">Topology</span> <span class="n">topology</span> <span class="o">=</span> <span class="n">dp</span><span class="o">.</span><span class="na">newTopology</span><span class="o">();</span> </code></pre></div> -<p>In Edgent, <code>Topology</code> is a container that describes the structure of your application:</p> +<p>In Edgent, <code>Topology</code> is a container that describes the structure of your processing graph:</p> <ul> <li>Where the streams in the application come from</li> <li>How the data in the stream is modified</li> </ul> -<p>In the TempSensorApplication class above, we have exactly one data source: the <code>TempSensor</code> object. We define the source stream by calling <a href="/javadoc/latest/org/apache/edgent/topology/Topology.html#poll-org.apache.edgent.function.Supplier-long-java.util.concurrent.TimeUnit-"><code>topology.poll()</code></a>, which takes both a <a href="/javadoc/latest/index.html?org/apache/edgent/function/Supplier.html"><code>Supplier</code></a> function and a time parameter to indicate how frequently readings should be taken. In our case, we read from the sensor every millisecond:</p> +<p>Our application then composes the topology's progessing graph.</p> + +<h3 id="creating-a-source-tstream">Creating a source <code>TStream</code></h3> + +<p>In the <code>TempSensorApplication</code> class above, we have exactly one data source: the <code>TempSensor</code> object. We define the source stream by calling <a href="/javadoc/latest/org/apache/edgent/topology/Topology.html#poll-org.apache.edgent.function.Supplier-long-java.util.concurrent.TimeUnit-">topology.poll()</a>, which takes both a <a href="/javadoc/latest/index.html?org/apache/edgent/function/Supplier.html">Supplier</a> function and a time parameter to indicate how frequently readings should be taken. In our case, we read from the sensor every millisecond:</p> <div class="highlight"><pre><code class="language-java" data-lang="java"><span class="n">TStream</span><span class="o"><</span><span class="n">Double</span><span class="o">></span> <span class="n">tempReadings</span> <span class="o">=</span> <span class="n">topology</span><span class="o">.</span><span class="na">poll</span><span class="o">(</span><span class="n">sensor</span><span class="o">,</span> <span class="mi">1</span><span class="o">,</span> <span class="n">TimeUnit</span><span class="o">.</span><span class="na">MILLISECONDS</span><span class="o">);</span> </code></pre></div> -<h3 id="defining-the-tstream-object">Defining the <code>TStream</code> object</h3> - -<p>Calling <code>topology.poll()</code> to define a source stream creates a <code>TStream<Double></code> instance, which represents the series of readings taken from the temperature sensor.</p> +<p>Calling <code>topology.poll()</code> to define a source stream creates a <code>TStream<Double></code> instance (because <code>TempSensor.get()</code> returns a <code>Double</code>), which represents the series of readings taken from the temperature sensor.</p> -<p>A streaming application can run indefinitely, so the <a href="/javadoc/latest/index.html?org/apache/edgent/topology/TStream.html"><code>TStream</code></a> might see an arbitrarily large number of readings pass through it. Because a <code>TStream</code> represents the flow of your data, it supports a number of operations which allow you to modify your data.</p> +<p>A streaming application can run indefinitely, so the <a href="/javadoc/latest/index.html?org/apache/edgent/topology/TStream.html">TStream</a> might see an arbitrarily large number of readings pass through it. Because a <code>TStream</code> represents the flow of your data, it supports a number of operations which allow you to modify your data.</p> <h3 id="filtering-a-tstream">Filtering a <code>TStream</code></h3> -<p>In our example, we want to filter the stream of temperature readings, and remove any "uninteresting" or expected readings—specifically readings which are above 50 degrees and below 80 degrees. To do this, we call the <code>TStream</code>'s <a href="/javadoc/latest/org/apache/edgent/topology/TStream.html#filter-org.apache.edgent.function.Predicate-"><code>filter</code></a> method and pass in a function that returns <em>true</em> if the data is interesting and <em>false</em> if the data is uninteresting:</p> +<p>In our example, we want to filter the stream of temperature readings, and remove any "uninteresting" or expected readings—specifically readings which are above 50 degrees and below 80 degrees. To do this, we call the <code>TStream</code>'s <a href="/javadoc/latest/org/apache/edgent/topology/TStream.html#filter-org.apache.edgent.function.Predicate-">filter</a> method and pass in a function that returns <em>true</em> if the data is interesting and <em>false</em> if the data is uninteresting:</p> <div class="highlight"><pre><code class="language-java" data-lang="java"><span class="n">TStream</span><span class="o"><</span><span class="n">Double</span><span class="o">></span> <span class="n">filteredReadings</span> <span class="o">=</span> <span class="n">tempReadings</span><span class="o">.</span><span class="na">filter</span><span class="o">(</span><span class="n">reading</span> <span class="o">-></span> <span class="n">reading</span> <span class="o"><</span> <span class="mi">50</span> <span class="o">||</span> <span class="n">reading</span> <span class="o">></span> <span class="mi">80</span><span class="o">);</span> </code></pre></div> -<p>As you can see, the function that is passed to <code>filter</code> operates on each tuple individually. Unlike data streaming frameworks like <a href="https://spark.apache.org/">Apache Spark</a>, which operate on a collection of data in batch mode, Edgent achieves low latency processing by manipulating each piece of data as soon as it becomes available. Filtering a <code>TStream</code> produces another <code>TStream</code> that contains only the filtered tuples; for example, the <code>filteredReadings</code> stream.</p> +<p>As you can see, the function that is passed to <code>filter</code> operates on each tuple individually. Unlike data streaming frameworks like <a href="https://spark.apache.org/">Apache Spark</a>, which operate on a collection of data in batch mode, Edgent achieves low latency processing by manipulating each piece of data as soon as it becomes available. Filtering a <code>TStream</code> produces another <code>TStream</code> that contains only the filtered tuples; in this case, the <code>filteredReadings</code> stream.</p> <h3 id="printing-to-output">Printing to output</h3> -<p>When our application detects interesting data (data outside of the expected parameters), we want to print results. You can do this by calling the <a href="/javadoc/latest/org/apache/edgent/topology/TStream.html#print--"><code>TStream.print()</code></a> method, which prints using <code>.toString()</code> on each tuple that passes through the stream:</p> +<p>When our application detects interesting data (data outside of the expected parameters), we want to print results. You can do this by calling the <a href="/javadoc/latest/org/apache/edgent/topology/TStream.html#print--">TStream.print()</a> method, which prints using <code>.toString()</code> on each tuple that passes through the stream:</p> <div class="highlight"><pre><code class="language-java" data-lang="java"><span class="n">filteredReadings</span><span class="o">.</span><span class="na">print</span><span class="o">();</span> </code></pre></div> <p>Unlike <code>TStream.filter()</code>, <code>TStream.print()</code> does not produce another <code>TStream</code>. This is because <code>TStream.print()</code> is a <strong>sink</strong>, which represents the terminus of a stream.</p> -<p>In addition to <code>TStream.print()</code> there are other sink operations that send tuples to an MQTT server, JDBC connection, file, or Kafka cluster. Additionally, you can define your own sink by invoking <a href="/javadoc/latest/org/apache/edgent/topology/TStream.html#sink-org.apache.edgent.function.Consumer-"><code>TStream.sink()</code></a> and passing in your own function.</p> +<p>A real application typically publishes results to an MQTT server, IoT Hub, Kafka cluster, file, JDBC connection, or other external system. Edgent comes easy to use connectors for these. See the <em>connectors</em> samples, <a href="/javadoc/latest">Edgent Javadoc</a>, and <em>Edgent Cookbook</em> for more information.</p> -<h3 id="submitting-your-application">Submitting your application</h3> +<p>You can define your own sink by invoking <a href="/javadoc/latest/org/apache/edgent/topology/TStream.html#sink-org.apache.edgent.function.Consumer-">TStream.sink()</a> and passing in your own function.</p> -<p>Now that your application has been completely declared, the final step is to run your application.</p> +<h3 id="submitting-your-topology">Submitting your topology</h3> -<p><code>DirectProvider</code> contains a <code>submit()</code> method, which runs your application directly within the current virtual machine:</p> +<p>Now that your topology / processing graph has been completely declared, the final step is to run it.</p> + +<p><code>DirectProvider</code> contains a <code>submit()</code> method, which runs a topology directly within the current virtual machine:</p> <div class="highlight"><pre><code class="language-java" data-lang="java"><span class="n">dp</span><span class="o">.</span><span class="na">submit</span><span class="o">(</span><span class="n">topology</span><span class="o">);</span> </code></pre></div> <p>After you run your program, you should see output containing only "interesting" data coming from your sensor:</p> @@ -865,18 +851,85 @@ $('#toc').on('click', 'a', function() { </code></pre></div> <p>As you can see, all temperatures are outside the 50-80 degree range. In terms of a real-world application, this would prevent a device from sending superfluous data over a network, thereby reducing communication costs.</p> -<h2 id="further-examples">Further examples</h2> +<h3 id="building-and-running">Building and Running</h3> + +<p>Its easiest to use the Edgent Samples Source release to get started.</p> + +<p>If you just want to see this application in action, it's one of the provided samples!</p> + +<p>Go to <a href="edgent-getting-started-samples">Getting Started with Samples</a> to get and build the samples.</p> + +<p>Then you can run this application from the command line:</p> +<div class="highlight"><pre><code class="language-sh" data-lang="sh"><span class="nb">cd</span> <the-unpacked-samples-root-folder> +<span class="nb">cd </span>topology; ./run-sample.sh TempSensorApplication + 46.59272336309031 + 46.681544551652934 + ... +^C to terminate it +</code></pre></div> +<p>If you setup an Eclipse workspace with the samples, you can run the application from Eclipse:</p> + +<ol> +<li>From the Eclipse <em>Navigate</em> menu, select <em>Open Type</em> + +<ul> +<li>enter type type name <code>TempSensorApplication</code> and click <em>OK</em></li> +</ul></li> +<li>right click on the <code>TempSensorApplication</code> class name and from the context menu + +<ul> +<li>click on <em>Run As</em>, then <em>Java application</em>.<br> +<code>TempSensorApplication</code> runs and prints to the Console view. +Click on the <code>terminate</code> control in the Console view to stop the application.</li> +</ul></li> +</ol> + +<h3 id="creating-your-own-project">Creating your own project</h3> -<p>This example demonstrates a small piece of Edgent's functionality. Edgent supports more complicated topologies, such as topologies that require merging and splitting data streams, or perform operations which aggregate the last <em>N</em> seconds of data (for example, calculating a moving average).</p> +<p>In this flow we'll take you though creating a new project for this application. +Its easiest to use the <code>template</code> project in the Edgent Samples to get started.</p> -<p>For more complex examples, see:</p> +<p>Go to <a href="edgent-getting-started-samples">Getting Started with Samples</a> and follow the steps to</p> <ul> -<li><a href="samples">Edgent sample programs</a></li> -<li><a href="streaming-concepts">Stream processing concepts</a></li> -<li><a href="common-edgent-operations">Common Edgent operations</a></li> +<li>do the general samples setup</li> +<li>clone the <code>template</code> project to use for this application</li> </ul> +<p>Then create the <code>TempSensor.java</code> and <code>TempSensorApplication.java</code> files in the project, copying in the above code.</p> + +<p>To build and run from the command line, see the new project's README.md (copied in from the template). +In the project's folder (adjust the package name below if appropriate)</p> +<div class="highlight"><pre><code class="language-sh" data-lang="sh">./mvnw clean package +./app-run.sh --main com.mycompany.app.TempSensorApplication + 46.59272336309031 + 46.681544551652934 + ... +^C to terminate it +</code></pre></div> +<p>If you setup the cloned template in an Eclipse workspace:</p> + +<ol> +<li>From the Eclipse <em>Navigate</em> menu, select <em>Open Type</em> + +<ul> +<li>enter type type name <code>TempSensorApplication</code> and click <em>OK</em></li> +</ul></li> +<li>right click on the <code>TempSensorApplication</code> class name and from the context menu + +<ul> +<li>click on <em>Run As</em>, then <em>Java application</em>.<br> +<code>TempSensorApplication</code> runs and prints to the Console view. +Click on the <code>terminate</code> control in the Console view to stop the application.</li> +</ul></li> +</ol> + +<h2 id="next-steps">Next Steps</h2> + +<p>This introduction demonstrates a small piece of Edgent's functionality. Edgent supports more complicated topologies, such as topologies that require merging and splitting data streams, or perform operations which aggregate the last <em>N</em> seconds of data (for example, calculating a moving average). Typically your application will want to publish to an IoT hub and be controlled by applications in a data center.</p> + +<p>There are many more useful resources under the <em>Get Started</em> and <em>Edgent Cookbook</em> topics in the navigation sidebar on the left hand side of this page.</p> + <div class="tags"> @@ -908,7 +961,7 @@ $('#toc').on('click', 'a', function() { <div class="col-lg-12 footer"> Site last - generated: May 15, 2017 <br/> + generated: Dec 15, 2017 <br/> </div> </div> http://git-wip-us.apache.org/repos/asf/incubator-edgent-website/blob/9b42cd73/content/docs/edgent_index.html ---------------------------------------------------------------------- diff --git a/content/docs/edgent_index.html b/content/docs/edgent_index.html index e83b689..7a2f53c 100644 --- a/content/docs/edgent_index.html +++ b/content/docs/edgent_index.html @@ -160,12 +160,6 @@ - <li><a href="samples">Samples</a></li> - - - - - <li><a href="faq">FAQ</a></li> @@ -315,6 +309,26 @@ window.location.href = uri; + <li><a href="../docs/home.html">Edgent Overview</a></li> + + + + + + + + + + <li><a href="../docs/power-of-edgent.html">The Power of Edgent</a></li> + + + + + + + + + <li><a href="../docs/faq.html">FAQ</a></li> @@ -342,7 +356,37 @@ window.location.href = uri; - <li><a href="../docs/edgent-getting-started.html">Getting started guide</a></li> + <li><a href="../docs/edgent-getting-started.html">Getting Started Guide</a></li> + + + + + + + + + + <li><a href="../docs/edgent-getting-started-samples.html">Quickstart with Edgent Samples</a></li> + + + + + + + + + + <li><a href="../docs/application-development.html">Understanding App Development</a></li> + + + + + + + + + + <li><a href="../docs/quickstart.html">Quickstart IBM Watson IoT Platform</a></li> @@ -510,33 +554,6 @@ window.location.href = uri; - <li><a href="#">Sample Programs</a> - <ul> - - - - - <li><a href="../docs/samples.html">Samples</a></li> - - - - - - - - - - <li><a href="../docs/quickstart.html">Quickstart IBM Watson IoT Platform</a></li> - - - - - - - </ul> - - - <li><a href="#">Using the Console</a> <ul> @@ -721,7 +738,7 @@ $('#toc').on('click', 'a', function() { <div class="col-lg-12 footer"> Site last - generated: May 15, 2017 <br/> + generated: Dec 15, 2017 <br/> </div> </div> http://git-wip-us.apache.org/repos/asf/incubator-edgent-website/blob/9b42cd73/content/docs/faq.html ---------------------------------------------------------------------- diff --git a/content/docs/faq.html b/content/docs/faq.html index 72e4b75..06868f3 100644 --- a/content/docs/faq.html +++ b/content/docs/faq.html @@ -160,12 +160,6 @@ - <li><a href="samples">Samples</a></li> - - - - - <li class="dropdownActive"><a href="faq">FAQ</a></li> @@ -315,6 +309,26 @@ window.location.href = uri; + <li><a href="../docs/home.html">Edgent Overview</a></li> + + + + + + + + + + <li><a href="../docs/power-of-edgent.html">The Power of Edgent</a></li> + + + + + + + + + <li class="active"><a href="../docs/faq.html">FAQ</a></li> @@ -342,7 +356,37 @@ window.location.href = uri; - <li><a href="../docs/edgent-getting-started.html">Getting started guide</a></li> + <li><a href="../docs/edgent-getting-started.html">Getting Started Guide</a></li> + + + + + + + + + + <li><a href="../docs/edgent-getting-started-samples.html">Quickstart with Edgent Samples</a></li> + + + + + + + + + + <li><a href="../docs/application-development.html">Understanding App Development</a></li> + + + + + + + + + + <li><a href="../docs/quickstart.html">Quickstart IBM Watson IoT Platform</a></li> @@ -510,33 +554,6 @@ window.location.href = uri; - <li><a href="#">Sample Programs</a> - <ul> - - - - - <li><a href="../docs/samples.html">Samples</a></li> - - - - - - - - - - <li><a href="../docs/quickstart.html">Quickstart IBM Watson IoT Platform</a></li> - - - - - - - </ul> - - - <li><a href="#">Using the Console</a> <ul> @@ -665,51 +682,74 @@ $('#toc').on('click', 'a', function() { <h2 id="what-is-apache-edgent">What is Apache Edgent?</h2> -<p>Edgent provides APIs and a lightweight runtime to analyze streaming data at the edge.</p> +<p>Edgent provides APIs and a lightweight runtime enabling you to easily create event-driven flow-graph style applications to analyze streaming data at the edge. + Check out <a href="power-of-edgent">The Power of Edgent</a> to help you guickly gain an appreciation of how Edgent can help you.</p> <h2 id="what-do-you-mean-by-the-edge">What do you mean by the edge?</h2> <p>The edge includes devices, gateways, equipment, vehicles, systems, appliances and sensors of all kinds as part of the Internet of Things.</p> -<h2 id="how-is-apache-edgent-used">How is Apache Edgent used?</h2> +<p>It's easy for for Edgent applications to connect to other entities such as an enterprise IoT hub.</p> -<p>Edgent can be used at the edge of the Internet of Things, for example, to analyze data on devices, engines, connected cars, etc. Edgent could be on the device itself, or a gateway device collecting data from local devices. You can write an edge application on Edgent and connect it to a Cloud service, such as the IBM Watson IoT Platform. It can also be used for enterprise data collection and analysis; for example log collectors, application data, and data center analytics.</p> +<p>While Edgent's design center is executing on constrained edge devices, Edgent applications can run on any system meeting minimal requirements such as a Java runtime.</p> <h2 id="how-are-applications-developed">How are applications developed?</h2> -<p>Applications are developed using a functional flow API to define operations on data streams that are executed as a graph of "oplets" in a lightweight embeddable runtime. The SDK provides capabilities like windowing, aggregation and connectors with an extensible model for the community to expand its capabilities.</p> +<p>Applications are developed using a functional flow API to define operations on data streams that are executed as a flow graph in a lightweight embeddable runtime. Edgent provides capabilities like windowing, aggregation and connectors with an extensible model for the community to expand its capabilities. Check out <a href="power-of-edgent">The Power of Edgent</a>!</p> + +<p>You can develop Edgent applications using an IDE of your choice. </p> -<h2 id="what-apis-does-apache-edgent-support">What APIs does Apache Edgent support?</h2> +<p>Generally, mechanisms for deploying an Edgent application to a device are beyond the scope of Edgent; they are often device specific or may be defined by an enterprise IoT system. To deploy an Edgent application to a device like a Raspberry Pi, you could just FTP the application to the device and modify the device to start the application upon startup or on command. See <a href="application-development">Edgent application Development</a>.</p> -<p>Currently, Edgent supports APIs for Java and Android. Support for additional languages, such as Python, is likely as more developers get involved. Please consider joining the Edgent open source development community to accelerate the contributions of additional APIs.</p> +<h2 id="what-environments-does-apache-edgent-support">What environments does Apache Edgent support?</h2> + +<p>Currently, Edgent provides APIs and runtime for Java and Android. Support for additional languages, such as Python, is likely as more developers get involved. Please consider joining the Edgent open source development community to accelerate the contributions of additional APIs.</p> <h2 id="what-type-of-analytics-can-be-done-with-apache-edgent">What type of analytics can be done with Apache Edgent?</h2> -<p>Edgent provides windowing, aggregation and simple filtering. It uses Apache Common Math to provide simple analytics aimed at device sensors. Edgent is also extensible, so you can call existing libraries from within your Edgent application. In the future, Edgent will include more analytics, either exposing more functionality from Apache Common Math, other libraries or hand-coded analytics.</p> +<p>The core Edgent APIs make it easy to incorporate any analytics you want into the stream processing graph. It's trivial to create windows and trigger aggregation functions you supply. It's trivial to specify whatever filtering and transformation functions you want to supply. The functions you supply can use existing libraries.</p> + +<p>Edgent comes with some initial analytics for aggregation and filtering that you may find useful. It uses Apache Common Math to provide simple analytics aimed at device sensors. In the future, Edgent will include more analytics, either exposing more functionality from Apache Common Math, other libraries or hand-coded analytics.</p> <h2 id="what-connectors-does-apache-edgent-support">What connectors does Apache Edgent support?</h2> -<p>Edgent supports connectors for MQTT, HTTP, JDBC, File, Apache Kafka and IBM Watson IoT Platform. Edgent is extensible; you can add the connector of your choice.</p> +<p>Edgent provides easy to use connectors for MQTT, HTTP, JDBC, File, Apache Kafka and IBM Watson IoT Platform. Edgent is extensible; you can create connectors. You can easily supply any code you want for ingesting data from and sinking data to external systems. See <a href="https://issues.apache.org/jira/browse/EDGENT-368">EDGENT-368</a> for a full code sample of publishing to Elasticsearch.</p> + +<h2 id="does-edgent-have-a-sensor-library">Does Edgent have a Sensor Library?</h2> + +<p>No, Edgent does not come with a library for accessing a device's sensors. The simplicity with which an Edgent application can poll or otherwise use existing APIs for reading a sensor value make such a library unnecessary.</p> <h2 id="what-centralized-streaming-analytic-systems-does-apache-edgent-support">What centralized streaming analytic systems does Apache Edgent support?</h2> -<p>Edgent supports open source technology (such as Apache Spark, Apache Storm, Flink and samza), IBM Streams (on-premises or IBM Streaming Analytics on Bluemix), or any custom application of your choice.</p> +<p>Edgent applications can publish and subscribe to message systems like MQTT or Kafka, or IoT Hubs like IBM Watson IoT Platform. Centralized streaming analytic systems can do likewise to then consume Edgent application events and data, as well as control an Edgent application. The centralized streaming analytic system could be Apache Spark, Apache Storm, Flink and Samza, IBM Streams (on-premises or IBM Streaming Analytics on Bluemix), or any custom application of your choice.</p> + +<h2 id="is-there-a-distributed-version-of-edgent">Is there a distributed version of Edgent?</h2> + +<p>The short answer is that a single Edgent application's topologies all run in the same local JVM. </p> + +<p>But sometimes this question is really asking "Can separate Edgent topologies communicate with each other?" and the answer to that is YES!</p> + +<p>Today, multiple topologies in a single Edgent application/JVM can communicate using the Edgent PublishSubscribe connector, or any other shared resource you choose to use (e.g., a java.util.concurrent.BlockingQueue).</p> + +<p>Edgent topologies in separate JVM's, or the same JVM, can communicate with each other by using existing connectors to a local or remote MQTT server for example.</p> <h2 id="why-do-i-need-apache-edgent-on-the-edge-rather-than-my-streaming-analytic-system">Why do I need Apache Edgent on the edge, rather than my streaming analytic system?</h2> -<p>Edgent is designed for the edge, rather than a more centralized system. It has a small footprint, suitable for running on devices. Edgent provides simple analytics, allowing a device to analyze data locally and to only send to the centralized system if there is a need, reducing communication costs.</p> +<p>Edgent is designed for the edge. It has a small footprint, suitable for running on constrained devices. Edgent applications can analyze data on the edge and to only send to the centralized system if there is a need, reducing communication costs.</p> <h2 id="why-do-i-need-apache-edgent-rather-than-coding-the-complete-application-myself">Why do I need Apache Edgent, rather than coding the complete application myself?</h2> -<p>Edgent is a tool for edge analytics that allows you to be more productive. Edgent provides a consistent data model (streams and windows) and provides useful functionality, such as aggregations, joins, etc. Using Edgent lets you to take advantage of this functionality, allowing you to focus on your application needs.</p> +<p>Edgent is designed to accelerate your development of edge analytic applications - to make you more productive! Edgent provides a simple yet powerful consistent data model (streams and windows) and provides useful functionality, such as aggregations, joins, and connectors. Using Edgent lets you to take advantage of this functionality, allowing you to focus on your application needs. </p> + +<p>Check out <a href="power-of-edgent">The Power of Edgent</a> to get a better appreciation of how Edgent can help you.</p> <h2 id="where-can-i-download-apache-edgent">Where can I download Apache Edgent?</h2> -<p>Releases include source code and convenience binary bundles. The source code is also available on GitHub. The <a href="downloads">downloads</a> page has all of the details.</p> +<p>Releases include Edgent samples source code and Edgent API and runtime source code. Convenience binaries are released to Maven Central. The source code is also available on GitHub. The <a href="downloads">downloads</a> page has all of the details.</p> <h2 id="how-do-i-get-started">How do I get started?</h2> -<p>Getting started is simple. Once you have downloaded Edgent, everything you need to know to get up and running, you will find <a href="edgent-getting-started">here</a>. We suggest you also run the <a href="samples">Edgent sample programs</a> to familiarize yourselves with the code base.</p> +<p>Getting started is simple. See <a href="edgent-getting-started-samples">Quickstart with Edgent Samples</a> to jump right in or see the <a href="edgent-getting-started">Getting Started Guide</a> if you prefer a bit of an introduction and tutorial first.</p> <h2 id="how-can-i-get-involved">How can I get involved?</h2> @@ -743,7 +783,7 @@ $('#toc').on('click', 'a', function() { <p>With the growth of the Internet of Things there is a need to execute analytics at the edge. Edgent was developed to address requirements for analytics at the edge for IoT use cases that were not addressed by central analytic solutions. These capabilities will be useful to many organizations and that the diverse nature of edge devices and use cases is best addressed by an open community. Our goal is to develop a vibrant community of developers and users to expand the capabilities and real-world use of Edgent by companies and individuals to enable edge analytics and further innovation for the IoT space.</p> -<h2 id="i-see-references-to-quarks-how-does-it-relate-to-apache-edgent">I see references to "Quarks." How does it relate to Apache Edgent?</h2> +<h2 id="i-see-references-to-quot-quarks-quot-how-does-it-relate-to-apache-edgent">I see references to "Quarks." How does it relate to Apache Edgent?</h2> <p>Up until July 2016, Edgent was known as Quarks. Quarks was renamed due to the name not being unique enough.</p> @@ -778,7 +818,7 @@ $('#toc').on('click', 'a', function() { <div class="col-lg-12 footer"> Site last - generated: May 15, 2017 <br/> + generated: Dec 15, 2017 <br/> </div> </div> http://git-wip-us.apache.org/repos/asf/incubator-edgent-website/blob/9b42cd73/content/docs/home.html ---------------------------------------------------------------------- diff --git a/content/docs/home.html b/content/docs/home.html index b0c600d..cfa2b6a 100644 --- a/content/docs/home.html +++ b/content/docs/home.html @@ -5,8 +5,8 @@ <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> -<meta name="keywords" content="getting_started, "> -<title> Apache Edgent Documentation | Apache Edgent Documentation</title> +<meta name="keywords" content=" "> +<title>Apache Edgent Overview | Apache Edgent Documentation</title> <link rel="stylesheet" type="text/css" href="../css/syntax.css"> <link rel="stylesheet" type="text/css" href="../css/font-awesome.min.css"> <!--<link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css">--> @@ -160,12 +160,6 @@ - <li><a href="samples">Samples</a></li> - - - - - <li><a href="faq">FAQ</a></li> @@ -191,7 +185,7 @@ <script> function SendLinkByMail(href) { var subject= "Apache Edgent Documentation feedback"; -var body = "I have some feedback about the Introduction page: "; +var body = "I have some feedback about the Apache Edgent Overview page: "; body += window.location.href; body += ""; var uri = "mailto:?subject="; @@ -218,7 +212,7 @@ window.location.href = uri; searchInput: document.getElementById('search-input'), resultsContainer: document.getElementById('results-container'), dataSource: '../search.json', - searchResultTemplate: '<li><a href="{url}" title="Introduction">{title}</a></li>', + searchResultTemplate: '<li><a href="{url}" title="Apache Edgent Overview">{title}</a></li>', noResultsText: 'No results found.', limit: 10, fuzzy: true, @@ -315,6 +309,26 @@ window.location.href = uri; + <li class="active"><a href="../docs/home.html">Edgent Overview</a></li> + + + + + + + + + + <li><a href="../docs/power-of-edgent.html">The Power of Edgent</a></li> + + + + + + + + + <li><a href="../docs/faq.html">FAQ</a></li> @@ -342,7 +356,37 @@ window.location.href = uri; - <li><a href="../docs/edgent-getting-started.html">Getting started guide</a></li> + <li><a href="../docs/edgent-getting-started.html">Getting Started Guide</a></li> + + + + + + + + + + <li><a href="../docs/edgent-getting-started-samples.html">Quickstart with Edgent Samples</a></li> + + + + + + + + + + <li><a href="../docs/application-development.html">Understanding App Development</a></li> + + + + + + + + + + <li><a href="../docs/quickstart.html">Quickstart IBM Watson IoT Platform</a></li> @@ -510,33 +554,6 @@ window.location.href = uri; - <li><a href="#">Sample Programs</a> - <ul> - - - - - <li><a href="../docs/samples.html">Samples</a></li> - - - - - - - - - - <li><a href="../docs/quickstart.html">Quickstart IBM Watson IoT Platform</a></li> - - - - - - - </ul> - - - <li><a href="#">Using the Console</a> <ul> @@ -629,7 +646,7 @@ $('#toc').on('click', 'a', function() { <div class="col-md-9"> <div class="post-header"> - <h1 class="post-title-main"> Apache Edgent Documentation </h1> + <h1 class="post-title-main">Apache Edgent Overview</h1> </div> <div class="post-content"> @@ -663,9 +680,7 @@ $('#toc').on('click', 'a', function() { <a target="_blank" href="https://github.com/apache/incubator-edgent-website/blob/master/site/docs/home.md" class="btn btn-default githubEditButton" role="button"><i class="fa fa-github fa-lg"></i> Edit me</a> - <h2 id="apache-edgent-overview">Apache Edgent overview</h2> - -<p>Devices and sensors are everywhere, and more are coming online every day. You need a way to analyze all of the data coming from your devices, but it can be expensive to transmit all of the data from a sensor to your central analytics engine.</p> + <p>Devices and sensors are everywhere, and more are coming online every day. You need a way to analyze all of the data coming from your devices, but it can be expensive to transmit all of the data from a sensor to your central analytics engine.</p> <p>Edgent is an open source programming model and runtime for edge devices that enables you to analyze data and events at the device. When you analyze on the edge, you can:</p> @@ -739,22 +754,6 @@ $('#toc').on('click', 'a', function() { <div class="tags"> - <b>Tags: </b> - - - - - - - - - - - - <a href="tag_getting_started.html" class="btn btn-default navbar-btn cursorNorm" role="button">getting_started</a> - - - </div> <!-- @@ -783,7 +782,7 @@ $('#toc').on('click', 'a', function() { <div class="col-lg-12 footer"> Site last - generated: May 15, 2017 <br/> + generated: Dec 15, 2017 <br/> </div> </div>