TimescaleDB
Find all the information about how to set up your TimescaleDB instance for Speculare. It will be the core of the whole infrastructure for Speculare.
Last updated
Find all the information about how to set up your TimescaleDB instance for Speculare. It will be the core of the whole infrastructure for Speculare.
Last updated
Speculare is built on top of TimescaleDB, a highly performant relational and time-series database that extends PostgreSQL. TimescaleDB serves as the core of Speculare's infrastructure, leveraging advanced PostgreSQL functionalities and additional plugins to ensure optimal performance and ease of development.
This guide provides detailed instructions on configuring your TimescaleDB instance to support Speculare effectively.
You can refer to this link from Timescale for installation on your system: . Their docs are really well written !
Speculare rely on one more PostgreSQL plugin, which is .
As a basic explanation of what it does: wal2json convert the events passing through the WAL of PostgreSQL into a JSON structure that we're able to deserialize.
You now need to enable both plugins (wal2json & timescaledb), in your postgresql.conf
update the following field:
As you probably know, PostgreSQL doesn't offer a real-time API to listen to change over a Web-socket or such. Because of that we had to develop a Change Data Capture service which listen to the WAL output.
Logical replication can be enabled by changing a few line in postgresql.conf
:
This feature allow us to get a stream of changes made within PostgreSQL which is then filtered and broadcasted over Web-socket to subscribed clients. This is done though .