This describes development of Quarks itself, not how to develop Quarks applications. ADD LINK TO GETTING STARTED
The Quarks community welcomes contributions, please Get Involved! ADD LINK TO GET INVOLVED
Once you have forked the repository and created your local clone you need to download these additional developement software tools.
The Apache Ant build.xml
files are setup to assume that the Junit and Jacoco jars are copied into $HOME/.ant/lib
.
> ls $HOME/.ant/lib jacocoagent.jar jacocoant.jar junit-4.10.jar
These are optional
ANDROID_SDK_PLATFORM
to the location of the Android platform so that ${ANDROID_SDK_PLATFORM}/android.jar points to a valid jar.The primary build process is using Ant, any pull request is expected to maintain the build success of clean, all, test
.
The top-level Ant file quarks/build.xml
has these main targets:
all
(default) : Build all code and Javadoc into target
. The build will fail on any code error or Javadoc warning or error.clean
: Clean the projecttest
: Run the JUnit tests, if any test fails the test run stops. Takes around five minutes.reports
: Generate JUnit and Code Coverage reports, use after executing the test
target.release
: Build a release bundle, that includes subsets of the Quarks jars that run on Java 7 (target/java7
) and Android (target/android
).The build process has been tested on Linux and MacOSX.
To build on Windows probably needs some changed, please get involved and contribute them!
Running the reports target produces two reports:
reports/junit/index.html
- JUnit test reportreports/coverage/index.html
- Code coverage report.The code is broken into a number of projects and modules within those projects defined by directories under quarks
. Each top level directory is a project and contains one or more modules:
api
- The APIs for Quarks. In general there is a strict split between APIs and implementations to allow multiple implementations of an API, such as for different device types or different approaches.spi
- Common implementation code that may be shared by multiple implementations of an API. There is no requirement for an API implementation to use the provided spi code.runtime
- Implementations of APIs for executing Quarks applications at runtime. Initially a single runtime is provided, etiao
- EveryThing Is An Oplet - A micro-kernel that executes Quarks applications by being a very simple runtime where all functionality is provided as oplets, execution objects that process streaming data. So a Quarks application becomes a graph of connected oplets, and items such as fan-in or fan-out, metrics etc. are implemented by inserting additional oplets into the application's graph.providers
- Providers bring the Quarks modules together to allow Quarks applications to be developed and run.connectors
- Connectors to files, HTTP, MQTT, Kafka, JDBC, etc. Connectors are modular so that deployed applications need only include the connectors they use, such as only MQTT. Quarks applications running at the edge are expected to connect to back-end systems through some form of message-hub, such as an MQTT broker, Apache Kafka, a cloud based IoT service, etc.analytics
- Analytics for use by Quarks applications.utils
- Optional utilities for Quarks applications.console
- Development console that allows visualization of the streams within an Quarks application during development.samples
- Sample applications, from Hello World to some sensor simulation applications.android
- Code specific to Android.test
- SVTQuarks primary development environment is Java 8, to take advantage of lambda expressions since Quarks' primary api is a functional one.
However in order to support Android (and Java 7) other features of Java 8 are not used in the core code. Lambdas are translated into Java 7 compatible classes using retrolambda.
Thus:
In general most code is expected to work on Android (but might not yet) with the exception:
The repo contains Eclipse project definitions for the top-level directories that contain code, such as api, runtime, connectors.
Using the plugin Eclipse Git Team Provider allows you to import these projects into your Eclipse workspace directly from your fork.
Note. Specifics may change depending on your version of Eclipse or the Eclipse Git Team Provider.