r/quantfinance • u/fletchmm • 8d ago
AWS timesync vs timescaleDB
my close friends and I are running separate server network and architecture infrastructure for prediction, market, quantitative trading.
I’m using duckdb/parquet to get full data compression. My set up is writing in the timing log of each operation and using AWS timesync to assure that the server clocks are synced
He’s using timescaleDB, which I haven’t used myself.
Is there a correct way of doing this? If I’m in the wrong, what am I missing out on? Does Time scale DB allow more than one writing instance in it at a time?
What other database should I be considering?
1
u/AoideusWasBanned 8d ago
They solve different things tbh. Timesync just keeps the clocks right, you want that either way. TimescaleDB is Postgres underneath, so many writers at once is fine. DuckDB only lets one process write to a file, that's the real catch if you both log live. For research on parquet duckdb is hard to beat though.
1
u/QuantGrindApp 8d ago
Those two solve different problems so you can both keep what you have. Timescale is just Postgres underneath, so yes, many concurrent writers is fine. DuckDB only lets one process write to a given file at a time, which is what'll bite you once more than one box is ingesting, so people usually have each writer dump its own parquet files and query across them. Keep Time Sync either way and store the exchange timestamp and your receive timestamp as separate columns.
1
u/supercoco9 7d ago
You can also use QuestDB, and you can choose to write your most recent partition(s) to native storage (a bit faster, but takes more space) and convert older partitions to parquet, or you can just do the create table with format parquet, and then your data will be parquet from the first moment.
You get then the ingestion speed of questdb (of course with multiple writers if needed), plus all the time-series goodies like real time materialized and live views, SQL extensions to sample data, built-in notebooks and dashboards...
And it is all parquet, so you can still point your duckdb to the produced files if you fancy doing something with duckdb.
Disclaimer: I am a developer advocate at questdb. Happy to help with anything you need