http://git-wip-us.apache.org/repos/asf/incubator-edgent-website/blob/9b42cd73/content/docs/application-development.html ---------------------------------------------------------------------- diff --git a/content/docs/application-development.html b/content/docs/application-development.html new file mode 100644 index 0000000..55ce827 --- /dev/null +++ b/content/docs/application-development.html @@ -0,0 +1,922 @@ +<!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>Edgent Application Development, Packaging and Execution. | 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 Edgent Application Development, Packaging and Execution. 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="Edgent Application Development, Packaging and Execution.">{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><a href="../docs/edgent-getting-started-samples.html">Quickstart with Edgent Samples</a></li> + + + + + + + + + + <li class="active"><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">Edgent Application Development, Packaging and Execution.</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/application-development.md" class="btn btn-default githubEditButton" role="button"><i class="fa fa-github fa-lg"></i> Edit me</a> + + <p>To develop Edgent applications you will utilize the +Edgent SDK/runtime jars and package your application +artifacts for deploying to an edge device or gateway for execution.</p> + +<p>The Edgent SDK/runtime jars are published to the +<a href="https://repository.apache.org/content/repositories/releases/">ASF Nexus Releases Repository</a> +and the Maven Central Repository. +Alternatively, you can build the Edgent SDK yourself from a source release +and the resulting jars will be added to your local maven repository.</p> + +<p>There are a set of Edgent jars for each supported platform: java8, java7, and android. +The maven artifact groupIds for the Edgent jars are:</p> + +<ul> +<li><code>org.apache.edgent</code> - for java8,</li> +<li><code>org.apache.edgent.java7</code></li> +<li><code>org.apache.edgent.android</code></li> +</ul> + +<p>Note, the Java package names for Edgent components do not incorporate +the platform kind; the package names are the same regardless of the platform.</p> + +<p>See the release's <code>JAVA_SUPPORT</code> information in <a href="downloads">downloads</a> +for more information on artifact coordinates, etc.</p> + +<h2 id="writing-your-application">Writing Your Application</h2> + +<p>The Edgent API is most easily used by using Java8 lambda expressions. +If you only want to deploy your Edgent application to a java8 environment +then your application may use any java8 features it chooses. You compile +and run against the Edgent java8 jars.</p> + +<p>If you want to deploy your Edgent application to a java7 or android +environment, it's still easiest to write your application using the Edgent APIs +with java8 lambda expressions. You compile with java8 but constrain +your application to using java7 features plus java8 lambda expressions. +The Retrolambda tool is used to convert your application's generated +class files to java7. +The Edgent java7 and android platform jars were created in that manner too. +Your application would then be run against the appropriate +Edgent platform jars. </p> + +<p>Alternatively you can forgo the use of lambda +expressions and write your application in java7 and compile +and run against the appropriate Edgent platform jars.</p> + +<p>For convenience it's easiest to build your Edgent application using +maven-repository-enabled build tooling (e.g., maven, maven-enabled +Eclipse or IntelliJ). The tooling transparently downloads the +required Edgent jars from the maven repository if they aren't +already present in your local maven repository.</p> + +<h3 id="edgent-application-template">Edgent Application Template</h3> + +<p>You can clone the <code>template</code> project as a starting point for your +Edgent application. See <a href="edgent-getting-started-samples">Quickstart with Edgent Samples</a> +for information about the template sample.</p> + +<p>TODO: we would like to provide a maven Edgent Application archetype +that users can use to create an application project template.</p> + +<h3 id="using-non-maven-integrated-tooling">Using Non-maven-integrated Tooling</h3> + +<p>If you can't or don't want to use maven-repository-enabled tooling +you will need to get a local copy of the Edgent jars and their +dependencies and add them to your compile classpath. This case +is covered in subsequent sections.</p> + +<h2 id="packaging-and-execution">Packaging and Execution</h2> + +<p>Edgent doesn't provide any "deployment" mechanisms other than its primitive +"register jar" feature (see the <code>IotProvider</code> javadoc). Generally, managing +the deployment of application and Edgent jars to edge devices is left to +others (as an example, the IBM Watson IoT Platform has device APIs to +support "firmware" download/update).</p> + +<p>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. +Also see the <code>cron</code> folder in the Edgent samples.</p> + +<p>To run your Edgent application on an edge device, your application +jar(s) need to be on the device. Additionally, the application's +dependent Edgent jars (and their transitive dependencies) need to +be on the device. It's unlikely the device will be able to retrieve +the dependencies directly from a remote maven repository such as +maven central.</p> + +<p>Here are three options for dealing with this.</p> + +<h3 id="option-1-create-an-uber-jar-for-your-application">Option 1: Create an uber-jar for your application</h3> + +<p>The uber jar is a standalone entity containing +everything that's needed to run your application.</p> + +<p>The uber jar contains the application's classes and +the application's dependent Edgent classes and their +transitive dependencies.</p> + +<p>The template project's pom and +the Edgent samples poms contain configuration information +that generates an uber jar in addition to the standard +application jar. Eclipse can also export an uber jar.</p> + +<p>You run your application like: + <code>java -cp <path-to-uber-jar> <full-classname-of-main-class></code></p> + +<h3 id="option-2-separately-manage-the-application-and-edgent-jars">Option 2: Separately manage the application and Edgent jars</h3> + +<p>Copy the application's jars to the device. +Get a copy of the Edgent jars and their dependencies +onto the device. It's possible for multiple Edgent +applications to share the Edgent jars.</p> + +<p>The Apache Edgent project does not release a +binary bundle containing all of the Edgent jars +and their dependencies. The binary artifacts +are only released to maven central.</p> + +<p>See <code>get-edgent-jars-project/README.md</code> in the Edgent samples +for a tool to get a copy of the Edgent jars.</p> + +<h3 id="option-3-create-an-application-package-bundle">Option 3: Create an application package bundle</h3> + +<p>The bundle is a standalone entity containing +everything that's needed to run your application.</p> + +<p>The bundle is copied to the device and unpacked. +A run script forms the appropriate <code>CLASSPATH</code> +to the package's jars and starts the application.</p> + +<p>The <code>package-app.sh</code> script included with the +Edgent samples creates an application bundle.</p> + +<p>The application bundle contains the application's jar, +the application's dependent Edgent jars (as specified in +the application's pom) and the Edgent jars' dependencies, +and a run-app.sh script.</p> + +<p>The application's dependent Edgent runtime jars and +their dependencies are retrieved from a local or remote +maven repository.</p> + +<p>If the application's execution environment is +java7 or android, use the appropriate script options +to retrieve the appropriate Edgent platform jars for +execution.</p> + +<p>The generated run-app.sh script configures the CLASSPATH +and runs the application.</p> + +<p>E.g.,</p> +<div class="highlight"><pre><code class="language-sh" data-lang="sh"><span class="nb">cd </span>MyApp <span class="c"># the application's project directory</span> +package-app.sh --mainClass com.mycompany.app.MyApp --appjar target/my-app-1.0-SNAPSHOT.jar +<span class="c">##### get the app specific dependencies...</span> +... +<span class="c">##### create target/app-run.sh...</span> +<span class="c">##### create target/app-pkg.tar...</span> +<span class="c">##### Copy target/app-pkg.tar to the destination system"</span> +<span class="c">##### To run the app:"</span> +<span class="c">##### mkdir app-pkg"</span> +<span class="c">##### tar xf app-pkg.tar -C app-pkg"</span> +<span class="c">##### (cd app-pkg; ./app-run.sh)"</span> +</code></pre></div> +<p>For more usage information:</p> +<div class="highlight"><pre><code class="language-sh" data-lang="sh">./package-app.sh -h +</code></pre></div> + +<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/committers.html ---------------------------------------------------------------------- diff --git a/content/docs/committers.html b/content/docs/committers.html index d87800a..7537a40 100644 --- a/content/docs/committers.html +++ b/content/docs/committers.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> @@ -710,7 +727,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/common-edgent-operations.html ---------------------------------------------------------------------- diff --git a/content/docs/common-edgent-operations.html b/content/docs/common-edgent-operations.html index 1876ee7..e977237 100644 --- a/content/docs/common-edgent-operations.html +++ b/content/docs/common-edgent-operations.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> @@ -669,7 +686,7 @@ $('#toc').on('click', 'a', function() { <p><code>TStream.map()</code> is arguably the most used method in the Edgent API. Its two main purposes are to perform stateful or stateless operations on a stream's tuples, and to produce a <code>TStream</code> with tuples of a different type from that of the calling stream.</p> -<h3 id="changing-a-tstreams-tuple-type">Changing a TStream's tuple type</h3> +<h3 id="changing-a-tstream-39-s-tuple-type">Changing a TStream's tuple type</h3> <p>In addition to filtering tuples, <code>TStream</code>s support operations that <em>transform</em> tuples from one Java type to another by invoking the <code>TStream.map()</code> method.</p> @@ -702,7 +719,7 @@ $('#toc').on('click', 'a', function() { <span class="n">TStream</span><span class="o"><</span><span class="n">Integer</span><span class="o">></span> <span class="n">counts</span> <span class="o">=</span> <span class="n">streamOfStrings</span><span class="o">.</span><span class="na">map</span><span class="o">(</span><span class="k">new</span> <span class="n">Function</span><span class="o"><</span><span class="n">String</span><span class="o">,</span> <span class="n">Integer</span><span class="o">>()</span> <span class="o">{</span> <span class="kt">int</span> <span class="n">count</span> <span class="o">=</span> <span class="mi">0</span><span class="o">;</span> <span class="nd">@Override</span> - <span class="kd">public</span> <span class="n">Integer</span> <span class="nf">apply</span><span class="o">(</span><span class="n">String</span> <span class="n">arg0</span><span class="o">)</span> <span class="o">{</span> + <span class="kd">public</span> <span class="n">Integer</span> <span class="n">apply</span><span class="o">(</span><span class="n">String</span> <span class="n">arg0</span><span class="o">)</span> <span class="o">{</span> <span class="n">count</span> <span class="o">=</span> <span class="n">count</span> <span class="o">+</span> <span class="mi">1</span><span class="o">;</span> <span class="k">return</span> <span class="n">count</span><span class="o">;</span> <span class="o">}</span> @@ -741,7 +758,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/community.html ---------------------------------------------------------------------- diff --git a/content/docs/community.html b/content/docs/community.html index 08b0605..399dc09 100644 --- a/content/docs/community.html +++ b/content/docs/community.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> @@ -762,7 +779,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/console.html ---------------------------------------------------------------------- diff --git a/content/docs/console.html b/content/docs/console.html index 6ca4149..5023c77 100644 --- a/content/docs/console.html +++ b/content/docs/console.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> @@ -680,7 +697,7 @@ $('#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">DevelopmentProvider</span> <span class="n">dp</span> <span class="o">=</span> <span class="k">new</span> <span class="n">DevelopmentProvider</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> @@ -815,7 +832,7 @@ Well3 alert, ecoli value is 1 <li>Each well that is to be measured is added to the topology. The topology polls each sensor (temp, ecoli, etc.) for each well as a unit. A <code>TStream<Integer></code> is returned from polling the toplogy and represents a sensor reading. Each sensor reading for the well has a tag added to it with the reading type i.e, "temp", and the well id. Once all of the sensor readings are obtained and the tags added, each sensor reading is 'unioned' into a single <code>TStream<JsonObject></code>. Look at the <code>waterDetector</code> method for details on this.</li> <li>Now, each well has a single stream with each of the sensors readings as a property with a name and value in the <code>TStream<JsonObject></code>. Next the <code>alertFilter</code> method is called on the <code>TStream<JsonObject></code> representing each well. This method checks the values for each well's sensors to determine if they are 'out of range' for healthy values. The <code>filter</code> oplet is used to do this. If any of the sensor's readings are out of the acceptable range the tuple is passed along. Those that are within an acceptable range are discarded.</li> <li><p>Next the applications' <code>splitAlert</code> method is called on each well's stream that contains the union of all the sensor readings that are out of range. The <code>splitAlert</code> method uses the <code>split</code> oplet to split the incoming stream into 5 different streams. Only those tuples that are out of range for each stream, which represents each sensor type, will be returned. The object returned from <code>splitAlert</code> is a list of <code>TStream<JsonObject></code> objects. The <code>splitAlert</code> method is shown below:</p> -<div class="highlight"><pre><code class="language-java" data-lang="java"><span class="kd">public</span> <span class="kd">static</span> <span class="n">List</span><span class="o"><</span><span class="n">TStream</span><span class="o"><</span><span class="n">JsonObject</span><span class="o">>></span> <span class="nf">splitAlert</span><span class="o">(</span><span class="n">TStream</span><span class="o"><</span><span class="n">JsonObject</span><span class="o">></span> <span class="n">alertStream</span><span class="o">,</span> <span class="kt">int</span> <span class="n">wellId</span><span class="o">)</span> <span class="o">{</span> +<div class="highlight"><pre><code class="language-java" data-lang="java"><span class="kd">public</span> <span class="kd">static</span> <span class="n">List</span><span class="o"><</span><span class="n">TStream</span><span class="o"><</span><span class="n">JsonObject</span><span class="o">>></span> <span class="n">splitAlert</span><span class="o">(</span><span class="n">TStream</span><span class="o"><</span><span class="n">JsonObject</span><span class="o">></span> <span class="n">alertStream</span><span class="o">,</span> <span class="kt">int</span> <span class="n">wellId</span><span class="o">)</span> <span class="o">{</span> <span class="n">List</span><span class="o"><</span><span class="n">TStream</span><span class="o"><</span><span class="n">JsonObject</span><span class="o">>></span> <span class="n">allStreams</span> <span class="o">=</span> <span class="n">alertStream</span><span class="o">.</span><span class="na">split</span><span class="o">(</span><span class="mi">5</span><span class="o">,</span> <span class="n">tuple</span> <span class="o">-></span> <span class="o">{</span> <span class="k">if</span> <span class="o">(</span><span class="n">tuple</span><span class="o">.</span><span class="na">get</span><span class="o">(</span><span class="s">"temp"</span><span class="o">)</span> <span class="o">!=</span> <span class="kc">null</span><span class="o">)</span> <span class="o">{</span> <span class="n">JsonObject</span> <span class="n">tempObj</span> <span class="o">=</span> <span class="k">new</span> <span class="n">JsonObject</span><span class="o">();</span> @@ -980,7 +997,7 @@ Counter Op:TupleCounter.edgent.oplet.JOB_0.OP_98 has a tuple count of zero! <p><img src='images/console_hover_over_link.jpg'/></p> <p>The section of the code that adds the tags 'temperature' and 'well1' is in the <code>waterDetector</code> method of the <code>ConsoleWaterDetector</code> class.</p> -<div class="highlight"><pre><code class="language-java" data-lang="java"><span class="kd">public</span> <span class="kd">static</span> <span class="n">TStream</span><span class="o"><</span><span class="n">JsonObject</span><span class="o">></span> <span class="nf">waterDetector</span><span class="o">(</span><span class="n">Topology</span> <span class="n">topology</span><span class="o">,</span> <span class="kt">int</span> <span class="n">wellId</span><span class="o">)</span> <span class="o">{</span> +<div class="highlight"><pre><code class="language-java" data-lang="java"><span class="kd">public</span> <span class="kd">static</span> <span class="n">TStream</span><span class="o"><</span><span class="n">JsonObject</span><span class="o">></span> <span class="n">waterDetector</span><span class="o">(</span><span class="n">Topology</span> <span class="n">topology</span><span class="o">,</span> <span class="kt">int</span> <span class="n">wellId</span><span class="o">)</span> <span class="o">{</span> <span class="n">Random</span> <span class="n">rNum</span> <span class="o">=</span> <span class="k">new</span> <span class="n">Random</span><span class="o">();</span> <span class="n">TStream</span><span class="o"><</span><span class="n">Integer</span><span class="o">></span> <span class="n">temp</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="o">-></span> <span class="n">rNum</span><span class="o">.</span><span class="na">nextInt</span><span class="o">(</span><span class="n">TEMP_RANDOM_HIGH</span> <span class="o">-</span> <span class="n">TEMP_RANDOM_LOW</span><span class="o">)</span> <span class="o">+</span> <span class="n">TEMP_RANDOM_LOW</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">SECONDS</span><span class="o">);</span> <span class="n">TStream</span><span class="o"><</span><span class="n">Integer</span><span class="o">></span> <span class="n">acidity</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="o">-></span> <span class="n">rNum</span><span class="o">.</span><span class="na">nextInt</span><span class="o">(</span><span class="n">ACIDITY_RANDOM_HIGH</span> <span class="o">-</span> <span class="n">ACIDITY_RANDOM_LOW</span><span class="o">)</span> <span class="o">+</span> <span class="n">ACIDITY_RANDOM_LOW</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">SECONDS</span><span class="o">);</span> @@ -1167,7 +1184,7 @@ Metrics.rateMeter(individualAlerts3.get(0)); <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/downloads.html ---------------------------------------------------------------------- diff --git a/content/docs/downloads.html b/content/docs/downloads.html index 87b192f..a807267 100644 --- a/content/docs/downloads.html +++ b/content/docs/downloads.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> @@ -663,9 +680,11 @@ $('#toc').on('click', 'a', function() { <a target="_blank" href="https://github.com/apache/incubator-edgent-website/blob/master/site/docs/downloads.md" class="btn btn-default githubEditButton" role="button"><i class="fa fa-github fa-lg"></i> Edit me</a> - <p>Official Apache Edgent releases are available for download from the ASF distribution site. A release consists of a source code bundle and a convenience binary bundle. See the table below for a release's download links.</p> + <p>Official ASF Apache Edgent releases consist of a single Edgent SDK/runtime source bundle and convenience binaries. Convenience binary jars for the Edgent SDK/runtime are available at the <a href="https://repository.apache.org/content/repositories/releases/">ASF Nexus Releases Repository</a> and Maven Central. </p> -<p>If you just want to use Edgent, it is easiest to download and unpack a binary bundle. The bundle includes the release's Javadoc. The Javadoc is also accessible online. For more information, please refer to the <a href="edgent-getting-started">Getting started guide</a>.</p> +<p>See <a href="edgent-getting-started-samples">Quickstart with Edgent Samples</a> if you just want to use Edgent and jump-start your Edgent application development.</p> + +<p>Note, a separate binary bundle consisting of all of the Edgent runtime jars is not released. A tool is available in the samples that can create one.</p> <p>A source bundle contains a README describing how to build the sources.</p> @@ -675,6 +694,63 @@ $('#toc').on('click', 'a', function() { <h2 id="apache-edgent-releases">Apache Edgent Releases</h2> +<table><thead> +<tr> +<th style="text-align: center">Version</th> +<th style="text-align: center">Docs</th> +</tr> +</thead><tbody> +<tr> +<td style="text-align: center">1.2.0-incubating</td> +<td style="text-align: center"><a href="https://github.com/apache/incubator-edgent/blob/edgent-1.2.0/JAVA_SUPPORT.md">JAVA_SUPPORT</a>, <a href="https://edgent.incubator.apache.org/javadoc/r1.2.0/index.html">Javadoc</a>, <a href="edgent-getting-started-samples">Samples</a></td> +</tr> +</tbody></table> + +<p>It is essential that you verify the integrity of a downloaded bundle. See <a href="https://www.apache.org/dyn/closer.cgi#verify">how to verify</a> for details on verifying using downloaded KEYS, PGP signature, MD5, or SHA information.</p> + +<p>Download the <a href="https://www.apache.org/dist/incubator/edgent/KEYS">KEYS</a> file for verifying a bundle's PGP signature.</p> + +<table><thead> +<tr> +<th style="text-align: center">Version</th> +<th style="text-align: center">Date</th> +<th style="text-align: center">Bundles</th> +<th style="text-align: center">Release Notes</th> +<th style="text-align: center">PGP</th> +<th style="text-align: center">MD5</th> +<th style="text-align: center">SHA</th> +</tr> +</thead><tbody> +<tr> +<td style="text-align: center">1.2.0-incubating</td> +<td style="text-align: center">2017-12-14</td> +<td style="text-align: center"><a href="https://www.apache.org/dyn/closer.cgi/incubator/edgent/1.2.0-incubating">Source</a></td> +<td style="text-align: center"><a href="https://www.apache.org/dist/incubator/edgent/1.2.0-incubating/RELEASE_NOTES">1.2.0 Release</a></td> +<td style="text-align: center"><a href="https://www.apache.org/dist/incubator/edgent/1.2.0-incubating/apache-edgent-1.2.0-incubating-source-release.tar.gz.asc">tar-ASC</a></td> +<td style="text-align: center"><a href="https://www.apache.org/dist/incubator/edgent/1.2.0-incubating/apache-edgent-1.2.0-incubating-source-release.tar.gz.md5">tar-MD5</a></td> +<td style="text-align: center"><a href="https://www.apache.org/dist/incubator/edgent/1.2.0-incubating/apache-edgent-1.2.0-incubating-source-release.tar.gz.sha512">tar-SHA</a></td> +</tr> +<tr> +<td style="text-align: center"></td> +<td style="text-align: center"></td> +<td style="text-align: center"></td> +<td style="text-align: center"></td> +<td style="text-align: center"><a href="https://www.apache.org/dist/incubator/edgent/1.2.0-incubating/apache-edgent-1.2.0-incubating-source-release.zip.asc">zip-ASC</a></td> +<td style="text-align: center"><a href="https://www.apache.org/dist/incubator/edgent/1.2.0-incubating/apache-edgent-1.2.0-incubating-source-release.zip.md5">zip-MD5</a></td> +<td style="text-align: center"><a href="https://www.apache.org/dist/incubator/edgent/1.2.0-incubating/apache-edgent-1.2.0-incubating-source-release.zip.sha512">zip-SHA</a></td> +</tr> +</tbody></table> + +<h2 id="releases-prior-to-1-2-0">Releases Prior to 1.2.0</h2> + +<p>Official Apache Edgent releases are available for download from the ASF distribution site. A release consists of a source code bundle and a convenience binary bundle. See the table below for a release's download links.</p> + +<p>There is not a separate samples source bundle and convenience binary jars are not distributed to the ASF Nexus Repository or Maven Central.</p> + +<p>If you just want to use Edgent, it is easiest to download and unpack a binary bundle. The bundle includes the release's Javadoc. The Javadoc is also accessible online. For more information, please refer to the <a href="edgent-getting-started">Getting started guide</a>.</p> + +<p>A source bundle contains a README describing how to build the sources.</p> + <p>It is essential that you verify the integrity of a downloaded bundle. See <a href="https://www.apache.org/dyn/closer.cgi#verify">how to verify</a> for details on verifying using downloaded KEYS, PGP signature, MD5, or SHA information.</p> <p>Download the <a href="https://www.apache.org/dist/incubator/edgent/KEYS">KEYS</a> file for verifying a bundle's PGP signature.</p> @@ -764,7 +840,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>