---
title: "Streaming Real-Time Visualizations with ClickHouse, Apache Arrow and Perspective"
description: "A ~100-line browser demo streams forex tick data from ClickHouse into the Perspective visualization library (Rust/C++ compiled to WebAssembly) using Apache Arrow over HTTP."
url: "https://swe.quest/articles/streaming-real-time-visualizations-with-clickhouse-apache-arrow-and-perspective-7d2ccb1a3cd92435"
canonical: "https://clickhouse.com/blog/streaming-real-time-visualizations-clickhouse-apache-arrow-perpsective"
source: "ClickHouse"
published: "2024-10-02"
difficulty: "medium"
kind: "How-to"
reading_minutes: 13
tags: ["analytics","frontend","realtime","sql","webassembly"]
---

# Streaming Real-Time Visualizations with ClickHouse, Apache Arrow and Perspective

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2024-10-02, 13 min read, How-to. Original: [https://clickhouse.com/blog/streaming-real-time-visualizations-clickhouse-apache-arrow-perpsective](https://clickhouse.com/blog/streaming-real-time-visualizations-clickhouse-apache-arrow-perpsective)

## Summary

A ~100-line browser demo streams forex tick data from ClickHouse into the Perspective visualization library (Rust/C++ compiled to WebAssembly) using Apache Arrow over HTTP. ClickHouse has no push or WebSocket API, so the client polls a sliding time window every ~30–50ms. The query filters on the primary-key timestamp and uses a window function over a slightly widened range to compute per-pair price change. Perspective keeps only the latest 20k rows. Queries run in under 10ms on 11.5B rows, latency is dominated by HTTP round trips, and 20 clients (~200 QPS) used under 2 cores. Polling can miss rows under eventual consistency and insert latency, which motivates planned streaming queries, and a full-dataset speed test uses the ArrowStream format with the Arrow JS library to feed data in chunks.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)
- [Frontend](https://swe.quest/tags/frontend.md) (Web & mobile)
- [Real-time systems](https://swe.quest/tags/realtime.md) (Backend & APIs)
- [SQL](https://swe.quest/tags/sql.md) (Languages)
- [WebAssembly](https://swe.quest/tags/webassembly.md) (Languages)

## Prerequisites

- SQL window functions ([easy posts on SQL](https://swe.quest/tags/sql.md?difficulty=easy))
- JavaScript fetch API ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))
- ClickHouse MergeTree basics ([easy posts on Analytics & OLAP](https://swe.quest/tags/analytics.md?difficulty=easy))

## Keywords

ClickHouse, Perspective, Apache Arrow, ArrowStream, WebAssembly, MergeTree

## Related posts

- [Building StockHouse: Real-time market analytics with ClickHouse](https://swe.quest/articles/building-stockhouse-real-time-market-analytics-with-clickhouse-84e9bb5a68744806.md): ClickHouse · 2025-11-13 · Medium · 6 min read · Analytics & OLAP, Stream processing, SQL, Go
  StockHouse is a reference streaming analytics app that ingests live stock and crypto ticks from Massive's WebSocket APIs through a Go ingester into ClickHouse and renders them in a Vue dashboard built on Perspective.
- [Why ClickHouse Cloud wins at real-time analytics](https://swe.quest/articles/why-clickhouse-cloud-wins-at-real-time-analytics-ff3bf2806ccb7be7.md): ClickHouse · 2026-10-28 · Medium · 21 min read · Analytics & OLAP, Storage engines, Query engines, Performance engineering, Cost optimization
  In the CostBench streaming benchmark (113.2 billion stock quotes ingested at about 1M rows/s while queries ran), ClickHouse Cloud scored 412× to 1,996× better end-to-end performance per dollar than Snowflake, Databricks, BigQuery and Redshift Serverless.
- [Why Flock Safety turned to ClickHouse for real-time vehicle traffic analytics](https://swe.quest/articles/why-flock-safety-turned-to-clickhouse-for-real-time-vehicle-traffic-analytics-f35b2dcb28006f8a.md): ClickHouse · 2025-04-29 · Medium · 5 min read · Analytics & OLAP, Data pipelines, Cloud platforms
  Flock Safety replaced a once-daily Redshift, DBT, Prefect and QuickSight SPICE pipeline with ClickHouse Cloud.
- [Build a real-time market data app with ClickHouse and Massive](https://swe.quest/articles/build-a-real-time-market-data-app-with-clickhouse-and-massive-0320c9b65a8a9694.md): ClickHouse · 2026-09-04 · Medium · 15 min read · Analytics & OLAP, Real-time systems, JavaScript, SQL, React
  A real-time tick data app can stream stock trades and quotes from Massive (formerly Polygon.io) over WebSockets straight into ClickHouse, with a Node.js backend and a React frontend for live visualization.
- [How Bullet uses ClickHouse Cloud to give DeFi's fastest exchange real-time analytics](https://swe.quest/articles/how-bullet-uses-clickhouse-cloud-to-give-defi-s-fastest-exchange-real-time-2e306d9fa945673c.md): ClickHouse · 2026-07-15 · Medium · 9 min read · Analytics & OLAP, Data pipelines, Databases, Payments & fintech
  Bullet, a Rust-based DeFi perpetuals exchange running as an app-specific rollup on Solana with ~500μs p50 order processing, indexes 150M+ rows per hour of sequencer events into ClickHouse Cloud for trade history, real-time analytics and monitoring.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
