Realtime Analytics
Replace a fragmented stack of specialized monitoring tools with a single database that integrates time-series sensor data, service metrics, and infrastructure topology. Time-series native functions — ts.timeBucket(), ts.rate(), ts.percentile(), and ts.interpolate() — power sensor and service metric analysis, while graph traversal maps building topology and service dependencies, enabling multi-model correlation that combines graph-based entity identification with time-series aggregation in unified queries.
Architecture Overview
Time Series |
|
Vertices |
|
Edges |
|
Sensors are installed on floors within buildings; services run on servers and depend on other services. Time-series data links to graph topology, enabling queries like "show the temperature trend for all sensors on the 2nd floor of Building A."
Key Queries
Hourly Temperature Bucketing — Aggregate sensor readings by hour:
SELECT sensor_id, ts.timeBucket(timestamp, 'PT1H') AS hour,
AVG(temperature) AS avg_temp, MAX(temperature) AS max_temp
FROM SensorReading
GROUP BY sensor_id, hour ORDER BY hour
Service Request Rate — Calculate request rate per service:
SELECT service_id, ts.rate(timestamp, request_count, 'PT5M') AS req_per_5min
FROM ServiceMetrics
WHERE service_id = 'api-gateway'
Service Impact Analysis — Trace service dependencies for outage impact:
MATCH (s:Service {name: 'database'})<-[:DEPENDS_ON*1..3]-(dependent:Service)
RETURN dependent.name AS affected_service, length(path) AS hops
Try It Yourself
git clone https://github.com/ArcadeData/arcadedb-usecases.git
cd arcadedb-usecases/realtime-analytics
docker compose up -d
./setup.sh
./queries/queries.sh
Full source: realtime-analytics on GitHub