3 ms·
From a theoretical point of view both models are pretty much equivalent. Either way you need to pick somewhere to accept transactions as the ground truth / roo
by josephg 10y ago
From a theoretical point of view both models are pretty much equivalent.
Either way you need to pick somewhere to accept transactions as the ground truth / root store. That root store is the arbiter of which transactions get accepted and which are rejected due to conflicts. (With Kafka you can figure this out through the event stream's order).
With Samza the root store is Kafka, and with CDC its your database.
Its obviously easy to scale everything "downstream" of your root source of truth because everything there can easily be redeployed and trivially scaled for redundancy. But your root store needs to worry about partition tolerance. That said, PostgresQL and Kafka probably scale fine for the needs of 99% of users.
You can do queries either way. Using CDC you can run normal queries directly from your database, or another database downstream if you want to distribute the load. Using Samza you can run a query from any of your views.