3 ms·
Sometimes I wonder if I'm the crazy one. Kafka seems to me to be the only sensible foundational datastore out there: it can maintain and propagate a log with al
by lmm 5y ago
Sometimes I wonder if I'm the crazy one. Kafka seems to me to be the only sensible foundational datastore out there: it can maintain and propagate a log with all the properties you would want a datastore to have. Relational database seem to be a crazily overengineered solution in search of a problem, with incredibly poor reliability properties (essentially none of them are true master-master HA out of the box, and they tend to require significant compromises to make them so) to boot.
- valenterry 5y agoBoth are good for different purposes. Want to store data, query it in arbitrary and hard to foresee ways and also want to easily tune performance for these queries? Relational datastore it is. Want to have ACID? Well, relational datastore it is. Kafka is not the right solution for these problems.
- dmitriid 5y ago> Relational database seem to be a crazily overengineered solution in search of a problem I mean, whoever in their right mind would want to: - have a snapshot of data - query data, including ad-hoc querying - query related data - have trasactional updates to data When all you need is an unbounded stream of data that you need to traverse in order to do all these things.
- lmm 5y ago> - have a snapshot of data Being able to see a snapshot is good, and I would hope to see a higher-level abstraction that can offer that on top of something Kafka-like. But making the current state the primary thing is a huge step backwards, especially when you don't get a history at all by default. > - query data, including ad-hoc querying OK, fair, ad-hoc queries are one thing that relational databases are legitimately good at. Something that can maintain secondary indicies and do query planning based on them is definitely useful. But you're asking for trouble if you use them in your live dataflow or allow ad-hoc queries to write to your datastore. > - have trasactional updates to data I do think this one is genuinely a mistake. What do you do when a transaction fails? All of the answers I've heard imply that you didn't actually need transactions in the first place.
- irl_chad 5y agoYou think transactional updates are a mistake? I guess you’ve never had to worry about the integrity of your data? Bank -> debit card purchase -> perform all required database work in a transaction -> transaction fails -> decline debit card purchase Without transactions, in this scenario, maybe the debit card transaction fails but money is still taken out of your account? Doesn’t sound very pleasant.
- lmm 5y agoDatabase transactions would be useless for banks - you'll notice that if you try to pay while not having enough money in your account, the attempt doesn't simply disappear. What banks actually do is something akin to what Kafka-based systems do - the attempt to charge is recorded in a leger, and then fulfilment of that happens asynchronously.
- KptMarchewa 5y agoThat's seriously one of the worst takes I've seen on this website. >the attempt to charge is recorded in a leger Hint: how do you think this attempt is recorded and fulfilled? Or, do you think "it's just appended" and bank recalculates your balance from scratch every time you spend 1$ on coke can? Only bank I've heard of that's not using traditional relational database for ledger is Monzo [1] - but they still use Cassandra's transactions. [1] https://www.scaleyourapp.com/an-insight-into-the-backend-infrastructure-of-a-modern-digital-bank-monzo-architecture/ https://www.scaleyourapp.com/an-insight-into-the-backend-inf...
- lmm 5y ago> Hint: how do you think this attempt is recorded and fulfilled? Or, do you think "it's just appended" and bank recalculates your balance from scratch every time you spend 1$ on coke can? That's how the bank I worked with did it. Of course there was caching in place so we didn't actually recompute everything every time, but the implementation of that was a lot closer to "commit a kafka offset" than an RDBMS-style transaction. (E.g. we didn't overwrite the "current balance" in-place, we appended a new "current balance as of time x").
- LgWoodenBadger 5y agoThis is missing the whole point of Kafka consumers, which is to consume data from a topic and do something with it. One of those things being “store it in a relational model” or “write a sum to a key value store” or something else. This ability comes for free with Kafka, but is very not-free when using a relational model.
- dmitriid 5y ago> This is missing the whole point of Kafka consumers It's not missing that because it doesn't even address that. I'm answering a specific point.
- robertlagrant 5y agoThey were answering this statement: > Relational database seem to be a crazily overengineered solution in search of a problem Why would an answer to that need to mention Kafka consumers?
- LgWoodenBadger 5y ago* When all you need is an unbounded stream of data that you need to traverse in order to do all these things.* This is the part I was responding to.
- robertlagrant 5y agoYou're talking about "putting a snapshot of the data somewhere" - the person you're replying to is replying to someone who says this sort of snapshot is pointless.
- 2-718-281-828 5y agoyou can efficiently do someting with kafka that is equivalent to maintaining relational tables and joining them? seriously?