You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following diagram depicts the highlevel components of Timeplus core engine.
5
+
The diagram below illustrates the high-level components of the Timeplus core engine. The following sections explain how these components work together as a unified system.
6
6
7
7

8
8
9
-
### The Flow of Data
9
+
##Data Flow
10
10
11
-
####Ingest
11
+
### Ingest
12
12
13
-
When data is ingested into Timeplus, it first lands in the NativeLog. As soon as the log commit completes, the data becomes immediately available for streaming queries.
13
+
When data is ingested into Timeplus, it first lands in the **NativeLog**. As soon as the log commit completes, the data becomes instantly available for streaming queries.
14
14
15
-
In the background, dedicated threads continuously tail new entries from the NativeLog and flush them to the Historical Store in larger, optimized batches.
15
+
In the background, dedicated threads continuously tail new entries from the NativeLog and flush them into the **Historical Store** in optimized, larger batches.
16
16
17
-
####Query
17
+
### Query
18
18
19
-
Timeplus supports three query modes: **historical**, **streaming**, and **hybrid (streaming + historical)**.
19
+
Timeplus supports three query models: **historical**, **streaming**, and **hybrid (streaming + historical)**.
20
20
21
-
-**Historical Query (a.k.a. Table Query)**
21
+
-**Historical Query (Table Query)**
22
+
Works like a traditional database query. Data is read directly from the **Historical Store**, leveraging standard database optimizations for efficient lookups and scans:
23
+
- Primary index
24
+
- Skipping index
25
+
- Secondary index
26
+
- Bloom filter
27
+
- Partition pruning
22
28
23
-
Works like a traditional database query. Data is fetched directly from the **Historical Store**, and all standard database optimizations like the following apply. These optimizations accelerate large-scale scans and point lookups, making historical queries fast and efficient.
24
-
- Primary index
25
-
- Skipping index
26
-
- Secondary index
27
-
- Bloom filter
28
-
- Partition pruning
29
+
-**Streaming Query**
30
+
Operates on the **NativeLog**, where records are strictly ordered. Queries run incrementally, enabling real-time workloads such as **incremental ETL**, **joins**, and **aggregations**.
29
31
30
-
-**Streaming Query**
32
+
-**Hybrid Query**
33
+
Combines the best of both worlds. A streaming query can automatically **backfill** from the Historical Store when:
34
+
1. Data has expired from the NativeLog (due to retention).
35
+
2. Reading from the Historical Store is faster than rewinding and replaying from the NativeLog.
31
36
32
-
Operates on the **NativeLog**, which stores records in sequence. Queries run incrementally, enabling real-time processing patterns such as **incremental ETL**, **joins**, and **aggregations**.
37
+
This eliminates the need for an external batch system, avoiding the extra **latency, inconsistency, and cost** usually associated with maintaining separate batch and streaming pipelines.
33
38
34
-
-**Hybrid Query**
39
+
## Dural Storage
35
40
36
-
Streaming queries can automatically **backfill** from the Historical Store when:
37
-
1. Data no longer exists in the NativeLog (due to retention policies).
38
-
2. Pulling from the Historical Store is faster than rewinding the NativeLog to replay old events.
41
+
### NativeLog
39
42
40
-
This allows seamless handling of scenarios like **fast backfill** and **mixed real-time + historical analysis** without breaking query continuity and also don't need yet another external batch system to load the historical data which usually introduce worse latency, inconsitency and cost.
41
-
42
-
### The Dural Storage
43
-
44
-
#### NativeLog
45
-
46
-
The **Timeplus NativeLog** is the system’s write-ahead log (WAL) or journal: an append-only, high-throughput store optimized for low-latency, highly concurrent data ingestion. In a cluster deployment, it is replicated using **Multi-Raft** for fault tolerance. By enforcing a strict ordering of records, NativeLog forms the backbone of streaming processing in **Timeplus Core**.
43
+
The **Timeplus NativeLog** is the system’s write-ahead log (WAL) or journal: an append-only, high-throughput store optimized for low-latency, highly concurrent data ingestion. In a cluster deployment, it is replicated using **Multi-Raft** for fault tolerance. By enforcing a strict ordering of records, NativeLog forms the backbone of streaming processing in **Timeplus Core**, it is also the building block of other internal components like the repliated meta store in Timeplus.
47
44
48
45
NativeLog uses its own record format, consisting of two high-level types:
49
46
50
47
-**Control records** (a.k.a. meta records) – store metadata and operational information.
51
48
-**Data records** – columnar-encoded for fast serialization/deserialization and efficient vectorized streaming execution.
52
49
53
-
Each record is assigned a monotonically increasing sequence number—similar to a Kafka offset—which guarantees ordering.
50
+
Each record is assigned a monotonically increasing sequence number — similar to a Kafka offset — which guarantees ordering.
54
51
55
-
Lightweight indexes are maintained to support rapid rewind and replay operations by **timestamp** or **sequence number**in streaming queries.
52
+
Lightweight indexes are maintained to support rapid rewind and replay operations by **timestamp** or **sequence number**for streaming queries.
56
53
57
-
####Historical Store
54
+
### Historical Store
58
55
59
56
The **Historical Store** in Timeplus stores data **derived** from the **NativeLog**. It powers use cases such as:
60
57
61
58
-**Historical queries** (a.k.a. *table queries* in Timeplus)
62
59
-**Fast backfill** into streaming queries
63
-
- Acting as a **serving layer** for downstream applications
60
+
- Acting as a **serving layer** for applications
64
61
65
62
Timeplus supports two storage encodings for the Historical Store: **columnar** and **row**.
66
63
67
-
#####1. Columnar Encoding (*Append Stream*)
68
-
Optimized for **append-most workloads** with minimal data mutation, such as telemetry or event logs. Benefits include:
64
+
#### 1. Columnar Encoding (*Append Stream*)
65
+
Optimized for **append-most workloads** with minimal data mutation, such as telemetry or events, logs, metrics etc. Benefits include:
69
66
70
67
- High data compression ratios
71
68
- Blazing-fast scans for analytical workloads
72
69
- Backed by the **ClickHouse MergeTree** engine
73
70
74
71
This format is ideal when the dataset is largely immutable and query speed over large volumes is a priority.
75
72
76
-
#####2. Row Encoding (*Mutable Stream*)
73
+
#### 2. Row Encoding (*Mutable Stream*)
77
74
Designed for **frequently updated datasets** where `UPSERT` and `DELETE` operations are common. Features include:
78
75
79
76
- Per-row **primary indexes**
@@ -82,6 +79,24 @@ Designed for **frequently updated datasets** where `UPSERT` and `DELETE` operati
82
79
83
80
Row encoding is the better choice when low-latency, high-frequency updates are required.
84
81
82
+
## External Storage
83
+
84
+
Timeplus natively connects to external storage systems through **External Streams** and **External Tables**, giving you flexibility in how data flows in and out of the platform.
85
+
86
+
-**Ingest from External Systems**
87
+
Stream data directly from Kafka, Redpanda, or Pulsar into Timeplus. Use **Materialized Views** for incremental processing (e.g., ETL, filtering, joins, aggregations).
88
+
89
+
-**Send Data to External Systems**
90
+
Push processed results downstream to systems like **ClickHouse** for analytics or long-term storage.
91
+
92
+
-**Keep Data Inside Timeplus**
93
+
Store **Materialized View outputs** in Timeplus itself to serve client queries with low latency.
94
+
95
+
-**Raw Data Pipelines**
96
+
Ingest and persist raw data in Timeplus, then build end-to-end pipelines for **filtering, transforming, and shaping** the data—serving both **real-time** and **historical** queries from a single platform.
97
+
98
+
This flexible integration model lets you decide whether Timeplus acts as a **processing engine**, a **serving layer**, or the **primary data hub** in your stack.
99
+
85
100
## References
86
101
87
102
[How Timeplus Unifies Streaming and Historical Data Processing](https://www.timeplus.com/post/unify-streaming-and-historical-data-processing)
0 commit comments