Use Cases

The most popular use cases for PipelineDB are realtime reporting dashboards and realtime monitoring systems. But PipelineDB can be used for any realtime analytics applications where you know the queries you want to run in advance and can express your queries in SQL.

Realtime Reporting Dashboards

Easily build realtime reporting dashboards for internal or customer-facing use. Because summary analytic data is pre-computed by PipelineDB’s continuous query engine before it is stored, any time users refresh their PipelineDB-powered dashboard their analytics will be realtime up to the second.

realtime reporting dashboard
-- Calculate the number of unique users seen per url referrer each day using only a constant amount of space per day
COUNT(DISTINCT user_id::integer)
FROM users_stream GROUP BY day, referrer;

-- How many ad impressions have we served in the last five minutes?
CREATE VIEW imps WITH (sw = '5 minutes') AS
SELECT COUNT(*) FROM imps_stream

-- Join conversions on any prior clicks that may have caused them
CREATE VIEW click_throughs AS
campaign_id, COUNT(*), COUNT(DISTINCT user_id)
FROM conversions JOIN clicks USING(user_id, campaign_id)
WHERE conversions.timestamp > clicks.timestamp
GROUP BY day, campaign_id;

More examples can be found here.

Realtime Monitoring Systems

Monitor systems in realtime using continuous SQL queries and take action when certain criteria are met. Sliding window queries enable you to easily define custom time windows for systems monitoring using regular SQL and power realtime monitoring applications or dashboards.

-- What are the 90th, 95th, and 99th percentiles of my server’s request latency?
percentile_cont(array[90, 95, 99])
WITHIN GROUP (ORDER BY latency::integer)
FROM latency_stream;

-- Heavy hitters: how much traffic are each of the top-10 IP addresses making requests to my server generating?
CREATE VIEW heavy_hitters AS
topk_agg(ip, 10, response_size)
FROM requests_stream GROUP BY day;

Swag for Stories

Are you using PipelineDB in production and open to sharing your use case with the world? Fill out the form below and we’ll send you a PipelineDB hoodie if your company is selected for a case study, which we’ll publish on our website and send out to the PipelineDB community.