Skip to content

Quarks Modules & Jars

Dan Debrunner edited this page Feb 27, 2016 · 1 revision

Quarks Modules & Jars

Quarks is designed as a modular SDK so that only required code needs to be deployed to a device to reduce footprint.

The downside to this is that Quarks' distribution contains main jars, at least one per module.

Jar layout in a distribution

The core jars in a distribution are under lib and their dependent third-party jars are under ext.

Optional modules are under category/module, for example connectors/http with their Quarks & third-party jars in the sub-directories lib & ext respectively, e.g. connectors/http/lib and connectors/http/ext.

Note all jar sizes are at the time of writing, and are subject to change.

Core Jars

Directory Size (bytes)
lib 188K
ext 588K

The only optional jar in the core set is for the DevelopmentProvider : quarks.providers.development.jar. This is only 4K so removing it from you distribution to a device is a minimal saving.

Connector Modules

Connector Size (bytes) Notes
connectors/file 40K
connectors/http 1.2M
connectors/iot 16K
connectors/iotf 3.0M requires connectors/iot
connectors/jdbc 24K
connectors/kafka 13M
connectors/mqtt 204K requires connectors/iot

To reduce footprint the simpliest approach is to remove the modules not needed in a device deployment. Note the biggest saving is removing the Kafka connector, which is typically an enterprise connector rather than an IoT one.

Analytic Modules

Analytic Size (bytes) Notes
analytics/math3 2.0M
analytics/sensors 16K

Util Modules

Utility Size (bytes) Notes
utils/metrics 24K

Other Modules

Modules Size (bytes) Notes
console 1.8M Required by development provider
samples 648K Sample applications, typically not required for real applications
scripts 160K Scripts for sample applications, typically not required for real applications

Example Device Deployment

Here's an example set of jars for use by a Quarks application on a device that uses IBM Watson IoT Platform to communicate with back end systems, JDBC for a local data store and all the analytics Quarks currently provides.

Modules Size (bytes) Notes
core lib 184K Development provider not included
core ext 588K
connectors/iot 16K
connectors/iotf 3.0M requires connectors/iot
connectors/jdbc 24K
analytics/math3 2.0M
analytics/sensors 16K
Total ~5.7M A 75% space reduction compared to the full java8 distribution size of 23.0M