8 ms·
Because I'm sure other people will ask - no, it does not support SQL.
by BrentOzar 1y ago
Because I'm sure other people will ask - no, it does not support SQL.
- jorangreef 1y agoJoran from TigerBeetle here! Yes, this is by design. SQL is a great general purpose query language for read-heavy variable-length string workloads, but TigerBeetle optimizes for write-heavy transaction processing workloads (essentially debit/credit with fixed-size integers) and specifically with power law contention, which kills SQL row locks. I spoke about this specific design decision in depth at Systems Distributed this year: 1000x - https://m.youtube.com/watch?v=yKgfk8lTQuE https://m.youtube.com/watch?v=yKgfk8lTQuE
- justinclift 1y ago> which kills SQL row locks. What's it like compared to MVCC?
- jorangreef 1y agoDepending on contention and RTT, as a specialized OLTP DBMS, TB can do roughly 1000-2000x more performance than a single node OLGP DBMS (cf. the live demo in the talk above)… but also with strict serializability. You don’t need to sacrifice correctness or real-time resolution, and that’s important. For example, if you need to do real-time balance checks.
- justinclift 1y agoHmmm, I guess it sounds weird to me to be talking "RTT" (round trip time) when the example is "a single node". I'll watch your talk properly at some point and see if it makes sense to me after that. :)
- cma256 1y agoNode count doesn't matter. You could use an embedded database and encounter the same problem. There is some time T between when you acquire a lock and release it. Depending on the amount of contention in your system, this will have some affect on total throughput (i.e. Amdahl's law).
- justinclift 1y agoHow familiar are you with MVCC? https://www.postgresql.org/docs/current/mvcc-intro.html https://www.postgresql.org/docs/current/mvcc-intro.html Asking because needing a lock for changing a row isn't the only approach that can be taken.
- senderista 1y agoAlmost all commercial MVCC implementations (including Postgres) use row locks. Very few use OCC even though it's arguably a more natural fit for MVCC. Pessimistic locking is simply more robust over varied workloads.
- moffers 1y agoTB seems really awesome, but is there non-DebitCredit use cases where it can be applied effectively? I like trying to find off-label uses for cool technology
- jorangreef 1y agoThanks! Check out https://tigerfans.io https://tigerfans.io
- big_hacker 1y agoWhat's it like compared to Redis or even KeyDB?
- jorangreef 1y agoCompared to Redis, TigerBeetle has strong durability, and an LSM storage engine to page incremental updates to disk, so it can support 10+ TiB data sets without running into snapshot stalls or OOM.
- karmakaze 1y agoIt helps to know what kind of data TigerBeetle handles. The data committed by its transactions is an immutable Transfer of id:128-bit, debit_account_id:128-bit, credit_account_id:128-bit, amount:128-bit, ledger:128-bit, code:16-bit, flags:bitfield, timestamp:64-bit, user_data_128, user_data_64, user_data_32. Transactions atomically process one or more Transfers, keeping Account balances correct. Accounts are also records, their core fields (debits_posted, credits_posted, etc). This gives a good idea of what TigerBeetle might be good for and what it might not be. For anything where latency/throughput and accuracy really, really matters, it could be worth the effort to make your problem fit.