See: Description
Package | Description |
---|---|
quarks.execution |
Execution of Quarks topologies and graphs.
|
quarks.execution.mbeans |
Management MBeans for execution.
|
quarks.execution.services |
Execution services.
|
quarks.function |
Functional interfaces for lambda expressions.
|
quarks.topology |
Functional api to build a streaming topology.
|
quarks.topology.json |
Utilities for use of JSON in a streaming topology.
|
quarks.topology.plumbing |
Plumbing for a streaming topology.
|
quarks.topology.tester |
Testing for a streaming topology.
|
Package | Description |
---|---|
quarks.providers.development |
Execution of a streaming topology in a development environment .
|
quarks.providers.direct |
Direct execution of a streaming topology.
|
Package | Description |
---|---|
quarks.connectors.file |
File stream connector.
|
quarks.connectors.http |
HTTP stream connector.
|
quarks.connectors.iot |
Quarks device connector API to a message hub.
|
quarks.connectors.iotf |
IBM Watson IoT Platform stream connector.
|
quarks.connectors.jdbc |
JDBC based database stream connector.
|
quarks.connectors.kafka |
Apache Kafka enterprise messing hub stream connector.
|
quarks.connectors.mqtt |
MQTT (lightweight messaging protocol for small sensors and mobile devices) stream connector.
|
quarks.connectors.mqtt.iot |
An MQTT based IotDevice connector.
|
quarks.connectors.pubsub |
Publish subscribe model between jobs.
|
quarks.connectors.pubsub.oplets |
Oplets supporting publish subscribe service.
|
quarks.connectors.pubsub.service |
Publish subscribe service.
|
quarks.connectors.serial |
Serial port connector API.
|
quarks.connectors.wsclient |
WebSocket Client Connector API for sending and receiving messages to a WebSocket Server.
|
quarks.connectors.wsclient.javax.websocket |
WebSocket Client Connector for sending and receiving messages to a WebSocket Server.
|
quarks.connectors.wsclient.javax.websocket.runtime |
Package | Description |
---|---|
quarks.samples.apps |
Support for some more complex Quarks application samples.
|
quarks.samples.apps.mqtt |
Base support for Quarks MQTT based application samples.
|
quarks.samples.apps.sensorAnalytics |
The Sensor Analytics sample application demonstrates some common
continuous sensor analytic application themes.
|
quarks.samples.connectors |
General support for connector samples.
|
quarks.samples.connectors.file |
Samples showing use of the
File stream connector.
|
quarks.samples.connectors.iotf |
Samples showing device events and commands with IBM Watson IoT Platform.
|
quarks.samples.connectors.jdbc |
Samples showing use of the
JDBC stream connector.
|
quarks.samples.connectors.kafka |
Samples showing use of the
Apache Kafka stream connector.
|
quarks.samples.connectors.mqtt |
Samples showing use of the
MQTT stream connector.
|
quarks.samples.console |
Samples showing use of the
Console web application.
|
quarks.samples.topology |
Samples showing creating and executing basic topologies .
|
quarks.samples.utils.metrics | |
quarks.samples.utils.sensor |
Package | Description |
---|---|
quarks.analytics.math3.json |
JSON analytics using Apache Commons Math.
|
quarks.analytics.math3.stat |
Statistical algorithms using Apache Commons Math.
|
quarks.analytics.sensors |
Analytics focused on handling sensor data.
|
Package | Description |
---|---|
quarks.metrics |
Metric utility methods, oplets, and reporters which allow an
application to expose metric values, for example via JMX.
|
quarks.metrics.oplets |
Package | Description |
---|---|
quarks.graph |
Low-level graph building API.
|
quarks.oplet |
Oplets API.
|
quarks.oplet.core |
Core primitive oplets.
|
quarks.oplet.core.mbeans |
Management beans for core oplets.
|
quarks.oplet.functional |
Oplets that process tuples using functions.
|
quarks.oplet.plumbing |
Oplets that control the flow of tuples.
|
quarks.oplet.window |
Oplets using windows.
|
quarks.window |
Window API.
|
Package | Description |
---|---|
quarks.javax.websocket |
Support for working around JSR356 limitations for SSL client container/sockets.
|
quarks.javax.websocket.impl |
Support for working around JSR356 limitations for SSL client container/sockets.
|
quarks.runtime.etiao |
A runtime for executing a Quarks streaming topology, designed as an embeddable library
so that it can be executed in a simple Java application.
|
quarks.runtime.etiao.graph | |
quarks.runtime.etiao.graph.model | |
quarks.runtime.etiao.mbeans | |
quarks.runtime.jmxcontrol | |
quarks.runtime.jsoncontrol | |
quarks.test.svt |
Quarks applications communicate with back-end systems through some form of message hub as there may be millions of edge devices. Quarks supports these message hubs:
Back-end analytic systems are used to perform analysis on information from Quarks applications that cannot be performed at the edge. Such analysis may be:
Topology
which uses a functional
model to build a topology of streams
for an application.
TStream
is a declaration of a stream of tuples, an application will create streams that source data (e.g. sensor readings) and then apply functions that transform those streams into derived streams, for example simply filtering a stream containg engine temperator readings to a derived stream that only contains readings thar are greater than 100°C.
This programming style is typical for streaming systems and similar APIs are supported by systems such as Apache Flink, Apache Spark Streaming, IBM Streams and Java 8 streams.
source --> filter --> transform --> aggregate --> send to MQTT
graph
API is a lower-level API that the
topology api is built on top of. A graph consists of
oplet
invocations connected by streams.
The oplet invocations contain the processing applied to each tuple
on streams connected to their input ports. Processing by the oplet
submits tuples to its output ports for subsequent processing
by downstream connected oplet invocations.
<quarks-target>
refers to a Quarks release's platform target
directory such as .../quarks/java8
.
A number of sample Java applications are provided that demonstrate use of Quarks.
The Java code for the samples is under <quarks-target>/samples
.
Shell scripts to run the samples are <quarks-target>/scripts
.
See the README
there.
Summary of samples:
Sample | Description | Focus |
---|---|---|
HelloWorld |
Prints Hello World! to standard output. | Basic mechanics of declaring a topology and executing it. |
PeriodicSource |
Polls a random number generator for a new value every second and then prints out the raw value and a filtered and transformed stream. | Polling of a data value to create a source stream. |
SensorsAggregates |
Demonstrates partitioned aggregation and filtering of simulated sensors
that are bursty in nature, so that only intermittently
is the data output to System.out |
Simulated sensors with windowed aggregation |
SimpleFilterTransform |
||
File | Write a stream of tuples to files. Watch a directory for new files and create a stream of tuples from the file contents. | Use of the File stream connector |
IotfSensors, IotfQuickstart | Sends simulated sensor readings to an IBM Watson IoT Platform instance as device events. | Use of the IBM Watson IoT Platform connector to send device events and receive device commands. |
JDBC | Write a stream of tuples to an Apache Derby database table. Create a stream of tuples by reading a table. | Use of the JDBC stream connector |
Kafka | Publish a stream of tuples to a Kafka topic. Create a stream of tuples by subscribing to a topic and receiving messages from it. | Use of the Kafka stream connector |
MQTT | Publish a stream of tuples to a MQTT topic. Create a stream of tuples by subscribing to a topic and receiving messages from it. | Use of the MQTT stream connector |
SensorAnalytics | Demonstrates a Sensor Analytics application that includes: configuration control, a device of one or more sensors and some typical analytics, use of MQTT for publishing results and receiving commands, local results logging, conditional stream tracing. | A more complete sample application demonstrating common themes. |
classpath
depending
on what features your application uses.
Include one or both of the following:
<quarks-target>/lib/quarks.providers.direct.jar
- if you use the
DirectProvider
<quarks-target>/lib/quarks.providers.development.jar
- if you use the
DevelopmentProvider
<quarks-target>/connectors/file/lib/quarks.connectors.file.jar
<quarks-target>/connectors/jdbc/lib/quarks.connectors.jdbc.jar
<quarks-target>/connectors/iotf/lib/quarks.connectors.iotf.jar
<quarks-target>/connectors/kafka/lib/quarks.connectors.kafka.jar
<quarks-target>/connectors/mqtt/lib/quarks.connectors.mqtt.jar
<quarks-target>/connectors/wsclient-javax.websocket/lib/quarks.connectors.wsclient.javax.websocket.jar
[*]javax.websocket
client implementation
if you use the wsclient
connector. Include the following to use
an Eclipse Jetty based implementation:
<quarks-target>/connectors/javax.websocket-client/lib/javax.websocket-client.jar
Include jars for any Quarks utility features you use:
<quarks-target>/utils/metrics/lib/quarks.utils.metrics.jar
- for the quarks.metrics
packagejava.util.logging
or log4j
).
For java.util.logging
you can include:
<quarks-target>/ext/slf4j-1.7.12/slf4j-jdk-1.7.12.jar
Copyright IBM 2015,2016 - 2f6ad0e-20160307-0902