Scala code base for the turbine database, which is a low latency time series event driven, columnar database.
Download Project References
$ sbt update
Generate Eclipse Project
$ sbt eclipse
Compile
$ sbt compile
Test
$ sbt test
Run
$ sbt run
Package (Create Jar)
$ sbt one-jar
Run Benchmarks (Google Caliper)
$ sbt benchmark/run
POST: http://localhost:8080/db/mydatabase/mycollection
{
"timestamp": <timestamp>,
"data": {
"cpu": 43.2,
"ram": 56.9
}
}
Only a reducer is required.
GET: http://localhost:8080/db/mydatabase/mycollection?q=<query>
{
"start": <timestamp>, // Optional
"end": <timestamp>, // Optional
"extend": [
{"ext-value": ["add", "segment1", ["mul", "segment2", "segment3"]]}
], "match": [ // Optional
{"ram": {"gt": 50}}
], "group": [ // Optional
{"duration": "hour"}
], "reduce": [ // Required
{"ram-avg": {"avg": "ram"}}
]
}
Query needs to be URI encoded [eg: encodeURIComponent(query) in node/js console]
GET: http://localhost:8080/db/mydatabase/mycollection?m=<query>