I may be wrong, but isn’t the correct pattern for this to use two data centres? You write to one data centre, replicate to the other and read from that one. Or am misunderstanding ?
Andy [University of Dundee shield logo]<http://uod.ac.uk/sig-home> Andy Cobley Senior Lecturer, Program Director Data Science and Data Engineering MSc School of Science and Engineering, University of Dundee +44 (0)1382 385078 (Not at present) | a.e.cob...@dundee.ac.uk<mailto:a.e.cob...@dundee.ac.uk> [University of Dundee Facebook]<http://uod.ac.uk/sig-fb> [University of Dundee Twitter] <http://uod.ac.uk/sig-tw> [University of Dundee LinkedIn] <http://uod.ac.uk/sig-li> [University of Dundee YouTube] <http://uod.ac.uk/sig-yt> [University of Dundee Instagram] <http://uod.ac.uk/sig-ig> [University of Dundee Snapchat] <http://uod.ac.uk/sig-sc> One of the UK's top 20 universities<http://uod.ac.uk/sig-strapline> The Guardian University Guide 2021 [Covid code of conduct icons]<http://uod.ac.uk/sig-cvc> From: Benjamin Lerer <benjamin.le...@datastax.com> Date: Tuesday, 15 December 2020 at 11:50 To: dev@cassandra.apache.org <dev@cassandra.apache.org> Subject: Re: Triggers Hi Greg, Things are more tricky in an eventually consistent distributed system than they are in a relational database. Even if the C* triggers were perfect (and they are not) and your write and read tables were exactly the same, there is no guarantee that all the updates created by the trigger from the original mutations will be successfully delivered to your other table and there are no entropy mechanisms to repair those problems. Overtime the data in your write and read tables will just start to diverge. On Mon, Dec 14, 2020 at 2:02 PM Greg Oliver <gol...@microsoft.com.invalid> wrote: > Hi all, > > My customer wants to use Cassandra together with the CQRS pattern. This is > to say, they want to separate reads and writes to different tables, > potentially in different keyspace or database. > > In my experience with relational databases I would set up a trigger on the > "write" table such that on new row & update row events, a similar row would > be inserted into the "read" table. > > I found a few examples of setting up a trigger on a Cassandra table and > have replicated that on my system. But in reading the various Stack > Overflow posts on the topic a persistent message saying "don't do it unless > you really know what you're doing" pops up. > > Why? What are the cases for and against using triggers in Cassandra? What > are the edge cases to avoid? What is the happy path? > > Thanks, > Greg > The University of Dundee is a registered Scottish Charity, No: SC015096