Proton
A streaming SQL engine, fast and lightweight
π DocumentationΒ Β
π Live DemoΒ Β
π Timeplus
Β
Β
Β
Β
Β
Β
Β
Β
Why Use Proton Β· Demo Video Β· Deployment Β· What's Next Β· Integrations Β· Contributing Β· Need help?
Proton is a streaming SQL engine, a fast and lightweight alternative to Apache Flink, π powered by ClickHouse. It enables developers to solve streaming data processing, routing and analytics challenges from Apache Kafka, Redpanda and more sources, and send aggregated data to the downstream systems. Proton is the core engine of Timeplus, which is a cloud native streaming analytics platform.
πͺ Why use Proton?β
- Apache Flink or ksqlDB alternative. Proton provides powerful streaming SQL functionalities, such as streaming ETL, tumble/hop/session windows, watermarks, materialized views, CDC and data revision processing, etc.
- Fast. Proton is written in C++, with optimized performance through SIMD. For example, on an Apple MacBookPro with M2 Max, Proton can deliver 90 million EPS, 4 millisecond end-to-end latency, and high cardinality aggregation with 1 million unique keys.
- Lightweight. Proton is a single binary (<500MB). No JVM or any other dependencies. You can also run it with Docker, or on an AWS t2.nano instance (1 vCPU and 0.5 GiB memory).
- Powered by the fast, resource efficient and mature ClickHouse. Proton extends the historical data, storage, and computing functionality of ClickHouse with stream processing. Thousands of SQL functions are available in Proton. Billions of rows are queried in milliseconds.
- Best streaming SQL engine for Kafka or Redpanda. Query the live data in Kafka or other compatible streaming data platforms, with external streams.
See our architecture doc for technical details and our FAQ for more information.
π¬ Demo Videoβ
β‘ Deploymentβ
A single binary:β
curl https://install.timeplus.com | sh
For Mac users, you can also use Homebrew to manage the install/upgrade/uninstall:
brew tap timeplus-io/timeplus
brew install proton
Docker:β
docker run -d --pull always --name proton ghcr.io/timeplus-io/proton:latest
In case you cannot access ghcr, you can pull the image from public.ecr.aws/timeplus/proton
Docker Compose:β
The Docker Compose stack demonstrates how to read/write data in Kafka/Redpanda with external streams.
Timeplus Cloud:β
One step to try Proton in Timeplus Cloud
π Usageβ
From proton client
, run the following SQL to create a stream of random data:
-- Create a stream with random data
CREATE RANDOM STREAM devices(
device string default 'device'||to_string(rand()%4),
temperature float default rand()%1000/10)
-- Run the streaming SQL
SELECT device, count(*), min(temperature), max(temperature)
FROM devices GROUP BY device
You should see data like the following:
ββdeviceβββ¬βcount()ββ¬βmin(temperature)ββ¬βmax(temperature)ββ
β device0 β 2256 β 0 β 99.6 β
β device1 β 2260 β 0.1 β 99.7 β
β device3 β 2259 β 0.3 β 99.9 β
β device2 β 2225 β 0.2 β 99.8 β
βββββββββββ΄ββββββββββ΄βββββββββββββββββββ΄βββββββββββββββββββ
β© What's next?β
To see more examples of using Proton, check out the examples folder.
To access more features, such as sources, sinks, dashboards, alerts, data lineage, create a workspace on Timeplus Cloud or try the live demo with pre-built live data and dashboards.
𧩠Integrationsβ
The following drivers are available:
- https://github.com/timeplus-io/proton-java-driver JDBC and other Java clients
- https://github.com/timeplus-io/proton-go-driver
- https://github.com/timeplus-io/proton-python-driver
Integrations with other systems:
- ClickHouse https://docs.timeplus.com/proton-clickhouse-external-table
- Grafana https://github.com/timeplus-io/proton-grafana-source
- Metabase https://github.com/timeplus-io/metabase-proton-driver
- Pulse UI https://github.com/timeplus-io/pulseui/tree/proton
- Homebrew https://github.com/timeplus-io/homebrew-timeplus
- dbt https://github.com/timeplus-io/dbt-proton
Contributingβ
We welcome your contributions! If you are looking for issues to work on, try looking at the issue list.
Please see the wiki for more details, and BUILD.md to compile Proton in different platforms.
We also encourage you to join our Timeplus Community Slack to ask questions and meet other active contributors from Timeplus and beyond.
Need help?β
Join our Timeplus Community Slack to connect with Timeplus engineers and other Proton users.
For filing bugs, suggesting improvements, or requesting new features, see the open issues here on GitHub.
Licensingβ
Proton uses Apache License 2.0. See details in the LICENSE.