You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@edgent.apache.org by dl...@apache.org on 2016/04/26 21:37:36 UTC
[1/4] incubator-quarks-website git commit: tweak recipe title
Repository: incubator-quarks-website
Updated Branches:
refs/heads/master d8e56e1d3 -> 394ccb7ae
tweak recipe title
Project: http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/commit/0512aff6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/tree/0512aff6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/diff/0512aff6
Branch: refs/heads/master
Commit: 0512aff66c9edd0f597a143183527134e47b1c96
Parents: d240df0
Author: Dale LaBossiere <dl...@us.ibm.com>
Authored: Wed Apr 13 20:07:17 2016 -0400
Committer: Dale LaBossiere <dl...@us.ibm.com>
Committed: Thu Apr 21 11:21:52 2016 -0400
----------------------------------------------------------------------
site/_data/mydoc/mydoc_sidebar.yml | 2 +-
site/recipes/recipe_adaptable_polling_source.md | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/0512aff6/site/_data/mydoc/mydoc_sidebar.yml
----------------------------------------------------------------------
diff --git a/site/_data/mydoc/mydoc_sidebar.yml b/site/_data/mydoc/mydoc_sidebar.yml
index 3c4ac6f..9f15a8b 100644
--- a/site/_data/mydoc/mydoc_sidebar.yml
+++ b/site/_data/mydoc/mydoc_sidebar.yml
@@ -154,7 +154,7 @@ entries:
version: all
output: web, pdf
- - title: Adaptable Polling Source Behavior
+ - title: Adaptable Polling Source Frequency
url: /recipes/recipe_adaptable_polling_source.html
audience: writers, designers
platform: all
http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/0512aff6/site/recipes/recipe_adaptable_polling_source.md
----------------------------------------------------------------------
diff --git a/site/recipes/recipe_adaptable_polling_source.md b/site/recipes/recipe_adaptable_polling_source.md
index faaaf4d..b3b4872 100644
--- a/site/recipes/recipe_adaptable_polling_source.md
+++ b/site/recipes/recipe_adaptable_polling_source.md
@@ -1,5 +1,5 @@
---
-title: Adaptable polling source frequency
+title: Adaptable Polling Source Frequency
---
The [Writing a Source Function](recipe_source_function.html) recipe introduced the basics of creating a source stream by polling a data source periodically.
[3/4] incubator-quarks-website git commit: tweak things
Posted by dl...@apache.org.
tweak things
Project: http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/commit/144f982a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/tree/144f982a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/diff/144f982a
Branch: refs/heads/master
Commit: 144f982ad63fc33f9054cf777cd3745339a93174
Parents: 0512aff
Author: Dale LaBossiere <dl...@us.ibm.com>
Authored: Thu Apr 21 12:10:04 2016 -0400
Committer: Dale LaBossiere <dl...@us.ibm.com>
Committed: Thu Apr 21 12:10:04 2016 -0400
----------------------------------------------------------------------
site/_data/mydoc/mydoc_sidebar.yml | 12 +++----
site/recipes/recipe_adaptable_filter_range.md | 2 +-
site/recipes/recipe_adaptable_polling_source.md | 38 ++++++++++----------
3 files changed, 26 insertions(+), 26 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/144f982a/site/_data/mydoc/mydoc_sidebar.yml
----------------------------------------------------------------------
diff --git a/site/_data/mydoc/mydoc_sidebar.yml b/site/_data/mydoc/mydoc_sidebar.yml
index 9f15a8b..9d770ab 100644
--- a/site/_data/mydoc/mydoc_sidebar.yml
+++ b/site/_data/mydoc/mydoc_sidebar.yml
@@ -130,7 +130,7 @@ entries:
version: all
output: web, pdf
- - title: Adaptable filter behavior
+ - title: Changing a filter's range
url: /recipes/recipe_adaptable_filter_range.html
audience: writers, designers
platform: all
@@ -138,15 +138,15 @@ entries:
version: all
output: web, pdf
- - title: Dynamically Enabling Analytic Flows
- url: /recipes/recipe_dynamic_analytic_control.html
+ - title: Changing a polled source stream's period
+ url: /recipes/recipe_adaptable_polling_source.html
audience: writers, designers
platform: all
product: all
version: all
output: web, pdf
- - title: Using an Adaptable Deadtime Filter
+ - title: Using an adaptable deadtime filter
url: /recipes/recipe_adaptable_deadtime_filter.html
audience: writers, designers
platform: all
@@ -154,8 +154,8 @@ entries:
version: all
output: web, pdf
- - title: Adaptable Polling Source Frequency
- url: /recipes/recipe_adaptable_polling_source.html
+ - title: Dynamically enabling analytic flows
+ url: /recipes/recipe_dynamic_analytic_control.html
audience: writers, designers
platform: all
product: all
http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/144f982a/site/recipes/recipe_adaptable_filter_range.md
----------------------------------------------------------------------
diff --git a/site/recipes/recipe_adaptable_filter_range.md b/site/recipes/recipe_adaptable_filter_range.md
index d622e07..c8574c9 100644
--- a/site/recipes/recipe_adaptable_filter_range.md
+++ b/site/recipes/recipe_adaptable_filter_range.md
@@ -1,5 +1,5 @@
---
-title: Adaptable filter behavior
+title: Changing a Filter's Range
---
The [Detecting a sensor value out of range](recipe_value_out_of_range.html) recipe introduced the basics of filtering as well as the use of a [Range](http://quarks-edge.github.io/quarks/docs/javadoc/quarks/analytics/sensors/Range.html).
http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/144f982a/site/recipes/recipe_adaptable_polling_source.md
----------------------------------------------------------------------
diff --git a/site/recipes/recipe_adaptable_polling_source.md b/site/recipes/recipe_adaptable_polling_source.md
index b3b4872..fa4db8a 100644
--- a/site/recipes/recipe_adaptable_polling_source.md
+++ b/site/recipes/recipe_adaptable_polling_source.md
@@ -1,14 +1,14 @@
---
-title: Adaptable Polling Source Frequency
+title: Changing a Polled Source Stream's Period
---
The [Writing a Source Function](recipe_source_function.html) recipe introduced the basics of creating a source stream by polling a data source periodically.
-Oftentimes, a user wants the polling frequency to be adaptable rather than static. For example, an event such a sudden rise in a temperature sensor may motivate more frequent polling of the sensor and analysis of the data until the condition subsides. A change in the polling frequency may be a result of locally performed analytics or via a command from an external source.
+Oftentimes, a user wants the poll frequency to be adaptable rather than static. For example, an event such a sudden rise in a temperature sensor may motivate more frequent polling of the sensor and analysis of the data until the condition subsides. A change in the poll frequency may be driven by locally performed analytics or via a command from an external source.
-A Quarks IotProvider and IoTDevice with its command streams would be a natural way to control the application. In this recipe we will just simulate a "set polling frequency" command stream.
+A Quarks IotProvider and IoTDevice with its command streams would be a natural way to control the application. In this recipe we will just simulate a "set poll period" command stream.
-The ``Topology.poll()`` documentation describes how the polling frequency may be changed at runtime.
+The ``Topology.poll()`` documentation describes how the poll period may be changed at runtime.
The mechanism is based on a more general Quarks runtime ``quarks.execution.services.ControlService`` service. The runtime registers "control beans" for entities that are controllable. These controls can be retrieved at runtime via the service.
@@ -26,10 +26,10 @@ At runtime, ``Topology.poll()`` registers a ``quarks.execution.mbeans.PeriodicMX
It's also a good practice to add tags to streams to improve the usability of the development mode Quarks console.
-## Define a set polling frequency method
+## Define a "set poll period" method
```java
- static <T> void setPollFrequency(TStream<T> pollStream, long period, TimeUnit unit) {
+ static <T> void setPollPeriod(TStream<T> pollStream, long period, TimeUnit unit) {
// get the topology's runtime ControlService service
ControlService cs = pollStream.topology().getRuntimeServiceSupplier()
.get().getService(ControlService.class);
@@ -37,18 +37,18 @@ It's also a good practice to add tags to streams to improve the usability of the
// using the the stream's alias, get its PeriodicMXBean control
PeriodicMXBean control = cs.getControl("periodic", pollStream.getAlias(), PeriodicMXBean.class);
- // change the polling frequency using the control
+ // change the poll period using the control
System.out.println("Setting period="+period+" "+unit+" stream="+pollStream);
control.setPeriod(period, unit);
}
```
-## Process the "set polling frequency" command stream
+## Process the "set poll period" command stream
Our commands are on the "TStream<JsonObject> cmds" stream. Each JsonObject tuple is a command with the properties "period" and "unit".
```java
- cmds.sink(json -> setPollFrequency(engineTemp,
+ cmds.sink(json -> setPollPeriod(engineTemp,
json.getAsJsonPrimitive("period").getAsLong(),
TimeUnit.valueOf(json.getAsJsonPrimitive("unit").getAsString())));
```
@@ -71,13 +71,13 @@ import quarks.topology.TStream;
import quarks.topology.Topology;
/**
- * A recipe for a polling source stream with an adaptable polling frequency.
+ * A recipe for a polled source stream with an adaptable poll period.
*/
-public class AdaptablePollingSource {
+public class AdaptablePolledSource {
/**
* Poll a temperature sensor to periodically obtain temperature readings.
- * Respond to a simulated command stream to change the polling frequency.
+ * Respond to a simulated command stream to change the poll period.
*/
public static void main(String[] args) throws Exception {
@@ -94,18 +94,18 @@ public class AdaptablePollingSource {
// Report the time each temperature reading arrives and the value
engineTemp.peek(tuple -> System.out.println(new Date() + " temp=" + tuple));
- // Generate a simulated "set polling frequency" command stream
- TStream<JsonObject> cmds = simulatedSetPollingFrequencyCmds(top);
+ // Generate a simulated "set poll period" command stream
+ TStream<JsonObject> cmds = simulatedSetPollPeriodCmds(top);
- // Process the commands to change the polling frequency
- cmds.sink(json -> setPollFrequency(engineTemp,
+ // Process the commands to change the poll period
+ cmds.sink(json -> setPollPeriod(engineTemp,
json.getAsJsonPrimitive("period").getAsLong(),
TimeUnit.valueOf(json.getAsJsonPrimitive("unit").getAsString())));
dp.submit(top);
}
- static <T> void setPollFrequency(TStream<T> pollStream, long period, TimeUnit unit) {
+ static <T> void setPollPeriod(TStream<T> pollStream, long period, TimeUnit unit) {
// get the topology's runtime ControlService service
ControlService cs = pollStream.topology().getRuntimeServiceSupplier()
.get().getService(ControlService.class);
@@ -113,12 +113,12 @@ public class AdaptablePollingSource {
// using the the stream's alias, get its PeriodicMXBean control
PeriodicMXBean control = cs.getControl("periodic", pollStream.getAlias(), PeriodicMXBean.class);
- // change the polling frequency using the control
+ // change the poll period using the control
System.out.println("Setting period="+period+" "+unit+" stream="+pollStream);
control.setPeriod(period, unit);
}
- static TStream<JsonObject> simulatedSetPollingFrequencyCmds(Topology top) {
+ static TStream<JsonObject> simulatedSetPollPeriodCmds(Topology top) {
AtomicInteger lastPeriod = new AtomicInteger(1);
TStream<JsonObject> cmds = top.poll(() -> {
// toggle between 1 and 2 sec period
[2/4] incubator-quarks-website git commit: [QUARKS-123] [WIP]
adaptable polling source recipe
Posted by dl...@apache.org.
[QUARKS-123] [WIP] adaptable polling source recipe
Project: http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/commit/d240df00
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/tree/d240df00
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/diff/d240df00
Branch: refs/heads/master
Commit: d240df00ed13d11298c0d32a6cc4985a3499d4d0
Parents: d8e56e1
Author: Dale LaBossiere <dl...@us.ibm.com>
Authored: Wed Apr 13 20:00:23 2016 -0400
Committer: Dale LaBossiere <dl...@us.ibm.com>
Committed: Thu Apr 21 11:21:52 2016 -0400
----------------------------------------------------------------------
site/_data/mydoc/mydoc_sidebar.yml | 8 ++
site/recipes/recipe_adaptable_polling_source.md | 138 +++++++++++++++++++
2 files changed, 146 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/d240df00/site/_data/mydoc/mydoc_sidebar.yml
----------------------------------------------------------------------
diff --git a/site/_data/mydoc/mydoc_sidebar.yml b/site/_data/mydoc/mydoc_sidebar.yml
index b46f47a..3c4ac6f 100644
--- a/site/_data/mydoc/mydoc_sidebar.yml
+++ b/site/_data/mydoc/mydoc_sidebar.yml
@@ -154,6 +154,14 @@ entries:
version: all
output: web, pdf
+ - title: Adaptable Polling Source Behavior
+ url: /recipes/recipe_adaptable_polling_source.html
+ audience: writers, designers
+ platform: all
+ product: all
+ version: all
+ output: web, pdf
+
- title: Sample Programs
audience: writers, designers
platform: all
http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/d240df00/site/recipes/recipe_adaptable_polling_source.md
----------------------------------------------------------------------
diff --git a/site/recipes/recipe_adaptable_polling_source.md b/site/recipes/recipe_adaptable_polling_source.md
new file mode 100644
index 0000000..faaaf4d
--- /dev/null
+++ b/site/recipes/recipe_adaptable_polling_source.md
@@ -0,0 +1,138 @@
+---
+title: Adaptable polling source frequency
+---
+
+The [Writing a Source Function](recipe_source_function.html) recipe introduced the basics of creating a source stream by polling a data source periodically.
+
+Oftentimes, a user wants the polling frequency to be adaptable rather than static. For example, an event such a sudden rise in a temperature sensor may motivate more frequent polling of the sensor and analysis of the data until the condition subsides. A change in the polling frequency may be a result of locally performed analytics or via a command from an external source.
+
+A Quarks IotProvider and IoTDevice with its command streams would be a natural way to control the application. In this recipe we will just simulate a "set polling frequency" command stream.
+
+The ``Topology.poll()`` documentation describes how the polling frequency may be changed at runtime.
+
+The mechanism is based on a more general Quarks runtime ``quarks.execution.services.ControlService`` service. The runtime registers "control beans" for entities that are controllable. These controls can be retrieved at runtime via the service.
+
+At runtime, ``Topology.poll()`` registers a ``quarks.execution.mbeans.PeriodicMXBean`` control. Retrieving the control at runtime requires setting an alias on the poll generated stream using ``TStream.alias()``.
+
+## Create the polled stream and set its alias
+
+```java
+ Topology top = ...;
+ SimulatedTemperatureSensor tempSensor = new SimulatedTemperatureSensor();
+ TStream<Double> engineTemp = top.poll(tempSensor, 1, TimeUnit.SECONDS)
+ .alias("engineTemp")
+ .tag("engineTemp");
+```
+
+It's also a good practice to add tags to streams to improve the usability of the development mode Quarks console.
+
+## Define a set polling frequency method
+
+```java
+ static <T> void setPollFrequency(TStream<T> pollStream, long period, TimeUnit unit) {
+ // get the topology's runtime ControlService service
+ ControlService cs = pollStream.topology().getRuntimeServiceSupplier()
+ .get().getService(ControlService.class);
+
+ // using the the stream's alias, get its PeriodicMXBean control
+ PeriodicMXBean control = cs.getControl("periodic", pollStream.getAlias(), PeriodicMXBean.class);
+
+ // change the polling frequency using the control
+ System.out.println("Setting period="+period+" "+unit+" stream="+pollStream);
+ control.setPeriod(period, unit);
+ }
+```
+
+## Process the "set polling frequency" command stream
+
+Our commands are on the "TStream<JsonObject> cmds" stream. Each JsonObject tuple is a command with the properties "period" and "unit".
+
+```java
+ cmds.sink(json -> setPollFrequency(engineTemp,
+ json.getAsJsonPrimitive("period").getAsLong(),
+ TimeUnit.valueOf(json.getAsJsonPrimitive("unit").getAsString())));
+```
+
+## The final application
+
+```java
+import java.util.Date;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import com.google.gson.JsonObject;
+
+import quarks.execution.mbeans.PeriodicMXBean;
+import quarks.execution.services.ControlService;
+import quarks.providers.development.DevelopmentProvider;
+import quarks.providers.direct.DirectProvider;
+import quarks.samples.utils.sensor.SimulatedTemperatureSensor;
+import quarks.topology.TStream;
+import quarks.topology.Topology;
+
+/**
+ * A recipe for a polling source stream with an adaptable polling frequency.
+ */
+public class AdaptablePollingSource {
+
+ /**
+ * Poll a temperature sensor to periodically obtain temperature readings.
+ * Respond to a simulated command stream to change the polling frequency.
+ */
+ public static void main(String[] args) throws Exception {
+
+ DirectProvider dp = new DirectProvider();
+
+ Topology top = dp.newTopology("TemperatureSensor");
+
+ // Generate a polled temperature sensor stream and set its alias
+ SimulatedTemperatureSensor tempSensor = new SimulatedTemperatureSensor();
+ TStream<Double> engineTemp = top.poll(tempSensor, 1, TimeUnit.SECONDS)
+ .alias("engineTemp")
+ .tag("engineTemp");
+
+ // Report the time each temperature reading arrives and the value
+ engineTemp.peek(tuple -> System.out.println(new Date() + " temp=" + tuple));
+
+ // Generate a simulated "set polling frequency" command stream
+ TStream<JsonObject> cmds = simulatedSetPollingFrequencyCmds(top);
+
+ // Process the commands to change the polling frequency
+ cmds.sink(json -> setPollFrequency(engineTemp,
+ json.getAsJsonPrimitive("period").getAsLong(),
+ TimeUnit.valueOf(json.getAsJsonPrimitive("unit").getAsString())));
+
+ dp.submit(top);
+ }
+
+ static <T> void setPollFrequency(TStream<T> pollStream, long period, TimeUnit unit) {
+ // get the topology's runtime ControlService service
+ ControlService cs = pollStream.topology().getRuntimeServiceSupplier()
+ .get().getService(ControlService.class);
+
+ // using the the stream's alias, get its PeriodicMXBean control
+ PeriodicMXBean control = cs.getControl("periodic", pollStream.getAlias(), PeriodicMXBean.class);
+
+ // change the polling frequency using the control
+ System.out.println("Setting period="+period+" "+unit+" stream="+pollStream);
+ control.setPeriod(period, unit);
+ }
+
+ static TStream<JsonObject> simulatedSetPollingFrequencyCmds(Topology top) {
+ AtomicInteger lastPeriod = new AtomicInteger(1);
+ TStream<JsonObject> cmds = top.poll(() -> {
+ // toggle between 1 and 2 sec period
+ int newPeriod = lastPeriod.get() == 1 ? 2 : 1;
+ lastPeriod.set(newPeriod);
+ JsonObject jo = new JsonObject();
+ jo.addProperty("period", newPeriod);
+ jo.addProperty("unit", TimeUnit.SECONDS.toString());
+ return jo;
+ }, 5, TimeUnit.SECONDS)
+ .tag("cmds");
+ return cmds;
+ }
+
+}
+
+```
[4/4] incubator-quarks-website git commit: address feedback
Posted by dl...@apache.org.
address feedback
Project: http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/commit/394ccb7a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/tree/394ccb7a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/diff/394ccb7a
Branch: refs/heads/master
Commit: 394ccb7aef050f37ac497c9020ca389c4c43eac2
Parents: 144f982
Author: Dale LaBossiere <dl...@us.ibm.com>
Authored: Thu Apr 21 14:46:57 2016 -0400
Committer: Dale LaBossiere <dl...@us.ibm.com>
Committed: Thu Apr 21 14:46:57 2016 -0400
----------------------------------------------------------------------
site/recipes/recipe_adaptable_deadtime_filter.md | 10 +++++-----
site/recipes/recipe_adaptable_filter_range.md | 6 +++---
site/recipes/recipe_adaptable_polling_source.md | 10 +++++-----
3 files changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/394ccb7a/site/recipes/recipe_adaptable_deadtime_filter.md
----------------------------------------------------------------------
diff --git a/site/recipes/recipe_adaptable_deadtime_filter.md b/site/recipes/recipe_adaptable_deadtime_filter.md
index ffc53e6..7e09e1c 100644
--- a/site/recipes/recipe_adaptable_deadtime_filter.md
+++ b/site/recipes/recipe_adaptable_deadtime_filter.md
@@ -1,5 +1,5 @@
---
-title: Using an Adaptable Deadtime Filter
+title: Using an adaptable deadtime filter
---
Oftentimes, an application wants to control the frequency that continuously generated analytic results are made available to other parts of the application or published to other applications or an event hub.
@@ -12,11 +12,11 @@ Note this is a different case than simply changing the polling frequency for the
This case needs a *deadtime filter* and Quarks provides one for your use! In contrast to a *deadband filter*, which skips tuples based on a deadband value range, a deadtime filter skips tuples based on a *deadtime period* following a tuple that is allowed to pass through. E.g., if the deadtime period is 30 minutes, after allowing a tuple to pass, the filter skips any tuples received for the next 30 minutes. The next tuple received after that is allowed to pass through, and a new deadtime period is begun.
-See quarks.analytics.sensors.Filters.deadtime() and quarks.analytics.sensors.Deadtime.
+See ``quarks.analytics.sensors.Filters.deadtime()`` and ``quarks.analytics.sensors.Deadtime``.
This recipe demonstrates how to use an adaptable deadtime filter.
-A Quarks IotProvider and IoTDevice with its command streams would be a natural way to control the application. In this recipe we will just simulate a "set deadtime period" command stream.
+A Quarks ``IotProvider`` and ``IoTDevice`` with its command streams would be a natural way to control the application. In this recipe we will just simulate a "set deadtime period" command stream.
## Create a polled sensor readings stream
@@ -31,7 +31,7 @@ It's also a good practice to add tags to streams to improve the usability of the
## Create a deadtime filtered stream - initially no deadtime
-In this recipe we'll just filter the direct engineTemp sensor reading stream. In practice this filtering would be performed after some analytics stages and used as the input to ``IotDevice.event()`` or some other connector publish operation.
+In this recipe we'll just filter the direct ``engineTemp`` sensor reading stream. In practice this filtering would be performed after some analytics stages and used as the input to ``IotDevice.event()`` or some other connector publish operation.
```java
Deadtime<Double> deadtime = new Deadtime<>();
@@ -50,7 +50,7 @@ In this recipe we'll just filter the direct engineTemp sensor reading stream. I
## Process the "set deadtime period" command stream
-Our commands are on the "TStream<JsonObject> cmds" stream. Each JsonObject tuple is a command with the properties "period" and "unit".
+Our commands are on the ``TStream<JsonObject> cmds`` stream. Each ``JsonObject`` tuple is a command with the properties "period" and "unit".
```java
cmds.sink(json -> setDeadtimePeriod(deadtimeFilteredEngineTemp,
http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/394ccb7a/site/recipes/recipe_adaptable_filter_range.md
----------------------------------------------------------------------
diff --git a/site/recipes/recipe_adaptable_filter_range.md b/site/recipes/recipe_adaptable_filter_range.md
index c8574c9..e259220 100644
--- a/site/recipes/recipe_adaptable_filter_range.md
+++ b/site/recipes/recipe_adaptable_filter_range.md
@@ -1,12 +1,12 @@
---
-title: Changing a Filter's Range
+title: Changing a filter's range
---
The [Detecting a sensor value out of range](recipe_value_out_of_range.html) recipe introduced the basics of filtering as well as the use of a [Range](http://quarks-edge.github.io/quarks/docs/javadoc/quarks/analytics/sensors/Range.html).
Oftentimes, a user wants a filter's behavior to be adaptable rather than static. A filter's range can be made changeable via commands from some external source or just changed as a result of some other local analytics.
-A Quarks IotProvider and IoTDevice with its command streams would be a natural way to control the application. In this recipe we will just simulate a "set optimal temp range" command stream.
+A Quarks ``IotProvider`` and ``IoTDevice`` with its command streams would be a natural way to control the application. In this recipe we will just simulate a "set optimal temp range" command stream.
The string form of a ``Range`` is natural, consise, and easy to use. As such it's a convenient form to use as external range format. The range string can easily be converted back into a ``Range``.
@@ -35,7 +35,7 @@ The filter just uses ``optimalTempRangeRef.get()`` to use the current range sett
## Simulate a command stream
-A ``TStream<Range<Double>> setRangeCmds`` stream is created and a new range specification tuple is generated every 10 seconds. A ``sink`` on the stream calls ``setOptimalTempRange()`` to change the range and hence the filter's bahavior.
+A ``TStream<Range<Double>> setRangeCmds`` stream is created and a new range specification tuple is generated every 10 seconds. A ``sink()`` on the stream calls ``setOptimalTempRange()`` to change the range and hence the filter's bahavior.
```java
// Simulate a command stream to change the optimal range.
http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/394ccb7a/site/recipes/recipe_adaptable_polling_source.md
----------------------------------------------------------------------
diff --git a/site/recipes/recipe_adaptable_polling_source.md b/site/recipes/recipe_adaptable_polling_source.md
index fa4db8a..b1323a3 100644
--- a/site/recipes/recipe_adaptable_polling_source.md
+++ b/site/recipes/recipe_adaptable_polling_source.md
@@ -1,18 +1,18 @@
---
-title: Changing a Polled Source Stream's Period
+title: Changing a polled source stream's period
---
The [Writing a Source Function](recipe_source_function.html) recipe introduced the basics of creating a source stream by polling a data source periodically.
-Oftentimes, a user wants the poll frequency to be adaptable rather than static. For example, an event such a sudden rise in a temperature sensor may motivate more frequent polling of the sensor and analysis of the data until the condition subsides. A change in the poll frequency may be driven by locally performed analytics or via a command from an external source.
+Oftentimes, a user wants the poll frequency to be adaptable rather than static. For example, an event such as a sudden rise in a temperature sensor may motivate more frequent polling of the sensor and analysis of the data until the condition subsides. A change in the poll frequency may be driven by locally performed analytics or via a command from an external source.
-A Quarks IotProvider and IoTDevice with its command streams would be a natural way to control the application. In this recipe we will just simulate a "set poll period" command stream.
+A Quarks ``IotProvider`` and ``IoTDevice`` with its command streams would be a natural way to control the application. In this recipe we will just simulate a "set poll period" command stream.
The ``Topology.poll()`` documentation describes how the poll period may be changed at runtime.
The mechanism is based on a more general Quarks runtime ``quarks.execution.services.ControlService`` service. The runtime registers "control beans" for entities that are controllable. These controls can be retrieved at runtime via the service.
-At runtime, ``Topology.poll()`` registers a ``quarks.execution.mbeans.PeriodicMXBean`` control. Retrieving the control at runtime requires setting an alias on the poll generated stream using ``TStream.alias()``.
+At runtime, ``Topology.poll()`` registers a ``quarks.execution.mbeans.PeriodicMXBean`` control. __Retrieving the control at runtime requires setting an alias on the poll generated stream using ``TStream.alias()``.__
## Create the polled stream and set its alias
@@ -45,7 +45,7 @@ It's also a good practice to add tags to streams to improve the usability of the
## Process the "set poll period" command stream
-Our commands are on the "TStream<JsonObject> cmds" stream. Each JsonObject tuple is a command with the properties "period" and "unit".
+Our commands are on the ``TStream<JsonObject> cmds`` stream. Each ``JsonObject`` tuple is a command with the properties "period" and "unit".
```java
cmds.sink(json -> setPollPeriod(engineTemp,