|
|
|
|
|
by jacques_chester
2025 days ago
|
|
The CAP theorem line was smart-arsery. The thing here is that the database can update the cart and the inventory in one logical step, to the exclusion of others. The Kafka approach doesn't guarantee that out of the box, leading to the creation of de facto locking protocols (write cart intent, read cart intent, write inventory intent ...). A traditional database does that for you with selectable levels of guarantees. |
|
Like for a hypothetical ticket selling platform you just get a log like
So although there's "locking" going on here enforced by the consumer sending the confirms the producer just sends intents/events and sees whether they're successful or not and both producer and consumer are stateless.I guess it just depends on which model you think is more a PITA to work with.