Streamling Runtime Talk
Goldsky
Streamling · Open source

Building an open source data streaming runtime with Rust and DataFusion

The columnar streaming engine behind Goldsky Turbo Pipelines: Apache DataFusion, plus a source that never ends.

Rust Apache DataFusion Apache Arrow
Tan Sek Fook · Software Engineer · Goldsky
Goldsky
Hello 👋
Speaker
Tan Sek Fook
Software Engineer
Now
Goldsky
Previously
Xendit
Building an open source data streaming runtime02 / 11
Goldsky
Goldsky

Instant data for onchain finance

The borderless data platform for fintech and crypto businesses.

Chains supported
150+
TVL powered
$75B+
Read / write
2GB/s+
Crypto data stored
4PB+
Latency
<1s
Teams that build with Goldsky
Uniswap
Kraken
Coinbase
Phantom
Optimism
Consensys
Ripple
Polymarket
Stellar
Arweave
Who we serve
Banking

Proof of reserves, treasury, AML monitoring

Fintech

Wallet balances and transfers

Payments

Deposit detection, cross-chain settlement

Trading

Tokenized RWA, prediction markets

Source: goldsky.com03 / 11
Goldsky
The composable data stack

Postgres builds every database layer in one binary

PostgreSQLone binary
SQL parsergram.y (Bison)
Rewriterviews, rules
Planner / optimizercost-based, pg_statistic
ExecutorVolcano, tuple at a time
Storageheap files, 8 KB pages
TransactionsWAL, commit log
ConcurrencyMVCC snapshots
What the optimizer does
SELECT id, amount FROM transactions WHERE amount > 1000
Projectionid, amount
Filteramount > 1000
TableScantransactions
filter: amount > 1000columns: all 6columns: id, amount
idfromtoamountblockts
1500
21500
32500
4750
51200
690
73000
8640
Cells leaving the scan48

The scan reads every row and column. The Filter above it drops 4 of 8 rows after they were already read.

DataFusion gives you this optimizer as a Rust library: TableProvider::scan receives the filters and projection05 / 11
Goldsky
What is DataFusion

A query engine you embed, then extend

01SQL parsersqlparser-rs → ASTstock
02Logical plannerAST → LogicalPlanstock
03Physical planner+ our ExtensionPlannerextended
04Optimizer rules+ our 3 streaming rulesextended
05Vectorized executorPulls Arrow RecordBatchesstock

Apache DataFusion is an extensible SQL query engine in Rust. It uses Apache Arrow as its in-memory format. Streamling runs on DataFusion 54.

01
Full SQL without writing an engine

Parser, planner, optimizer, UDFs and a vectorized executor are ready to use.

02
Four extension points, no fork
TableProviderSources and sinks become tables
ExecutionPlanCustom physical operators
ExtensionPlannerLowers our custom nodes
PhysicalOptimizerRuleRewrites the plan (we have 3)
03
Lighter than Flink for our workloads

CDC fan-out, enrichment, dedup: no distributed shuffle needed. Pipelines go from paused to running in about 5s.

We extend its extension points. We do not fight it.06 / 11
Goldsky
Streamling = DataFusion + an unbounded source

A streaming source is a TableProvider that never ends

Batch query
SinkParquetSink
ProjectionSELECT a, b
FilterWHERE …
TableScanparquet · Bounded
Streaming query
SinkKafkaSink
ProjectionSELECT a, b
FilterWHERE …
TableScankafka · Unbounded
Same plan, same SQL, same executor

Only the bottom node differs. Filter, Projection and UDFs above the scan are stock DataFusion.

Checkpoints ride inside the data
Marker(N)Coordinator → sources, flows through the plan in batch metadata
Ack(N)Sinks → coordinator, after flush
Finalizer(N)Sources commit offsets
Scope is a feature
filtersprojectionsUDFsUNNESTlookups streaming JOINswindowsexactly-once
Out of scope = needs shuffle or per-key state → use Flink07 / 11
Goldsky
Streamling features

One YAML file: sources, transforms, sinks

SourcesUnbounded in
Kafkalive stream ClickHousebatch / job Filebounded · continuous Hybridbackfill → live
Extend
Rust plugin sourcepoll any API
Arrow
TransformsHow it's shaped
SQLDataFusion WebAssembly scriptJS / TS sandbox HTTP handlercall your service Dynamic tableslookup · dedup
Extend
Rust plugintransform · UDF
Arrow
SinksWhere it lands
Postgres+ aggregation ClickHouse Kafka WebhookHTTP
Community plugins
S3 · MySQL · SQS · S2
✓
At-least-onceCheckpoints in memory, SQLite or Postgres
↺
UpsertsINSERT / UPDATE / DELETE via _gs_op
⇢
Side outputsRoute errors and extra streams
◎
ObservabilityOpenTelemetry metrics + live inspect
Built-in: print and blackhole sinks for testing08 / 11
Goldsky
Try it yourself

Build from source and run your own pipeline

1
Clone the repo

Needs Rust via rustup. The repo pins its toolchain.

2
Build with Cargo

One release binary: target/release/streamling.

3
Create some data

A CSV in ./data/ acts as a bounded source.

4
Write pipeline.yaml

Source → SQL filter → print sink.

5
Run it

Rows 2 and 3 print, then the job ends. Set type: continuous to keep polling.

~/streamling — zsh
# 1. clone
git clone https://github.com/goldsky-io/streamling && cd streamling
# 2. build
cargo build --release --bin streamling
# 3. data
mkdir -p data && printf 'id,amount\n1,500\n2,1500\n3,2500\n4,750\n' > data/tx.csv
# 4. pipeline.yaml
sources:
  raw_transactions:
    type: file
    path: ./data/
    format: csv
    primary_key: id
    mode: { type: bounded }
transforms:
  large_transactions:
    type: sql
    primary_key: id
    sql: SELECT * FROM raw_transactions WHERE amount > 1000
sinks:
  print_large: { type: print, from: large_transactions }
# 5. run
./target/release/streamling pipeline.yaml
Next: swap the source for kafka and the sink for postgres09 / 11
Goldsky
Results in production

What moving off Flink changed for Goldsky

Compute
>30×
Less compute
Flink10+ cores
Streamling0.3 cores

Average CPU on a benchmarked production workload: read from Kafka, enrich, write into ClickHouse.

Cost
>$1M
Saved per year
Per monthSix figures saved
Per yearOver $1 million saved

Moving our pipelines to Streamling cut Goldsky's cloud costs.

Startup
>20×
Faster cold start
Flink>2 min
Streamling<5 s

From a topology change to data written in the destination, including image download, pod creation and execution.

Compared with Flink on Goldsky production workloads10 / 11
Goldsky
Q&A
Questions?

Streamling is open source today. Star it, clone it, raise an issue.

License: FSL-1.1-ALv2 · Tan Sek Fook
Scan for the repo