Cube Module

Cube module enables near-real time reporting for multidimensional data streams by "pre-aggregrating" streams into specified sets.

  • Log-Structured Merge Trees as core storage principle for its aggregations (unlike OLTP databases, it is designed from ground up for OLAP workload)
  • Up to ~1.5M of inserts per second into aggregation on single core
  • Live OLAP queries with incremental updates
  • Aggregations storage medium can use any distributed file system
  • Query API exposed through JSON HTTP (for interoperability with JS web clients) and serialized async streams (for maximum performance)
  • Uses Eventloop for fast log processing I/O, Async Streams and Serializers for aggregations and logs processing, Codegen for aggregate functions and group-by operations


  1. Cube (deprecated, this example is for version 2.0.9)

To run the example, you should follow these steps (also described in its

  • Create database and 3 tables using scripts from file “create_tables.sql”
  • Modify file with database access configuration (db.jdbcUrl, db.username, db.password) (it is advised to launch examples in $MODULE_DIR$, so paths are resolved properly).
  • Specify SQLDialect in CubeModule.DATABASE_DIALECT constant according to RDBMS you are using.
  • Run CubeLauncher:
$ git clone
$ cd datakernel-examples/examples/cube
$ mvn clean package exec:java -Dexec.mainClass=io.datakernel.examples.CubeLauncher