You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cassandra.apache.org by Greg Oliver <go...@microsoft.com.INVALID> on 2020/12/15 13:24:20 UTC

RE: [EXTERNAL] Re: Triggers

Why not batches: I thought that it might be best that read and write models are in different keyspace for perf reasons? As I understand, a batch cannot span keyspaces.

I've been querying around to see if I can find a "reference implementation" of cqrs using Cassandra to see how people recommend manifesting the query model(s). No luck so far.

Why trigger? Because according to the docs, a trigger runs atomically with the original write. 

But - as Benjamin Lerer says below - triggers don't work as expected? Still would like to know the right ways and wrong ways to use triggers. Need a blog on the topic!

Is materialized view the best way? Can it be in a different keyspace? I doubt it - testing.

I originally posted in Cassandra-dev because I'm writing Java code to implement the trigger. Didn't know that "dev" means working on Cassandra itself. Sorry about that. I'll move the conversation to user@

Thanks very much all for your contributions. 


-----Original Message-----
From: Stefan Miklosovic <st...@instaclustr.com> 
Sent: Tuesday, December 15, 2020 12:59 PM
To: dev@cassandra.apache.org
Subject: [EXTERNAL] Re: Triggers

Hi,

why can't this be achieved by batches? Do I miss something fundamental here? Batches may write to different tables right ... I am just missing the point of using triggers for this.

I add specifics to Brian's first paragraph, this is covered by
CASSANDRA-13985 -
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fcassandra%2Fcommit%2F54de771e643e9cc64d1f5dd28b5de8a9a91a219e&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637436339671292733%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=pdsbvfRORRGz23mqPOUwSl%2Bn6NUdp%2BH3qM2WX%2FCWz0k%3D&amp;reserved=0
This will be firstly introduced in 4.0.

Stefan

On Tue, 15 Dec 2020 at 13:49, Brian Hess <br...@gmail.com> wrote:
>
> One challenge to be aware of is that when you use multiple data centers, the users can make changes in either data center and those changes will propagate to the other data center. That is, there is no concept of a “read-only data center” in Cassandra. That may be fine, but some organizations want to grant access to the data for analytics but don’t want those teams to be able to modify the original data. You can, in some cases, restrict the write access through user/role permissions (the analytics team only has read access to that table), but that may not work depending on your use case (but it usually does work).
>
> One comment from Benjamin’s comment below. There is one scenario where the Trigger could guarantee the data makes it to both tables, specifically if both tables reside in the same keyspace and have the same partition key(s). Mutations in the same keyspace on tables that have the same partition key are internally to Cassandra merged into a single internal Mutation and always applied atomically. So, if you had an exactly same schema for your second table and it resides in the same keyspace (mytable and mytable_analytics, say, both in mykeyspace) your trigger could duplicate the mutation to the source table to be an exact copy into the second table and Cassandra will apply these both atomically (they both succeed or they both fail - never just one). In this scenario, the analytics team could modify data in the second table and not effect the data in the source table.
>
> ---->Brian
>
> > On Dec 15, 2020, at 7:38 AM, pauloricardomg <pa...@gmail.com> wrote:
> >
> > To extend Paul's point, datacenters in cassandra are logical 
> > concepts which may be useful for your use case and do not 
> > necessarily need to be represented by physical data centers.
> >
> > The presentation mentioned by Andrew, while helpful, covers some 
> > concepts which are specific to Hadoop and may be outdated in more 
> > recent versions of Cassandra.
> >
> > I'd recommend two more recent presentations on the multi-DC topic:
> > -
> > https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fww
> > w.slideshare.net%2FDataStax%2Fapache-cassandra-multidatacenter-essen
> > tials-julien-anguenot-iland-internet-solutions-c-summit-2016&amp;dat
> > a=04%7C01%7Cgolive%40microsoft.com%7C9de8a9d3369f4934c45508d8a0f93cf
> > 6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637436339671302694%7C
> > Unknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik
> > 1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=AtpoZGyBAOGYrSwHGtC8D7UySR4bxP
> > 4pIPwkWB3vytU%3D&amp;reserved=0
> > -
> > https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fww
> > w.slideshare.net%2FDataStax%2Foperations-consistency-failover-for-mu
> > ltidc-clusters-alexander-dejanovski-the-last-pickle-cassandra-summit
> > -2016&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9d3369f4934c4
> > 5508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C63743633
> > 9671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luM
> > zIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=3a5jlc%2BMv6IckwJ
> > CEDLMzurkICg829go%2BTU52HNPiX8%3D&amp;reserved=0
> >
> > Finally, if you have any more questions on this I'd recommend you 
> > send them to the user@cassandra.apache.org mailing list as this 
> > mailing list (
> > dev@cassandra.apache.org) is related to the project development of 
> > Cassandra.
> >
> >> Em ter., 15 de dez. de 2020 às 09:28, Greg Oliver 
> >> <go...@microsoft.com.invalid> escreveu:
> >>
> >> Can't see it in the email. What's the slide #?
> >>
> >> From: Andrew Cobley (Staff) <a....@dundee.ac.uk>
> >> Sent: Tuesday, December 15, 2020 12:26 PM
> >> To: dev@cassandra.apache.org
> >> Subject: [EXTERNAL] Re: Triggers
> >>
> >> Yes that's right.  I remember this illustration:
> >>
> >> [Diagram  Description automatically generated]
> >>
> >>
> >> From this presentation:
> >>
> >> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fw
> >> ww.slideshare.net%2Frastrick%2Fpresentation-12982302&amp;data=04%7C
> >> 01%7Cgolive%40microsoft.com%7C9de8a9d3369f4934c45508d8a0f93cf6%7C72
> >> f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637436339671302694%7CUnkno
> >> wn%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haW
> >> wiLCJXVCI6Mn0%3D%7C1000&amp;sdata=vINBSIM5G2WYkF0RpvYvGadBJ5b8LCigK
> >> EZsH7s2Ra0%3D&amp;reserved=0<
> >> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fw
> >> ww.slideshare.net%2Frastrick%2Fpresentation-12982302&amp;data=04%7C
> >> 01%7Cgolive%40microsoft.com%7C9de8a9d3369f4934c45508d8a0f93cf6%7C72
> >> f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637436339671302694%7CUnkno
> >> wn%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haW
> >> wiLCJXVCI6Mn0%3D%7C1000&amp;sdata=vINBSIM5G2WYkF0RpvYvGadBJ5b8LCigK
> >> EZsH7s2Ra0%3D&amp;reserved=0
> >>>
> >>
> >> Might help.
> >>
> >> Andy
> >>
> >> [University of Dundee shield logo]<
> >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> >> d.ac.uk%2Fsig-home&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> >> a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> >> %7C0%7C637436339671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> >> DAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> >> UCsPPZsn00NOQbZtCQQemL8%2BUKrcjR%2BkYbletbFAUTU%3D&amp;reserved=0
> >>>
> >>
> >>
> >> 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.cobley@dundee.ac.uk<mailto:
> >> a.e.cobley@dundee.ac.uk>
> >> [University of Dundee Facebook]<
> >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> >> d.ac.uk%2Fsig-fb&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> >> C0%7C637436339671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=op
> >> oI%2Fy8MQGUoZUf4JLNSwO0AXvo%2BSPgmlCrMDYqxfVA%3D&amp;reserved=0>
> >> [University of Dundee Twitter] <
> >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> >> d.ac.uk%2Fsig-tw&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> >> C0%7C637436339671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Pf
> >> UixxwmmdsvAAgIOtFAmvCWBAuyZHHxaDF7a7EI0J8%3D&amp;reserved=0>
> >> [University of Dundee LinkedIn] <
> >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> >> d.ac.uk%2Fsig-li&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> >> C0%7C637436339671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=4p
> >> kmZtJbfmOhYEUqHVHuNqJ82sKffi55UlNoqRM9iYU%3D&amp;reserved=0>
> >> [University of Dundee YouTube] <
> >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> >> d.ac.uk%2Fsig-yt&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> >> C0%7C637436339671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=b6
> >> WDU5BQ2MPxdUXMV7svX7GwwoA2o9dxVTaH30SUlWw%3D&amp;reserved=0>
> >> [University of Dundee Instagram] <
> >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> >> d.ac.uk%2Fsig-ig&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> >> C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=xO
> >> 3aYY76pRSXudHj0fMwreYc9WE%2BL9WvFUVSOpT3Xr0%3D&amp;reserved=0>
> >> [University of Dundee Snapchat] <
> >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> >> d.ac.uk%2Fsig-sc&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> >> C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=fM
> >> BdqlVnUrZ8LY8KTe4RfmkWT%2BQqFQ0hkbNN%2F0Cz0s8%3D&amp;reserved=0
> >>>
> >> One of the UK's top 20 universities<
> >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> >> d.ac.uk%2Fsig-strapline&amp;data=04%7C01%7Cgolive%40microsoft.com%7
> >> C9de8a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db4
> >> 7%7C1%7C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4w
> >> LjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;s
> >> data=%2Fm6vL%2FpEWhutdwcVmEksANunJ71ufHH7BSMleW6vxpM%3D&amp;reserve
> >> d=0
> >>>
> >> The Guardian University Guide 2021
> >> [Covid code of conduct icons]<
> >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> >> d.ac.uk%2Fsig-cvc&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a
> >> 9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%
> >> 7C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMD
> >> AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=u
> >> gYXppAj6idOsHR38kfycILz4TzzUTX3ncPqXIr9HEQ%3D&amp;reserved=0
> >>>
> >>
> >>
> >> From: Paul Chandler <pa...@redshots.com>>
> >> Date: Tuesday, 15 December 2020 at 12:16
> >> To: dev@cassandra.apache.org<ma...@cassandra.apache.org> < 
> >> dev@cassandra.apache.org<ma...@cassandra.apache.org>>
> >> Subject: Re: Triggers
> >> Hi Greg,
> >>
> >> Andy is talking about Cassandra datacenters, which can easily be co 
> >> located in the same physical datacenter.
> >>
> >> Paul
> >>
> >>> On 15 Dec 2020, at 12:10, Greg Oliver 
> >>> <golive@microsoft.com.INVALID
> >> <ma...@microsoft.com.INVALID>> wrote:
> >>>
> >>> That's great in theory, but what if your customer is a national
> >> government (they require their data to remain within their borders) 
> >> and there aren't enough DC's in nation to support multiple DC data distribution?
> >>>
> >>> To get the throughput needed (say - if the government announces a 
> >>> new
> >> program and 30M people try to sign up at the same time) CQRS seems 
> >> a likely part of the solution.
> >>>
> >>> With Cassandra (and I'm definitely new to it), as I learn more it 
> >>> looks
> >> like a set of materialized views might be a way to achieve the goal.
> >>>
> >>> Thoughts?
> >>>
> >>> From: Andrew Cobley (Staff) <a.e.cobley@dundee.ac.uk<mailto:
> >> a.e.cobley@dundee.ac.uk>>
> >>> Sent: Tuesday, December 15, 2020 11:57 AM
> >>> To: dev@cassandra.apache.org<ma...@cassandra.apache.org>
> >>> Subject: [EXTERNAL] Re: Triggers
> >>>
> >>> 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]<
> >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> >> d.ac.uk%2Fsig-home&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> >> a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> >> %7C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> >> DAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> >> cemMScOW969CviEM%2F8FOddPPREJKdxP5SGIsJEHjAr4%3D&amp;reserved=0
> >> <
> >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> >> d.ac.uk%2Fsig-home&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> >> a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> >> %7C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> >> DAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> >> cemMScOW969CviEM%2F8FOddPPREJKdxP5SGIsJEHjAr4%3D&amp;reserved=0
> >>>>
> >>>
> >>>
> >>> 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.cobley@dundee.ac.uk<mailto:
> >> a.e.cobley@dundee.ac.uk<mailto:a.e.cobley@dundee.ac.uk%
> >> 3cmailto:a.e.cobley@dundee.ac.uk>>
> >>> [University of Dundee Facebook]<
> >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> >> d.ac.uk%2Fsig-fb&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> >> C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=my
> >> 43KF0x8a7Cfw1Mxw89vgzev2V4IE77unYI63GN5%2FM%3D&amp;reserved=0
> >> <
> >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> >> d.ac.uk%2Fsig-fb&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> >> C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=my
> >> 43KF0x8a7Cfw1Mxw89vgzev2V4IE77unYI63GN5%2FM%3D&amp;reserved=0>>
> >> [University of Dundee Twitter] <
> >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> >> d.ac.uk%2Fsig-tw&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> >> C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=hS
> >> 23WW9TkmlvBaHTDLjhRD%2FfIxMfPnBaemqI6g69i1s%3D&amp;reserved=0
> >> <
> >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> >> d.ac.uk%2Fsig-tw&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=mu
> >> RPgCkCk9F9BNnTAaZGMFihOoV6Jp9ao9hyOftVhBI%3D&amp;reserved=0>>
> >> [University of Dundee LinkedIn] <
> >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> >> d.ac.uk%2Fsig-li&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=g7
> >> qWH7kEBgcFAFuOxxnplwbk2EOQoq1bkpL3Y04FJe4%3D&amp;reserved=0
> >> <
> >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> >> d.ac.uk%2Fsig-li&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=g7
> >> qWH7kEBgcFAFuOxxnplwbk2EOQoq1bkpL3Y04FJe4%3D&amp;reserved=0>>
> >> [University of Dundee YouTube] <
> >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> >> d.ac.uk%2Fsig-yt&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=vh
> >> MK%2BRhhGpltjgJE6qsmn4sdyuKPqbiBLfpKOMryQ3o%3D&amp;reserved=0
> >> <
> >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> >> d.ac.uk%2Fsig-yt&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=vh
> >> MK%2BRhhGpltjgJE6qsmn4sdyuKPqbiBLfpKOMryQ3o%3D&amp;reserved=0>>
> >> [University of Dundee Instagram] <
> >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> >> d.ac.uk%2Fsig-ig&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Jq
> >> J0aOaMVjlOIHozWuZG0tjC2GX%2BMbC%2Fon2ZSduahEQ%3D&amp;reserved=0
> >> <
> >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> >> d.ac.uk%2Fsig-ig&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Jq
> >> J0aOaMVjlOIHozWuZG0tjC2GX%2BMbC%2Fon2ZSduahEQ%3D&amp;reserved=0>>
> >> [University of Dundee Snapchat] <
> >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> >> d.ac.uk%2Fsig-sc&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=rw
> >> i61R76R0b6rciwyDC7xzZDZy3GJDkTET%2BC5Em1KcI%3D&amp;reserved=0
> >> <
> >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> >> d.ac.uk%2Fsig-sc&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> >> C0%7C637436339671332559%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=WV
> >> 2DT5Kwq3VEiw8IMZBlzJ0TNFXnV%2F%2F1puvkaacCjH8%3D&amp;reserved=0
> >>>>
> >>> One of the UK's top 20 universities<
> >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> >> d.ac.uk%2Fsig-strapline&amp;data=04%7C01%7Cgolive%40microsoft.com%7
> >> C9de8a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db4
> >> 7%7C1%7C0%7C637436339671332559%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4w
> >> LjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;s
> >> data=J8FCwXqHWyAUzE4fLi1QHAg01nD9amvfAF5IhrYtggc%3D&amp;reserved=0
> >> <
> >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> >> d.ac.uk%2Fsig-strapline&amp;data=04%7C01%7Cgolive%40microsoft.com%7
> >> C9de8a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db4
> >> 7%7C1%7C0%7C637436339671332559%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4w
> >> LjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;s
> >> data=J8FCwXqHWyAUzE4fLi1QHAg01nD9amvfAF5IhrYtggc%3D&amp;reserved=0
> >>>>
> >>> The Guardian University Guide 2021 [Covid code of conduct icons]<
> >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> >> d.ac.uk%2Fsig-cvc&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a
> >> 9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%
> >> 7C0%7C637436339671332559%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMD
> >> AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=X
> >> 8YSo1DfxxYxAmz%2BHGrEPM9ymBKSYLthhK4ZWCUr8Ss%3D&amp;reserved=0
> >> <
> >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> >> d.ac.uk%2Fsig-cvc&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a
> >> 9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%
> >> 7C0%7C637436339671332559%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMD
> >> AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=X
> >> 8YSo1DfxxYxAmz%2BHGrEPM9ymBKSYLthhK4ZWCUr8Ss%3D&amp;reserved=0
> >>>>
> >>>
> >>>
> >>> From: Benjamin Lerer <benjamin.lerer@datastax.com<mailto:
> >> benjamin.lerer@datastax.com<mailto:benjamin.lerer@datastax.com%
> >> 3cmailto:benjamin.lerer@datastax.com>>>
> >>> Date: Tuesday, 15 December 2020 at 11:50
> >>> To: dev@cassandra.apache.org<mailto:dev@cassandra.apache.org<mailto:
> >> dev@cassandra.apache.org%3cmailto:dev@cassandra.apache.org>> <
> >> dev@cassandra.apache.org<mailto:dev@cassandra.apache.org<mailto:
> >> dev@cassandra.apache.org%3cmailto: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 
> >>> <golive@microsoft.com.invalid
> >> <mailto:golive@microsoft.com.invalid<mailto:golive@microsoft.com.in
> >> valid% 3cmailto:golive@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
> >>
> >>
> >> -------------------------------------------------------------------
> >> -- To unsubscribe, e-mail: 
> >> dev-unsubscribe@cassandra.apache.org<mailto:
> >> dev-unsubscribe@cassandra.apache.org>
> >> For additional commands, e-mail: dev-help@cassandra.apache.org<mailto:
> >> dev-help@cassandra.apache.org>
> >>
> >> The University of Dundee is a registered Scottish Charity, No: 
> >> SC015096
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@cassandra.apache.org
> For additional commands, e-mail: dev-help@cassandra.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cassandra.apache.org
For additional commands, e-mail: dev-help@cassandra.apache.org


Re: [EXTERNAL] Re: Triggers

Posted by Stefan Miklosovic <st...@instaclustr.com>.
I checked and cassandra channel was created by zznate at apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cassandra.apache.org
For additional commands, e-mail: dev-help@cassandra.apache.org


RE: [EXTERNAL] Re: Triggers

Posted by Greg Oliver <go...@microsoft.com.INVALID>.
Great idea. Tried that.

Don’t have an @apache.org email address?
Contact the workspace administrator at ASF for an invitation.

But there's no link to contact said admin. 

-----Original Message-----
From: Stefan Miklosovic <st...@instaclustr.com> 
Sent: Tuesday, December 15, 2020 1:58 PM
To: dev@cassandra.apache.org
Subject: Re: [EXTERNAL] Re: Triggers

Fair enough, do not hesitate to join us on Slack if you have questions, I bet there are a lot of people willing to gladly answer your questions and concerns about Cassandra and how it differs from your relational world. Nothing bad about a mailing list as such if you prefer it that way, I am just pointing out other channels where one might get answers in a little bit faster manner and target a wider audience.

Stefan

On Tue, 15 Dec 2020 at 14:45, Greg Oliver <go...@microsoft.com.invalid> wrote:
>
> @Stefan - I'm just exposing my lack of experience with Cassandra and how one goes about improving perf. In my world (relational), perf can be improved by spreading queries out to different databases. I saw a presentation where a Cassandra keyspace was said to be roughly equivalent to a relational database.
>
> -----Original Message-----
> From: Stefan Miklosovic <st...@instaclustr.com>
> Sent: Tuesday, December 15, 2020 1:38 PM
> To: dev@cassandra.apache.org
> Subject: Re: [EXTERNAL] Re: Triggers
>
> On Tue, 15 Dec 2020 at 14:24, Greg Oliver <go...@microsoft.com.invalid> wrote:
> >
> > Why not batches: I thought that it might be best that read and write models are in different keyspace for perf reasons? As I understand, a batch cannot span keyspaces.
>
> What performance reasons? Do you mean that you want to write into one 
> keyspace but read it from the second one because of performance, or 
> something similar? Once you set up your two DCs, to be e.g. on NTS and
> 3:3 RF and CL for write is QUORUM or what have you, in order to be faster in reads you might relax CL to something less demanding, LOCAL_QUOURUM, ONE, TWO, THREE ... you got the idea. I am just struggling to see how the fact that you would have multiple keyspaces suddenly enable different queries to be faster.
>
> > I've been querying around to see if I can find a "reference implementation" of cqrs using Cassandra to see how people recommend manifesting the query model(s). No luck so far.
> >
> > Why trigger? Because according to the docs, a trigger runs atomically with the original write.
> >
> > But - as Benjamin Lerer says below - triggers don't work as expected? Still would like to know the right ways and wrong ways to use triggers. Need a blog on the topic!
> >
> > Is materialized view the best way? Can it be in a different keyspace? I doubt it - testing.
> >
> > I originally posted in Cassandra-dev because I'm writing Java code 
> > to implement the trigger. Didn't know that "dev" means working on 
> > Cassandra itself. Sorry about that. I'll move the conversation to 
> > user@
> >
> > Thanks very much all for your contributions.
> >
> >
> > -----Original Message-----
> > From: Stefan Miklosovic <st...@instaclustr.com>
> > Sent: Tuesday, December 15, 2020 12:59 PM
> > To: dev@cassandra.apache.org
> > Subject: [EXTERNAL] Re: Triggers
> >
> > Hi,
> >
> > why can't this be achieved by batches? Do I miss something fundamental here? Batches may write to different tables right ... I am just missing the point of using triggers for this.
> >
> > I add specifics to Brian's first paragraph, this is covered by
> > CASSANDRA-13985 -
> > https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgi
> > th 
> > ub.com%2Fapache%2Fcassandra%2Fcommit%2F54de771e643e9cc64d1f5dd28b5de
> > 8a
> > 9a91a219e&amp;data=04%7C01%7Cgolive%40microsoft.com%7C951b7400167847
> > 62
> > bcfd08d8a0fec1cf%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637436
> > 36 
> > 3338858671%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luM
> > zI 
> > iLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=WkQo44dXPFH4BdqJjbw
> > jM
> > 7mfq0fWE6Ivd70HMOuqnDo%3D&amp;reserved=0
> > This will be firstly introduced in 4.0.
> >
> > Stefan
> >
> > On Tue, 15 Dec 2020 at 13:49, Brian Hess <br...@gmail.com> wrote:
> > >
> > > One challenge to be aware of is that when you use multiple data centers, the users can make changes in either data center and those changes will propagate to the other data center. That is, there is no concept of a “read-only data center” in Cassandra. That may be fine, but some organizations want to grant access to the data for analytics but don’t want those teams to be able to modify the original data. You can, in some cases, restrict the write access through user/role permissions (the analytics team only has read access to that table), but that may not work depending on your use case (but it usually does work).
> > >
> > > One comment from Benjamin’s comment below. There is one scenario where the Trigger could guarantee the data makes it to both tables, specifically if both tables reside in the same keyspace and have the same partition key(s). Mutations in the same keyspace on tables that have the same partition key are internally to Cassandra merged into a single internal Mutation and always applied atomically. So, if you had an exactly same schema for your second table and it resides in the same keyspace (mytable and mytable_analytics, say, both in mykeyspace) your trigger could duplicate the mutation to the source table to be an exact copy into the second table and Cassandra will apply these both atomically (they both succeed or they both fail - never just one). In this scenario, the analytics team could modify data in the second table and not effect the data in the source table.
> > >
> > > ---->Brian
> > >
> > > > On Dec 15, 2020, at 7:38 AM, pauloricardomg <pa...@gmail.com> wrote:
> > > >
> > > > To extend Paul's point, datacenters in cassandra are logical 
> > > > concepts which may be useful for your use case and do not 
> > > > necessarily need to be represented by physical data centers.
> > > >
> > > > The presentation mentioned by Andrew, while helpful, covers some 
> > > > concepts which are specific to Hadoop and may be outdated in 
> > > > more recent versions of Cassandra.
> > > >
> > > > I'd recommend two more recent presentations on the multi-DC topic:
> > > > -
> > > > https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%
> > > > 2F
> > > > ww
> > > > w.slideshare.net%2FDataStax%2Fapache-cassandra-multidatacenter-e
> > > > ss
> > > > en
> > > > tials-julien-anguenot-iland-internet-solutions-c-summit-2016&amp
> > > > ;d
> > > > at
> > > > a=04%7C01%7Cgolive%40microsoft.com%7C9de8a9d3369f4934c45508d8a0f
> > > > 93
> > > > cf
> > > > 6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C63743633967130269
> > > > 4%
> > > > 7C
> > > > Unknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTi
> > > > I6
> > > > Ik
> > > > 1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=AtpoZGyBAOGYrSwHGtC8D7UySR
> > > > 4b
> > > > xP
> > > > 4pIPwkWB3vytU%3D&amp;reserved=0
> > > > -
> > > > https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%
> > > > 2F
> > > > ww
> > > > w.slideshare.net%2FDataStax%2Foperations-consistency-failover-fo
> > > > r-
> > > > mu
> > > > ltidc-clusters-alexander-dejanovski-the-last-pickle-cassandra-su
> > > > mm
> > > > it
> > > > -2016&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9d3369f49
> > > > 34
> > > > c4
> > > > 5508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C6374
> > > > 36
> > > > 33
> > > > 9671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV
> > > > 2l
> > > > uM
> > > > zIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=3a5jlc%2BMv6I
> > > > ck
> > > > wJ
> > > > CEDLMzurkICg829go%2BTU52HNPiX8%3D&amp;reserved=0
> > > >
> > > > Finally, if you have any more questions on this I'd recommend 
> > > > you send them to the user@cassandra.apache.org mailing list as 
> > > > this mailing list (
> > > > dev@cassandra.apache.org) is related to the project development 
> > > > of Cassandra.
> > > >
> > > >> Em ter., 15 de dez. de 2020 às 09:28, Greg Oliver 
> > > >> <go...@microsoft.com.invalid> escreveu:
> > > >>
> > > >> Can't see it in the email. What's the slide #?
> > > >>
> > > >> From: Andrew Cobley (Staff) <a....@dundee.ac.uk>
> > > >> Sent: Tuesday, December 15, 2020 12:26 PM
> > > >> To: dev@cassandra.apache.org
> > > >> Subject: [EXTERNAL] Re: Triggers
> > > >>
> > > >> Yes that's right.  I remember this illustration:
> > > >>
> > > >> [Diagram  Description automatically generated]
> > > >>
> > > >>
> > > >> From this presentation:
> > > >>
> > > >> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F
> > > >> %252
> > > >> Fw
> > > >> ww.slideshare.net%2Frastrick%2Fpresentation-12982302&amp;data=0
> > > >> 4%
> > > >> 7C
> > > >> 01%7Cgolive%40microsoft.com%7C9de8a9d3369f4934c45508d8a0f93cf6%
> > > >> 7C
> > > >> 72
> > > >> f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637436339671302694%7CU
> > > >> nk
> > > >> no
> > > >> wn%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik
> > > >> 1h
> > > >> aW
> > > >> wiLCJXVCI6Mn0%3D%7C1000&amp;sdata=vINBSIM5G2WYkF0RpvYvGadBJ5b8L
> > > >> Ci
> > > >> gK
> > > >> EZsH7s2Ra0%3D&amp;reserved=0<
> > > >> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F
> > > >> %252
> > > >> Fw
> > > >> ww.slideshare.net%2Frastrick%2Fpresentation-12982302&amp;data=0
> > > >> 4%
> > > >> 7C
> > > >> 01%7Cgolive%40microsoft.com%7C9de8a9d3369f4934c45508d8a0f93cf6%
> > > >> 7C
> > > >> 72
> > > >> f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637436339671302694%7CU
> > > >> nk
> > > >> no
> > > >> wn%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik
> > > >> 1h
> > > >> aW
> > > >> wiLCJXVCI6Mn0%3D%7C1000&amp;sdata=vINBSIM5G2WYkF0RpvYvGadBJ5b8L
> > > >> Ci
> > > >> gK
> > > >> EZsH7s2Ra0%3D&amp;reserved=0
> > > >>>
> > > >>
> > > >> Might help.
> > > >>
> > > >> Andy
> > > >>
> > > >> [University of Dundee shield logo]< 
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%
> > > >> 2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-home&amp;data=04%7C01%7Cgolive%40microsoft.com%7C
> > > >> 9d
> > > >> e8
> > > >> a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47
> > > >> %7
> > > >> C1
> > > >> %7C0%7C637436339671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wL
> > > >> jA
> > > >> wM
> > > >> DAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sd
> > > >> at
> > > >> a=
> > > >> UCsPPZsn00NOQbZtCQQemL8%2BUKrcjR%2BkYbletbFAUTU%3D&amp;reserved
> > > >> =0
> > > >>>
> > > >>
> > > >>
> > > >> 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.cobley@dundee.ac.uk<mailto:
> > > >> a.e.cobley@dundee.ac.uk>
> > > >> [University of Dundee Facebook]< 
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%
> > > >> 2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-fb&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9d
> > > >> e8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7
> > > >> C1
> > > >> %7
> > > >> C0%7C637436339671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA
> > > >> wM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdat
> > > >> a=
> > > >> op
> > > >> oI%2Fy8MQGUoZUf4JLNSwO0AXvo%2BSPgmlCrMDYqxfVA%3D&amp;reserved=0
> > > >> > [University of Dundee Twitter] < 
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%
> > > >> 2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-tw&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9d
> > > >> e8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7
> > > >> C1
> > > >> %7
> > > >> C0%7C637436339671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA
> > > >> wM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdat
> > > >> a= Pf 
> > > >> UixxwmmdsvAAgIOtFAmvCWBAuyZHHxaDF7a7EI0J8%3D&amp;reserved=0>
> > > >> [University of Dundee LinkedIn] < 
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%
> > > >> 2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-li&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9d
> > > >> e8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7
> > > >> C1
> > > >> %7
> > > >> C0%7C637436339671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA
> > > >> wM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdat
> > > >> a= 4p 
> > > >> kmZtJbfmOhYEUqHVHuNqJ82sKffi55UlNoqRM9iYU%3D&amp;reserved=0>
> > > >> [University of Dundee YouTube] < 
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%
> > > >> 2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-yt&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9d
> > > >> e8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7
> > > >> C1
> > > >> %7
> > > >> C0%7C637436339671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA
> > > >> wM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdat
> > > >> a=
> > > >> b6 WDU5BQ2MPxdUXMV7svX7GwwoA2o9dxVTaH30SUlWw%3D&amp;reserved=0>
> > > >> [University of Dundee Instagram] < 
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%
> > > >> 2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-ig&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9d
> > > >> e8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7
> > > >> C1
> > > >> %7
> > > >> C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA
> > > >> wM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdat
> > > >> a= xO 
> > > >> 3aYY76pRSXudHj0fMwreYc9WE%2BL9WvFUVSOpT3Xr0%3D&amp;reserved=0>
> > > >> [University of Dundee Snapchat] < 
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%
> > > >> 2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-sc&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9d
> > > >> e8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7
> > > >> C1
> > > >> %7
> > > >> C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA
> > > >> wM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdat
> > > >> a=
> > > >> fM
> > > >> BdqlVnUrZ8LY8KTe4RfmkWT%2BQqFQ0hkbNN%2F0Cz0s8%3D&amp;reserved=0
> > > >>>
> > > >> One of the UK's top 20 universities< 
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%
> > > >> 2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-strapline&amp;data=04%7C01%7Cgolive%40microsoft.c
> > > >> om
> > > >> %7
> > > >> C9de8a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd01
> > > >> 1d
> > > >> b4
> > > >> 7%7C1%7C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoi
> > > >> MC
> > > >> 4w
> > > >> LjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&a
> > > >> mp
> > > >> ;s
> > > >> data=%2Fm6vL%2FpEWhutdwcVmEksANunJ71ufHH7BSMleW6vxpM%3D&amp;res
> > > >> er
> > > >> ve
> > > >> d=0
> > > >>>
> > > >> The Guardian University Guide 2021 [Covid code of conduct 
> > > >> icons]< 
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%
> > > >> 2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-cvc&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9
> > > >> de
> > > >> 8a
> > > >> 9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%
> > > >> 7C
> > > >> 1%
> > > >> 7C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLj
> > > >> Aw
> > > >> MD
> > > >> AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sda
> > > >> ta
> > > >> =u
> > > >> gYXppAj6idOsHR38kfycILz4TzzUTX3ncPqXIr9HEQ%3D&amp;reserved=0
> > > >>>
> > > >>
> > > >>
> > > >> From: Paul Chandler 
> > > >> <pa...@redshots.com>>
> > > >> Date: Tuesday, 15 December 2020 at 12:16
> > > >> To: dev@cassandra.apache.org<ma...@cassandra.apache.org> < 
> > > >> dev@cassandra.apache.org<ma...@cassandra.apache.org>>
> > > >> Subject: Re: Triggers
> > > >> Hi Greg,
> > > >>
> > > >> Andy is talking about Cassandra datacenters, which can easily 
> > > >> be co located in the same physical datacenter.
> > > >>
> > > >> Paul
> > > >>
> > > >>> On 15 Dec 2020, at 12:10, Greg Oliver 
> > > >>> <golive@microsoft.com.INVALID
> > > >> <ma...@microsoft.com.INVALID>> wrote:
> > > >>>
> > > >>> That's great in theory, but what if your customer is a 
> > > >>> national
> > > >> government (they require their data to remain within their
> > > >> borders) and there aren't enough DC's in nation to support multiple DC data distribution?
> > > >>>
> > > >>> To get the throughput needed (say - if the government 
> > > >>> announces a new
> > > >> program and 30M people try to sign up at the same time) CQRS 
> > > >> seems a likely part of the solution.
> > > >>>
> > > >>> With Cassandra (and I'm definitely new to it), as I learn more 
> > > >>> it looks
> > > >> like a set of materialized views might be a way to achieve the goal.
> > > >>>
> > > >>> Thoughts?
> > > >>>
> > > >>> From: Andrew Cobley (Staff) <a.e.cobley@dundee.ac.uk<mailto:
> > > >> a.e.cobley@dundee.ac.uk>>
> > > >>> Sent: Tuesday, December 15, 2020 11:57 AM
> > > >>> To: dev@cassandra.apache.org<ma...@cassandra.apache.org>
> > > >>> Subject: [EXTERNAL] Re: Triggers
> > > >>>
> > > >>> 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]<
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%
> > > >> 2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-home&amp;data=04%7C01%7Cgolive%40microsoft.com%7C
> > > >> 9d
> > > >> e8
> > > >> a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47
> > > >> %7
> > > >> C1
> > > >> %7C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wL
> > > >> jA
> > > >> wM
> > > >> DAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sd
> > > >> at
> > > >> a=
> > > >> cemMScOW969CviEM%2F8FOddPPREJKdxP5SGIsJEHjAr4%3D&amp;reserved=0
> > > >> <
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%
> > > >> 2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-home&amp;data=04%7C01%7Cgolive%40microsoft.com%7C
> > > >> 9d
> > > >> e8
> > > >> a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47
> > > >> %7
> > > >> C1
> > > >> %7C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wL
> > > >> jA
> > > >> wM
> > > >> DAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sd
> > > >> at
> > > >> a=
> > > >> cemMScOW969CviEM%2F8FOddPPREJKdxP5SGIsJEHjAr4%3D&amp;reserved=0
> > > >>>>
> > > >>>
> > > >>>
> > > >>> 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.cobley@dundee.ac.uk<mailto:
> > > >> a.e.cobley@dundee.ac.uk<mailto:a.e.cobley@dundee.ac.uk%
> > > >> 3cmailto:a.e.cobley@dundee.ac.uk>>
> > > >>> [University of Dundee Facebook]<
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%
> > > >> 2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-fb&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9d
> > > >> e8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7
> > > >> C1
> > > >> %7
> > > >> C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA
> > > >> wM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdat
> > > >> a=
> > > >> my
> > > >> 43KF0x8a7Cfw1Mxw89vgzev2V4IE77unYI63GN5%2FM%3D&amp;reserved=0
> > > >> <
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%
> > > >> 2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-fb&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9d
> > > >> e8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7
> > > >> C1
> > > >> %7
> > > >> C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA
> > > >> wM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdat
> > > >> a=
> > > >> my
> > > >> 43KF0x8a7Cfw1Mxw89vgzev2V4IE77unYI63GN5%2FM%3D&amp;reserved=0>>
> > > >> [University of Dundee Twitter] < 
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%
> > > >> 2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-tw&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9d
> > > >> e8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7
> > > >> C1
> > > >> %7
> > > >> C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA
> > > >> wM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdat
> > > >> a=
> > > >> hS
> > > >> 23WW9TkmlvBaHTDLjhRD%2FfIxMfPnBaemqI6g69i1s%3D&amp;reserved=0
> > > >> <
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%
> > > >> 2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-tw&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9d
> > > >> e8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7
> > > >> C1
> > > >> %7
> > > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA
> > > >> wM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdat
> > > >> a= mu 
> > > >> RPgCkCk9F9BNnTAaZGMFihOoV6Jp9ao9hyOftVhBI%3D&amp;reserved=0>>
> > > >> [University of Dundee LinkedIn] < 
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%
> > > >> 2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-li&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9d
> > > >> e8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7
> > > >> C1
> > > >> %7
> > > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA
> > > >> wM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdat
> > > >> a=
> > > >> g7
> > > >> qWH7kEBgcFAFuOxxnplwbk2EOQoq1bkpL3Y04FJe4%3D&amp;reserved=0
> > > >> <
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%
> > > >> 2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-li&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9d
> > > >> e8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7
> > > >> C1
> > > >> %7
> > > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA
> > > >> wM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdat
> > > >> a=
> > > >> g7 
> > > >> qWH7kEBgcFAFuOxxnplwbk2EOQoq1bkpL3Y04FJe4%3D&amp;reserved=0>>
> > > >> [University of Dundee YouTube] < 
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%
> > > >> 2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-yt&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9d
> > > >> e8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7
> > > >> C1
> > > >> %7
> > > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA
> > > >> wM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdat
> > > >> a=
> > > >> vh
> > > >> MK%2BRhhGpltjgJE6qsmn4sdyuKPqbiBLfpKOMryQ3o%3D&amp;reserved=0
> > > >> <
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%
> > > >> 2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-yt&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9d
> > > >> e8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7
> > > >> C1
> > > >> %7
> > > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA
> > > >> wM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdat
> > > >> a=
> > > >> vh
> > > >> MK%2BRhhGpltjgJE6qsmn4sdyuKPqbiBLfpKOMryQ3o%3D&amp;reserved=0>>
> > > >> [University of Dundee Instagram] < 
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%
> > > >> 2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-ig&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9d
> > > >> e8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7
> > > >> C1
> > > >> %7
> > > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA
> > > >> wM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdat
> > > >> a=
> > > >> Jq
> > > >> J0aOaMVjlOIHozWuZG0tjC2GX%2BMbC%2Fon2ZSduahEQ%3D&amp;reserved=0
> > > >> <
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%
> > > >> 2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-ig&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9d
> > > >> e8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7
> > > >> C1
> > > >> %7
> > > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA
> > > >> wM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdat
> > > >> a=
> > > >> Jq
> > > >> J0aOaMVjlOIHozWuZG0tjC2GX%2BMbC%2Fon2ZSduahEQ%3D&amp;reserved=0
> > > >> >> [University of Dundee Snapchat] < 
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%
> > > >> 2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-sc&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9d
> > > >> e8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7
> > > >> C1
> > > >> %7
> > > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA
> > > >> wM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdat
> > > >> a=
> > > >> rw
> > > >> i61R76R0b6rciwyDC7xzZDZy3GJDkTET%2BC5Em1KcI%3D&amp;reserved=0
> > > >> <
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%
> > > >> 2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-sc&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9d
> > > >> e8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7
> > > >> C1
> > > >> %7
> > > >> C0%7C637436339671332559%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA
> > > >> wM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdat
> > > >> a=
> > > >> WV
> > > >> 2DT5Kwq3VEiw8IMZBlzJ0TNFXnV%2F%2F1puvkaacCjH8%3D&amp;reserved=0
> > > >>>>
> > > >>> One of the UK's top 20 universities<
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%
> > > >> 2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-strapline&amp;data=04%7C01%7Cgolive%40microsoft.c
> > > >> om
> > > >> %7
> > > >> C9de8a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd01
> > > >> 1d
> > > >> b4
> > > >> 7%7C1%7C0%7C637436339671332559%7CUnknown%7CTWFpbGZsb3d8eyJWIjoi
> > > >> MC
> > > >> 4w
> > > >> LjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&a
> > > >> mp
> > > >> ;s
> > > >> data=J8FCwXqHWyAUzE4fLi1QHAg01nD9amvfAF5IhrYtggc%3D&amp;reserve
> > > >> d=
> > > >> 0
> > > >> <
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%
> > > >> 2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-strapline&amp;data=04%7C01%7Cgolive%40microsoft.c
> > > >> om
> > > >> %7
> > > >> C9de8a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd01
> > > >> 1d
> > > >> b4
> > > >> 7%7C1%7C0%7C637436339671332559%7CUnknown%7CTWFpbGZsb3d8eyJWIjoi
> > > >> MC
> > > >> 4w
> > > >> LjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&a
> > > >> mp
> > > >> ;s
> > > >> data=J8FCwXqHWyAUzE4fLi1QHAg01nD9amvfAF5IhrYtggc%3D&amp;reserve
> > > >> d=
> > > >> 0
> > > >>>>
> > > >>> The Guardian University Guide 2021 [Covid code of conduct 
> > > >>> icons]<
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%
> > > >> 2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-cvc&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9
> > > >> de
> > > >> 8a
> > > >> 9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%
> > > >> 7C
> > > >> 1%
> > > >> 7C0%7C637436339671332559%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLj
> > > >> Aw
> > > >> MD
> > > >> AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sda
> > > >> ta
> > > >> =X
> > > >> 8YSo1DfxxYxAmz%2BHGrEPM9ymBKSYLthhK4ZWCUr8Ss%3D&amp;reserved=0
> > > >> <
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%
> > > >> 2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-cvc&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9
> > > >> de
> > > >> 8a
> > > >> 9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%
> > > >> 7C
> > > >> 1%
> > > >> 7C0%7C637436339671332559%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLj
> > > >> Aw
> > > >> MD
> > > >> AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sda
> > > >> ta
> > > >> =X
> > > >> 8YSo1DfxxYxAmz%2BHGrEPM9ymBKSYLthhK4ZWCUr8Ss%3D&amp;reserved=0
> > > >>>>
> > > >>>
> > > >>>
> > > >>> From: Benjamin Lerer <benjamin.lerer@datastax.com<mailto:
> > > >> benjamin.lerer@datastax.com<mailto:benjamin.lerer@datastax.com%
> > > >> 3cmailto:benjamin.lerer@datastax.com>>>
> > > >>> Date: Tuesday, 15 December 2020 at 11:50
> > > >>> To: dev@cassandra.apache.org<mailto:dev@cassandra.apache.org<mailto:
> > > >> dev@cassandra.apache.org%3cmailto:dev@cassandra.apache.org>> <
> > > >> dev@cassandra.apache.org<mailto:dev@cassandra.apache.org<mailto:
> > > >> dev@cassandra.apache.org%3cmailto: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 
> > > >>> <golive@microsoft.com.invalid
> > > >> <mailto:golive@microsoft.com.invalid<mailto:golive@microsoft.com.
> > > >> in valid% 3cmailto:golive@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
> > > >>
> > > >>
> > > >> ---------------------------------------------------------------
> > > >> --
> > > >> --
> > > >> -- To unsubscribe, e-mail:
> > > >> dev-unsubscribe@cassandra.apache.org<mailto:
> > > >> dev-unsubscribe@cassandra.apache.org>
> > > >> For additional commands, e-mail: dev-help@cassandra.apache.org<mailto:
> > > >> dev-help@cassandra.apache.org>
> > > >>
> > > >> The University of Dundee is a registered Scottish Charity, No:
> > > >> SC015096
> > > >>
> > >
> > > ------------------------------------------------------------------
> > > --
> > > - To unsubscribe, e-mail: dev-unsubscribe@cassandra.apache.org
> > > For additional commands, e-mail: dev-help@cassandra.apache.org
> > >
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: dev-unsubscribe@cassandra.apache.org
> > For additional commands, e-mail: dev-help@cassandra.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@cassandra.apache.org
> For additional commands, e-mail: dev-help@cassandra.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cassandra.apache.org
For additional commands, e-mail: dev-help@cassandra.apache.org


Re: [EXTERNAL] Re: Triggers

Posted by Stefan Miklosovic <st...@instaclustr.com>.
Fair enough, do not hesitate to join us on Slack if you have
questions, I bet there are a lot of people willing to gladly answer
your questions and concerns about Cassandra and how it differs from
your relational world. Nothing bad about a mailing list as such if you
prefer it that way, I am just pointing out other channels where one
might get answers in a little bit faster manner and target a wider
audience.

Stefan

On Tue, 15 Dec 2020 at 14:45, Greg Oliver <go...@microsoft.com.invalid> wrote:
>
> @Stefan - I'm just exposing my lack of experience with Cassandra and how one goes about improving perf. In my world (relational), perf can be improved by spreading queries out to different databases. I saw a presentation where a Cassandra keyspace was said to be roughly equivalent to a relational database.
>
> -----Original Message-----
> From: Stefan Miklosovic <st...@instaclustr.com>
> Sent: Tuesday, December 15, 2020 1:38 PM
> To: dev@cassandra.apache.org
> Subject: Re: [EXTERNAL] Re: Triggers
>
> On Tue, 15 Dec 2020 at 14:24, Greg Oliver <go...@microsoft.com.invalid> wrote:
> >
> > Why not batches: I thought that it might be best that read and write models are in different keyspace for perf reasons? As I understand, a batch cannot span keyspaces.
>
> What performance reasons? Do you mean that you want to write into one keyspace but read it from the second one because of performance, or something similar? Once you set up your two DCs, to be e.g. on NTS and
> 3:3 RF and CL for write is QUORUM or what have you, in order to be faster in reads you might relax CL to something less demanding, LOCAL_QUOURUM, ONE, TWO, THREE ... you got the idea. I am just struggling to see how the fact that you would have multiple keyspaces suddenly enable different queries to be faster.
>
> > I've been querying around to see if I can find a "reference implementation" of cqrs using Cassandra to see how people recommend manifesting the query model(s). No luck so far.
> >
> > Why trigger? Because according to the docs, a trigger runs atomically with the original write.
> >
> > But - as Benjamin Lerer says below - triggers don't work as expected? Still would like to know the right ways and wrong ways to use triggers. Need a blog on the topic!
> >
> > Is materialized view the best way? Can it be in a different keyspace? I doubt it - testing.
> >
> > I originally posted in Cassandra-dev because I'm writing Java code to
> > implement the trigger. Didn't know that "dev" means working on
> > Cassandra itself. Sorry about that. I'll move the conversation to
> > user@
> >
> > Thanks very much all for your contributions.
> >
> >
> > -----Original Message-----
> > From: Stefan Miklosovic <st...@instaclustr.com>
> > Sent: Tuesday, December 15, 2020 12:59 PM
> > To: dev@cassandra.apache.org
> > Subject: [EXTERNAL] Re: Triggers
> >
> > Hi,
> >
> > why can't this be achieved by batches? Do I miss something fundamental here? Batches may write to different tables right ... I am just missing the point of using triggers for this.
> >
> > I add specifics to Brian's first paragraph, this is covered by
> > CASSANDRA-13985 -
> > https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
> > ub.com%2Fapache%2Fcassandra%2Fcommit%2F54de771e643e9cc64d1f5dd28b5de8a
> > 9a91a219e&amp;data=04%7C01%7Cgolive%40microsoft.com%7C951b740016784762
> > bcfd08d8a0fec1cf%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C63743636
> > 3338858671%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzI
> > iLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=WkQo44dXPFH4BdqJjbwjM
> > 7mfq0fWE6Ivd70HMOuqnDo%3D&amp;reserved=0
> > This will be firstly introduced in 4.0.
> >
> > Stefan
> >
> > On Tue, 15 Dec 2020 at 13:49, Brian Hess <br...@gmail.com> wrote:
> > >
> > > One challenge to be aware of is that when you use multiple data centers, the users can make changes in either data center and those changes will propagate to the other data center. That is, there is no concept of a “read-only data center” in Cassandra. That may be fine, but some organizations want to grant access to the data for analytics but don’t want those teams to be able to modify the original data. You can, in some cases, restrict the write access through user/role permissions (the analytics team only has read access to that table), but that may not work depending on your use case (but it usually does work).
> > >
> > > One comment from Benjamin’s comment below. There is one scenario where the Trigger could guarantee the data makes it to both tables, specifically if both tables reside in the same keyspace and have the same partition key(s). Mutations in the same keyspace on tables that have the same partition key are internally to Cassandra merged into a single internal Mutation and always applied atomically. So, if you had an exactly same schema for your second table and it resides in the same keyspace (mytable and mytable_analytics, say, both in mykeyspace) your trigger could duplicate the mutation to the source table to be an exact copy into the second table and Cassandra will apply these both atomically (they both succeed or they both fail - never just one). In this scenario, the analytics team could modify data in the second table and not effect the data in the source table.
> > >
> > > ---->Brian
> > >
> > > > On Dec 15, 2020, at 7:38 AM, pauloricardomg <pa...@gmail.com> wrote:
> > > >
> > > > To extend Paul's point, datacenters in cassandra are logical
> > > > concepts which may be useful for your use case and do not
> > > > necessarily need to be represented by physical data centers.
> > > >
> > > > The presentation mentioned by Andrew, while helpful, covers some
> > > > concepts which are specific to Hadoop and may be outdated in more
> > > > recent versions of Cassandra.
> > > >
> > > > I'd recommend two more recent presentations on the multi-DC topic:
> > > > -
> > > > https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2F
> > > > ww
> > > > w.slideshare.net%2FDataStax%2Fapache-cassandra-multidatacenter-ess
> > > > en
> > > > tials-julien-anguenot-iland-internet-solutions-c-summit-2016&amp;d
> > > > at
> > > > a=04%7C01%7Cgolive%40microsoft.com%7C9de8a9d3369f4934c45508d8a0f93
> > > > cf
> > > > 6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637436339671302694%
> > > > 7C
> > > > Unknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6
> > > > Ik
> > > > 1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=AtpoZGyBAOGYrSwHGtC8D7UySR4b
> > > > xP
> > > > 4pIPwkWB3vytU%3D&amp;reserved=0
> > > > -
> > > > https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2F
> > > > ww
> > > > w.slideshare.net%2FDataStax%2Foperations-consistency-failover-for-
> > > > mu
> > > > ltidc-clusters-alexander-dejanovski-the-last-pickle-cassandra-summ
> > > > it
> > > > -2016&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9d3369f4934
> > > > c4
> > > > 5508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637436
> > > > 33
> > > > 9671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2l
> > > > uM
> > > > zIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=3a5jlc%2BMv6Ick
> > > > wJ
> > > > CEDLMzurkICg829go%2BTU52HNPiX8%3D&amp;reserved=0
> > > >
> > > > Finally, if you have any more questions on this I'd recommend you
> > > > send them to the user@cassandra.apache.org mailing list as this
> > > > mailing list (
> > > > dev@cassandra.apache.org) is related to the project development of
> > > > Cassandra.
> > > >
> > > >> Em ter., 15 de dez. de 2020 às 09:28, Greg Oliver
> > > >> <go...@microsoft.com.invalid> escreveu:
> > > >>
> > > >> Can't see it in the email. What's the slide #?
> > > >>
> > > >> From: Andrew Cobley (Staff) <a....@dundee.ac.uk>
> > > >> Sent: Tuesday, December 15, 2020 12:26 PM
> > > >> To: dev@cassandra.apache.org
> > > >> Subject: [EXTERNAL] Re: Triggers
> > > >>
> > > >> Yes that's right.  I remember this illustration:
> > > >>
> > > >> [Diagram  Description automatically generated]
> > > >>
> > > >>
> > > >> From this presentation:
> > > >>
> > > >> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2
> > > >> Fw
> > > >> ww.slideshare.net%2Frastrick%2Fpresentation-12982302&amp;data=04%
> > > >> 7C
> > > >> 01%7Cgolive%40microsoft.com%7C9de8a9d3369f4934c45508d8a0f93cf6%7C
> > > >> 72
> > > >> f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637436339671302694%7CUnk
> > > >> no
> > > >> wn%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1h
> > > >> aW
> > > >> wiLCJXVCI6Mn0%3D%7C1000&amp;sdata=vINBSIM5G2WYkF0RpvYvGadBJ5b8LCi
> > > >> gK
> > > >> EZsH7s2Ra0%3D&amp;reserved=0<
> > > >> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2
> > > >> Fw
> > > >> ww.slideshare.net%2Frastrick%2Fpresentation-12982302&amp;data=04%
> > > >> 7C
> > > >> 01%7Cgolive%40microsoft.com%7C9de8a9d3369f4934c45508d8a0f93cf6%7C
> > > >> 72
> > > >> f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637436339671302694%7CUnk
> > > >> no
> > > >> wn%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1h
> > > >> aW
> > > >> wiLCJXVCI6Mn0%3D%7C1000&amp;sdata=vINBSIM5G2WYkF0RpvYvGadBJ5b8LCi
> > > >> gK
> > > >> EZsH7s2Ra0%3D&amp;reserved=0
> > > >>>
> > > >>
> > > >> Might help.
> > > >>
> > > >> Andy
> > > >>
> > > >> [University of Dundee shield logo]<
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-home&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9d
> > > >> e8
> > > >> a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7
> > > >> C1
> > > >> %7C0%7C637436339671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA
> > > >> wM
> > > >> DAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdat
> > > >> a=
> > > >> UCsPPZsn00NOQbZtCQQemL8%2BUKrcjR%2BkYbletbFAUTU%3D&amp;reserved=0
> > > >>>
> > > >>
> > > >>
> > > >> 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.cobley@dundee.ac.uk<mailto:
> > > >> a.e.cobley@dundee.ac.uk>
> > > >> [University of Dundee Facebook]<
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-fb&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > > >> %7
> > > >> C0%7C637436339671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > > >> op
> > > >> oI%2Fy8MQGUoZUf4JLNSwO0AXvo%2BSPgmlCrMDYqxfVA%3D&amp;reserved=0>
> > > >> [University of Dundee Twitter] <
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-tw&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > > >> %7
> > > >> C0%7C637436339671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > > >> Pf UixxwmmdsvAAgIOtFAmvCWBAuyZHHxaDF7a7EI0J8%3D&amp;reserved=0>
> > > >> [University of Dundee LinkedIn] <
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-li&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > > >> %7
> > > >> C0%7C637436339671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > > >> 4p kmZtJbfmOhYEUqHVHuNqJ82sKffi55UlNoqRM9iYU%3D&amp;reserved=0>
> > > >> [University of Dundee YouTube] <
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-yt&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > > >> %7
> > > >> C0%7C637436339671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > > >> b6 WDU5BQ2MPxdUXMV7svX7GwwoA2o9dxVTaH30SUlWw%3D&amp;reserved=0>
> > > >> [University of Dundee Instagram] <
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-ig&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > > >> %7
> > > >> C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > > >> xO 3aYY76pRSXudHj0fMwreYc9WE%2BL9WvFUVSOpT3Xr0%3D&amp;reserved=0>
> > > >> [University of Dundee Snapchat] <
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-sc&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > > >> %7
> > > >> C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > > >> fM
> > > >> BdqlVnUrZ8LY8KTe4RfmkWT%2BQqFQ0hkbNN%2F0Cz0s8%3D&amp;reserved=0
> > > >>>
> > > >> One of the UK's top 20 universities<
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-strapline&amp;data=04%7C01%7Cgolive%40microsoft.com
> > > >> %7
> > > >> C9de8a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011d
> > > >> b4
> > > >> 7%7C1%7C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC
> > > >> 4w
> > > >> LjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp
> > > >> ;s
> > > >> data=%2Fm6vL%2FpEWhutdwcVmEksANunJ71ufHH7BSMleW6vxpM%3D&amp;reser
> > > >> ve
> > > >> d=0
> > > >>>
> > > >> The Guardian University Guide 2021 [Covid code of conduct icons]<
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-cvc&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de
> > > >> 8a
> > > >> 9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C
> > > >> 1%
> > > >> 7C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAw
> > > >> MD
> > > >> AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata
> > > >> =u
> > > >> gYXppAj6idOsHR38kfycILz4TzzUTX3ncPqXIr9HEQ%3D&amp;reserved=0
> > > >>>
> > > >>
> > > >>
> > > >> From: Paul Chandler <pa...@redshots.com>>
> > > >> Date: Tuesday, 15 December 2020 at 12:16
> > > >> To: dev@cassandra.apache.org<ma...@cassandra.apache.org> <
> > > >> dev@cassandra.apache.org<ma...@cassandra.apache.org>>
> > > >> Subject: Re: Triggers
> > > >> Hi Greg,
> > > >>
> > > >> Andy is talking about Cassandra datacenters, which can easily be
> > > >> co located in the same physical datacenter.
> > > >>
> > > >> Paul
> > > >>
> > > >>> On 15 Dec 2020, at 12:10, Greg Oliver
> > > >>> <golive@microsoft.com.INVALID
> > > >> <ma...@microsoft.com.INVALID>> wrote:
> > > >>>
> > > >>> That's great in theory, but what if your customer is a national
> > > >> government (they require their data to remain within their
> > > >> borders) and there aren't enough DC's in nation to support multiple DC data distribution?
> > > >>>
> > > >>> To get the throughput needed (say - if the government announces
> > > >>> a new
> > > >> program and 30M people try to sign up at the same time) CQRS
> > > >> seems a likely part of the solution.
> > > >>>
> > > >>> With Cassandra (and I'm definitely new to it), as I learn more
> > > >>> it looks
> > > >> like a set of materialized views might be a way to achieve the goal.
> > > >>>
> > > >>> Thoughts?
> > > >>>
> > > >>> From: Andrew Cobley (Staff) <a.e.cobley@dundee.ac.uk<mailto:
> > > >> a.e.cobley@dundee.ac.uk>>
> > > >>> Sent: Tuesday, December 15, 2020 11:57 AM
> > > >>> To: dev@cassandra.apache.org<ma...@cassandra.apache.org>
> > > >>> Subject: [EXTERNAL] Re: Triggers
> > > >>>
> > > >>> 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]<
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-home&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9d
> > > >> e8
> > > >> a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7
> > > >> C1
> > > >> %7C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA
> > > >> wM
> > > >> DAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdat
> > > >> a=
> > > >> cemMScOW969CviEM%2F8FOddPPREJKdxP5SGIsJEHjAr4%3D&amp;reserved=0
> > > >> <
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-home&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9d
> > > >> e8
> > > >> a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7
> > > >> C1
> > > >> %7C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA
> > > >> wM
> > > >> DAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdat
> > > >> a=
> > > >> cemMScOW969CviEM%2F8FOddPPREJKdxP5SGIsJEHjAr4%3D&amp;reserved=0
> > > >>>>
> > > >>>
> > > >>>
> > > >>> 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.cobley@dundee.ac.uk<mailto:
> > > >> a.e.cobley@dundee.ac.uk<mailto:a.e.cobley@dundee.ac.uk%
> > > >> 3cmailto:a.e.cobley@dundee.ac.uk>>
> > > >>> [University of Dundee Facebook]<
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-fb&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > > >> %7
> > > >> C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > > >> my
> > > >> 43KF0x8a7Cfw1Mxw89vgzev2V4IE77unYI63GN5%2FM%3D&amp;reserved=0
> > > >> <
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-fb&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > > >> %7
> > > >> C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > > >> my
> > > >> 43KF0x8a7Cfw1Mxw89vgzev2V4IE77unYI63GN5%2FM%3D&amp;reserved=0>>
> > > >> [University of Dundee Twitter] <
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-tw&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > > >> %7
> > > >> C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > > >> hS
> > > >> 23WW9TkmlvBaHTDLjhRD%2FfIxMfPnBaemqI6g69i1s%3D&amp;reserved=0
> > > >> <
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-tw&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > > >> %7
> > > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > > >> mu RPgCkCk9F9BNnTAaZGMFihOoV6Jp9ao9hyOftVhBI%3D&amp;reserved=0>>
> > > >> [University of Dundee LinkedIn] <
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-li&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > > >> %7
> > > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > > >> g7
> > > >> qWH7kEBgcFAFuOxxnplwbk2EOQoq1bkpL3Y04FJe4%3D&amp;reserved=0
> > > >> <
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-li&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > > >> %7
> > > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > > >> g7 qWH7kEBgcFAFuOxxnplwbk2EOQoq1bkpL3Y04FJe4%3D&amp;reserved=0>>
> > > >> [University of Dundee YouTube] <
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-yt&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > > >> %7
> > > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > > >> vh
> > > >> MK%2BRhhGpltjgJE6qsmn4sdyuKPqbiBLfpKOMryQ3o%3D&amp;reserved=0
> > > >> <
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-yt&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > > >> %7
> > > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > > >> vh
> > > >> MK%2BRhhGpltjgJE6qsmn4sdyuKPqbiBLfpKOMryQ3o%3D&amp;reserved=0>>
> > > >> [University of Dundee Instagram] <
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-ig&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > > >> %7
> > > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > > >> Jq
> > > >> J0aOaMVjlOIHozWuZG0tjC2GX%2BMbC%2Fon2ZSduahEQ%3D&amp;reserved=0
> > > >> <
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-ig&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > > >> %7
> > > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > > >> Jq
> > > >> J0aOaMVjlOIHozWuZG0tjC2GX%2BMbC%2Fon2ZSduahEQ%3D&amp;reserved=0>>
> > > >> [University of Dundee Snapchat] <
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-sc&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > > >> %7
> > > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > > >> rw
> > > >> i61R76R0b6rciwyDC7xzZDZy3GJDkTET%2BC5Em1KcI%3D&amp;reserved=0
> > > >> <
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-sc&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > > >> a9
> > > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > > >> %7
> > > >> C0%7C637436339671332559%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > > >> DA
> > > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > > >> WV
> > > >> 2DT5Kwq3VEiw8IMZBlzJ0TNFXnV%2F%2F1puvkaacCjH8%3D&amp;reserved=0
> > > >>>>
> > > >>> One of the UK's top 20 universities<
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-strapline&amp;data=04%7C01%7Cgolive%40microsoft.com
> > > >> %7
> > > >> C9de8a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011d
> > > >> b4
> > > >> 7%7C1%7C0%7C637436339671332559%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC
> > > >> 4w
> > > >> LjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp
> > > >> ;s
> > > >> data=J8FCwXqHWyAUzE4fLi1QHAg01nD9amvfAF5IhrYtggc%3D&amp;reserved=
> > > >> 0
> > > >> <
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-strapline&amp;data=04%7C01%7Cgolive%40microsoft.com
> > > >> %7
> > > >> C9de8a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011d
> > > >> b4
> > > >> 7%7C1%7C0%7C637436339671332559%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC
> > > >> 4w
> > > >> LjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp
> > > >> ;s
> > > >> data=J8FCwXqHWyAUzE4fLi1QHAg01nD9amvfAF5IhrYtggc%3D&amp;reserved=
> > > >> 0
> > > >>>>
> > > >>> The Guardian University Guide 2021 [Covid code of conduct
> > > >>> icons]<
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-cvc&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de
> > > >> 8a
> > > >> 9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C
> > > >> 1%
> > > >> 7C0%7C637436339671332559%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAw
> > > >> MD
> > > >> AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata
> > > >> =X
> > > >> 8YSo1DfxxYxAmz%2BHGrEPM9ymBKSYLthhK4ZWCUr8Ss%3D&amp;reserved=0
> > > >> <
> > > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > > >> uo
> > > >> d.ac.uk%2Fsig-cvc&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de
> > > >> 8a
> > > >> 9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C
> > > >> 1%
> > > >> 7C0%7C637436339671332559%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAw
> > > >> MD
> > > >> AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata
> > > >> =X
> > > >> 8YSo1DfxxYxAmz%2BHGrEPM9ymBKSYLthhK4ZWCUr8Ss%3D&amp;reserved=0
> > > >>>>
> > > >>>
> > > >>>
> > > >>> From: Benjamin Lerer <benjamin.lerer@datastax.com<mailto:
> > > >> benjamin.lerer@datastax.com<mailto:benjamin.lerer@datastax.com%
> > > >> 3cmailto:benjamin.lerer@datastax.com>>>
> > > >>> Date: Tuesday, 15 December 2020 at 11:50
> > > >>> To: dev@cassandra.apache.org<mailto:dev@cassandra.apache.org<mailto:
> > > >> dev@cassandra.apache.org%3cmailto:dev@cassandra.apache.org>> <
> > > >> dev@cassandra.apache.org<mailto:dev@cassandra.apache.org<mailto:
> > > >> dev@cassandra.apache.org%3cmailto: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
> > > >>> <golive@microsoft.com.invalid
> > > >> <mailto:golive@microsoft.com.invalid<mailto:golive@microsoft.com.
> > > >> in valid% 3cmailto:golive@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
> > > >>
> > > >>
> > > >> -----------------------------------------------------------------
> > > >> --
> > > >> -- To unsubscribe, e-mail:
> > > >> dev-unsubscribe@cassandra.apache.org<mailto:
> > > >> dev-unsubscribe@cassandra.apache.org>
> > > >> For additional commands, e-mail: dev-help@cassandra.apache.org<mailto:
> > > >> dev-help@cassandra.apache.org>
> > > >>
> > > >> The University of Dundee is a registered Scottish Charity, No:
> > > >> SC015096
> > > >>
> > >
> > > --------------------------------------------------------------------
> > > - To unsubscribe, e-mail: dev-unsubscribe@cassandra.apache.org
> > > For additional commands, e-mail: dev-help@cassandra.apache.org
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@cassandra.apache.org
> > For additional commands, e-mail: dev-help@cassandra.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@cassandra.apache.org
> For additional commands, e-mail: dev-help@cassandra.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cassandra.apache.org
For additional commands, e-mail: dev-help@cassandra.apache.org


RE: [EXTERNAL] Re: Triggers

Posted by Greg Oliver <go...@microsoft.com.INVALID>.
@Stefan - I'm just exposing my lack of experience with Cassandra and how one goes about improving perf. In my world (relational), perf can be improved by spreading queries out to different databases. I saw a presentation where a Cassandra keyspace was said to be roughly equivalent to a relational database.

-----Original Message-----
From: Stefan Miklosovic <st...@instaclustr.com> 
Sent: Tuesday, December 15, 2020 1:38 PM
To: dev@cassandra.apache.org
Subject: Re: [EXTERNAL] Re: Triggers

On Tue, 15 Dec 2020 at 14:24, Greg Oliver <go...@microsoft.com.invalid> wrote:
>
> Why not batches: I thought that it might be best that read and write models are in different keyspace for perf reasons? As I understand, a batch cannot span keyspaces.

What performance reasons? Do you mean that you want to write into one keyspace but read it from the second one because of performance, or something similar? Once you set up your two DCs, to be e.g. on NTS and
3:3 RF and CL for write is QUORUM or what have you, in order to be faster in reads you might relax CL to something less demanding, LOCAL_QUOURUM, ONE, TWO, THREE ... you got the idea. I am just struggling to see how the fact that you would have multiple keyspaces suddenly enable different queries to be faster.

> I've been querying around to see if I can find a "reference implementation" of cqrs using Cassandra to see how people recommend manifesting the query model(s). No luck so far.
>
> Why trigger? Because according to the docs, a trigger runs atomically with the original write.
>
> But - as Benjamin Lerer says below - triggers don't work as expected? Still would like to know the right ways and wrong ways to use triggers. Need a blog on the topic!
>
> Is materialized view the best way? Can it be in a different keyspace? I doubt it - testing.
>
> I originally posted in Cassandra-dev because I'm writing Java code to 
> implement the trigger. Didn't know that "dev" means working on 
> Cassandra itself. Sorry about that. I'll move the conversation to 
> user@
>
> Thanks very much all for your contributions.
>
>
> -----Original Message-----
> From: Stefan Miklosovic <st...@instaclustr.com>
> Sent: Tuesday, December 15, 2020 12:59 PM
> To: dev@cassandra.apache.org
> Subject: [EXTERNAL] Re: Triggers
>
> Hi,
>
> why can't this be achieved by batches? Do I miss something fundamental here? Batches may write to different tables right ... I am just missing the point of using triggers for this.
>
> I add specifics to Brian's first paragraph, this is covered by
> CASSANDRA-13985 -
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
> ub.com%2Fapache%2Fcassandra%2Fcommit%2F54de771e643e9cc64d1f5dd28b5de8a
> 9a91a219e&amp;data=04%7C01%7Cgolive%40microsoft.com%7C951b740016784762
> bcfd08d8a0fec1cf%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C63743636
> 3338858671%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzI
> iLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=WkQo44dXPFH4BdqJjbwjM
> 7mfq0fWE6Ivd70HMOuqnDo%3D&amp;reserved=0
> This will be firstly introduced in 4.0.
>
> Stefan
>
> On Tue, 15 Dec 2020 at 13:49, Brian Hess <br...@gmail.com> wrote:
> >
> > One challenge to be aware of is that when you use multiple data centers, the users can make changes in either data center and those changes will propagate to the other data center. That is, there is no concept of a “read-only data center” in Cassandra. That may be fine, but some organizations want to grant access to the data for analytics but don’t want those teams to be able to modify the original data. You can, in some cases, restrict the write access through user/role permissions (the analytics team only has read access to that table), but that may not work depending on your use case (but it usually does work).
> >
> > One comment from Benjamin’s comment below. There is one scenario where the Trigger could guarantee the data makes it to both tables, specifically if both tables reside in the same keyspace and have the same partition key(s). Mutations in the same keyspace on tables that have the same partition key are internally to Cassandra merged into a single internal Mutation and always applied atomically. So, if you had an exactly same schema for your second table and it resides in the same keyspace (mytable and mytable_analytics, say, both in mykeyspace) your trigger could duplicate the mutation to the source table to be an exact copy into the second table and Cassandra will apply these both atomically (they both succeed or they both fail - never just one). In this scenario, the analytics team could modify data in the second table and not effect the data in the source table.
> >
> > ---->Brian
> >
> > > On Dec 15, 2020, at 7:38 AM, pauloricardomg <pa...@gmail.com> wrote:
> > >
> > > To extend Paul's point, datacenters in cassandra are logical 
> > > concepts which may be useful for your use case and do not 
> > > necessarily need to be represented by physical data centers.
> > >
> > > The presentation mentioned by Andrew, while helpful, covers some 
> > > concepts which are specific to Hadoop and may be outdated in more 
> > > recent versions of Cassandra.
> > >
> > > I'd recommend two more recent presentations on the multi-DC topic:
> > > -
> > > https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2F
> > > ww 
> > > w.slideshare.net%2FDataStax%2Fapache-cassandra-multidatacenter-ess
> > > en 
> > > tials-julien-anguenot-iland-internet-solutions-c-summit-2016&amp;d
> > > at 
> > > a=04%7C01%7Cgolive%40microsoft.com%7C9de8a9d3369f4934c45508d8a0f93
> > > cf 
> > > 6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637436339671302694%
> > > 7C 
> > > Unknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6
> > > Ik 
> > > 1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=AtpoZGyBAOGYrSwHGtC8D7UySR4b
> > > xP
> > > 4pIPwkWB3vytU%3D&amp;reserved=0
> > > -
> > > https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2F
> > > ww 
> > > w.slideshare.net%2FDataStax%2Foperations-consistency-failover-for-
> > > mu 
> > > ltidc-clusters-alexander-dejanovski-the-last-pickle-cassandra-summ
> > > it
> > > -2016&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9d3369f4934
> > > c4
> > > 5508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637436
> > > 33 
> > > 9671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2l
> > > uM 
> > > zIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=3a5jlc%2BMv6Ick
> > > wJ
> > > CEDLMzurkICg829go%2BTU52HNPiX8%3D&amp;reserved=0
> > >
> > > Finally, if you have any more questions on this I'd recommend you 
> > > send them to the user@cassandra.apache.org mailing list as this 
> > > mailing list (
> > > dev@cassandra.apache.org) is related to the project development of 
> > > Cassandra.
> > >
> > >> Em ter., 15 de dez. de 2020 às 09:28, Greg Oliver 
> > >> <go...@microsoft.com.invalid> escreveu:
> > >>
> > >> Can't see it in the email. What's the slide #?
> > >>
> > >> From: Andrew Cobley (Staff) <a....@dundee.ac.uk>
> > >> Sent: Tuesday, December 15, 2020 12:26 PM
> > >> To: dev@cassandra.apache.org
> > >> Subject: [EXTERNAL] Re: Triggers
> > >>
> > >> Yes that's right.  I remember this illustration:
> > >>
> > >> [Diagram  Description automatically generated]
> > >>
> > >>
> > >> From this presentation:
> > >>
> > >> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2
> > >> Fw 
> > >> ww.slideshare.net%2Frastrick%2Fpresentation-12982302&amp;data=04%
> > >> 7C
> > >> 01%7Cgolive%40microsoft.com%7C9de8a9d3369f4934c45508d8a0f93cf6%7C
> > >> 72 
> > >> f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637436339671302694%7CUnk
> > >> no 
> > >> wn%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1h
> > >> aW 
> > >> wiLCJXVCI6Mn0%3D%7C1000&amp;sdata=vINBSIM5G2WYkF0RpvYvGadBJ5b8LCi
> > >> gK
> > >> EZsH7s2Ra0%3D&amp;reserved=0<
> > >> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2
> > >> Fw 
> > >> ww.slideshare.net%2Frastrick%2Fpresentation-12982302&amp;data=04%
> > >> 7C
> > >> 01%7Cgolive%40microsoft.com%7C9de8a9d3369f4934c45508d8a0f93cf6%7C
> > >> 72 
> > >> f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637436339671302694%7CUnk
> > >> no 
> > >> wn%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1h
> > >> aW 
> > >> wiLCJXVCI6Mn0%3D%7C1000&amp;sdata=vINBSIM5G2WYkF0RpvYvGadBJ5b8LCi
> > >> gK
> > >> EZsH7s2Ra0%3D&amp;reserved=0
> > >>>
> > >>
> > >> Might help.
> > >>
> > >> Andy
> > >>
> > >> [University of Dundee shield logo]< 
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > >> uo
> > >> d.ac.uk%2Fsig-home&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9d
> > >> e8
> > >> a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7
> > >> C1 
> > >> %7C0%7C637436339671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA
> > >> wM 
> > >> DAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdat
> > >> a=
> > >> UCsPPZsn00NOQbZtCQQemL8%2BUKrcjR%2BkYbletbFAUTU%3D&amp;reserved=0
> > >>>
> > >>
> > >>
> > >> 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.cobley@dundee.ac.uk<mailto:
> > >> a.e.cobley@dundee.ac.uk>
> > >> [University of Dundee Facebook]<
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > >> uo
> > >> d.ac.uk%2Fsig-fb&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > >> a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > >> %7 
> > >> C0%7C637436339671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > >> DA 
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > >> op 
> > >> oI%2Fy8MQGUoZUf4JLNSwO0AXvo%2BSPgmlCrMDYqxfVA%3D&amp;reserved=0>
> > >> [University of Dundee Twitter] <
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > >> uo
> > >> d.ac.uk%2Fsig-tw&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > >> a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > >> %7 
> > >> C0%7C637436339671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > >> DA 
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > >> Pf UixxwmmdsvAAgIOtFAmvCWBAuyZHHxaDF7a7EI0J8%3D&amp;reserved=0>
> > >> [University of Dundee LinkedIn] < 
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > >> uo
> > >> d.ac.uk%2Fsig-li&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > >> a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > >> %7 
> > >> C0%7C637436339671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > >> DA 
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > >> 4p kmZtJbfmOhYEUqHVHuNqJ82sKffi55UlNoqRM9iYU%3D&amp;reserved=0>
> > >> [University of Dundee YouTube] <
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > >> uo
> > >> d.ac.uk%2Fsig-yt&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > >> a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > >> %7 
> > >> C0%7C637436339671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > >> DA
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > >> b6 WDU5BQ2MPxdUXMV7svX7GwwoA2o9dxVTaH30SUlWw%3D&amp;reserved=0>
> > >> [University of Dundee Instagram] < 
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > >> uo
> > >> d.ac.uk%2Fsig-ig&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > >> a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > >> %7 
> > >> C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > >> DA 
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > >> xO 3aYY76pRSXudHj0fMwreYc9WE%2BL9WvFUVSOpT3Xr0%3D&amp;reserved=0>
> > >> [University of Dundee Snapchat] < 
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > >> uo
> > >> d.ac.uk%2Fsig-sc&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > >> a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > >> %7 
> > >> C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > >> DA 
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > >> fM
> > >> BdqlVnUrZ8LY8KTe4RfmkWT%2BQqFQ0hkbNN%2F0Cz0s8%3D&amp;reserved=0
> > >>>
> > >> One of the UK's top 20 universities< 
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > >> uo
> > >> d.ac.uk%2Fsig-strapline&amp;data=04%7C01%7Cgolive%40microsoft.com
> > >> %7
> > >> C9de8a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011d
> > >> b4 
> > >> 7%7C1%7C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC
> > >> 4w 
> > >> LjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp
> > >> ;s 
> > >> data=%2Fm6vL%2FpEWhutdwcVmEksANunJ71ufHH7BSMleW6vxpM%3D&amp;reser
> > >> ve
> > >> d=0
> > >>>
> > >> The Guardian University Guide 2021 [Covid code of conduct icons]< 
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > >> uo 
> > >> d.ac.uk%2Fsig-cvc&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de
> > >> 8a 
> > >> 9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C
> > >> 1% 
> > >> 7C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAw
> > >> MD 
> > >> AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata
> > >> =u
> > >> gYXppAj6idOsHR38kfycILz4TzzUTX3ncPqXIr9HEQ%3D&amp;reserved=0
> > >>>
> > >>
> > >>
> > >> From: Paul Chandler <pa...@redshots.com>>
> > >> Date: Tuesday, 15 December 2020 at 12:16
> > >> To: dev@cassandra.apache.org<ma...@cassandra.apache.org> < 
> > >> dev@cassandra.apache.org<ma...@cassandra.apache.org>>
> > >> Subject: Re: Triggers
> > >> Hi Greg,
> > >>
> > >> Andy is talking about Cassandra datacenters, which can easily be 
> > >> co located in the same physical datacenter.
> > >>
> > >> Paul
> > >>
> > >>> On 15 Dec 2020, at 12:10, Greg Oliver 
> > >>> <golive@microsoft.com.INVALID
> > >> <ma...@microsoft.com.INVALID>> wrote:
> > >>>
> > >>> That's great in theory, but what if your customer is a national
> > >> government (they require their data to remain within their 
> > >> borders) and there aren't enough DC's in nation to support multiple DC data distribution?
> > >>>
> > >>> To get the throughput needed (say - if the government announces 
> > >>> a new
> > >> program and 30M people try to sign up at the same time) CQRS 
> > >> seems a likely part of the solution.
> > >>>
> > >>> With Cassandra (and I'm definitely new to it), as I learn more 
> > >>> it looks
> > >> like a set of materialized views might be a way to achieve the goal.
> > >>>
> > >>> Thoughts?
> > >>>
> > >>> From: Andrew Cobley (Staff) <a.e.cobley@dundee.ac.uk<mailto:
> > >> a.e.cobley@dundee.ac.uk>>
> > >>> Sent: Tuesday, December 15, 2020 11:57 AM
> > >>> To: dev@cassandra.apache.org<ma...@cassandra.apache.org>
> > >>> Subject: [EXTERNAL] Re: Triggers
> > >>>
> > >>> 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]<
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > >> uo
> > >> d.ac.uk%2Fsig-home&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9d
> > >> e8
> > >> a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7
> > >> C1 
> > >> %7C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA
> > >> wM 
> > >> DAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdat
> > >> a=
> > >> cemMScOW969CviEM%2F8FOddPPREJKdxP5SGIsJEHjAr4%3D&amp;reserved=0
> > >> <
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > >> uo
> > >> d.ac.uk%2Fsig-home&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9d
> > >> e8
> > >> a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7
> > >> C1 
> > >> %7C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA
> > >> wM 
> > >> DAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdat
> > >> a=
> > >> cemMScOW969CviEM%2F8FOddPPREJKdxP5SGIsJEHjAr4%3D&amp;reserved=0
> > >>>>
> > >>>
> > >>>
> > >>> 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.cobley@dundee.ac.uk<mailto:
> > >> a.e.cobley@dundee.ac.uk<mailto:a.e.cobley@dundee.ac.uk%
> > >> 3cmailto:a.e.cobley@dundee.ac.uk>>
> > >>> [University of Dundee Facebook]<
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > >> uo
> > >> d.ac.uk%2Fsig-fb&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > >> a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > >> %7 
> > >> C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > >> DA 
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > >> my
> > >> 43KF0x8a7Cfw1Mxw89vgzev2V4IE77unYI63GN5%2FM%3D&amp;reserved=0
> > >> <
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > >> uo
> > >> d.ac.uk%2Fsig-fb&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > >> a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > >> %7 
> > >> C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > >> DA 
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > >> my 
> > >> 43KF0x8a7Cfw1Mxw89vgzev2V4IE77unYI63GN5%2FM%3D&amp;reserved=0>>
> > >> [University of Dundee Twitter] <
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > >> uo
> > >> d.ac.uk%2Fsig-tw&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > >> a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > >> %7 
> > >> C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > >> DA 
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > >> hS
> > >> 23WW9TkmlvBaHTDLjhRD%2FfIxMfPnBaemqI6g69i1s%3D&amp;reserved=0
> > >> <
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > >> uo
> > >> d.ac.uk%2Fsig-tw&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > >> a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > >> %7 
> > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > >> DA 
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > >> mu RPgCkCk9F9BNnTAaZGMFihOoV6Jp9ao9hyOftVhBI%3D&amp;reserved=0>>
> > >> [University of Dundee LinkedIn] < 
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > >> uo
> > >> d.ac.uk%2Fsig-li&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > >> a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > >> %7 
> > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > >> DA
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > >> g7
> > >> qWH7kEBgcFAFuOxxnplwbk2EOQoq1bkpL3Y04FJe4%3D&amp;reserved=0
> > >> <
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > >> uo
> > >> d.ac.uk%2Fsig-li&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > >> a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > >> %7 
> > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > >> DA
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > >> g7 qWH7kEBgcFAFuOxxnplwbk2EOQoq1bkpL3Y04FJe4%3D&amp;reserved=0>>
> > >> [University of Dundee YouTube] <
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > >> uo
> > >> d.ac.uk%2Fsig-yt&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > >> a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > >> %7 
> > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > >> DA 
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > >> vh
> > >> MK%2BRhhGpltjgJE6qsmn4sdyuKPqbiBLfpKOMryQ3o%3D&amp;reserved=0
> > >> <
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > >> uo
> > >> d.ac.uk%2Fsig-yt&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > >> a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > >> %7 
> > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > >> DA 
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > >> vh 
> > >> MK%2BRhhGpltjgJE6qsmn4sdyuKPqbiBLfpKOMryQ3o%3D&amp;reserved=0>>
> > >> [University of Dundee Instagram] < 
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > >> uo
> > >> d.ac.uk%2Fsig-ig&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > >> a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > >> %7 
> > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > >> DA 
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > >> Jq
> > >> J0aOaMVjlOIHozWuZG0tjC2GX%2BMbC%2Fon2ZSduahEQ%3D&amp;reserved=0
> > >> <
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > >> uo
> > >> d.ac.uk%2Fsig-ig&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > >> a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > >> %7 
> > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > >> DA 
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > >> Jq 
> > >> J0aOaMVjlOIHozWuZG0tjC2GX%2BMbC%2Fon2ZSduahEQ%3D&amp;reserved=0>>
> > >> [University of Dundee Snapchat] < 
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > >> uo
> > >> d.ac.uk%2Fsig-sc&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > >> a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > >> %7 
> > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > >> DA 
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > >> rw
> > >> i61R76R0b6rciwyDC7xzZDZy3GJDkTET%2BC5Em1KcI%3D&amp;reserved=0
> > >> <
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > >> uo
> > >> d.ac.uk%2Fsig-sc&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > >> a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > >> %7 
> > >> C0%7C637436339671332559%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > >> DA 
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > >> WV
> > >> 2DT5Kwq3VEiw8IMZBlzJ0TNFXnV%2F%2F1puvkaacCjH8%3D&amp;reserved=0
> > >>>>
> > >>> One of the UK's top 20 universities<
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > >> uo
> > >> d.ac.uk%2Fsig-strapline&amp;data=04%7C01%7Cgolive%40microsoft.com
> > >> %7
> > >> C9de8a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011d
> > >> b4 
> > >> 7%7C1%7C0%7C637436339671332559%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC
> > >> 4w 
> > >> LjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp
> > >> ;s
> > >> data=J8FCwXqHWyAUzE4fLi1QHAg01nD9amvfAF5IhrYtggc%3D&amp;reserved=
> > >> 0
> > >> <
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > >> uo
> > >> d.ac.uk%2Fsig-strapline&amp;data=04%7C01%7Cgolive%40microsoft.com
> > >> %7
> > >> C9de8a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011d
> > >> b4 
> > >> 7%7C1%7C0%7C637436339671332559%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC
> > >> 4w 
> > >> LjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp
> > >> ;s
> > >> data=J8FCwXqHWyAUzE4fLi1QHAg01nD9amvfAF5IhrYtggc%3D&amp;reserved=
> > >> 0
> > >>>>
> > >>> The Guardian University Guide 2021 [Covid code of conduct 
> > >>> icons]<
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > >> uo 
> > >> d.ac.uk%2Fsig-cvc&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de
> > >> 8a 
> > >> 9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C
> > >> 1% 
> > >> 7C0%7C637436339671332559%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAw
> > >> MD 
> > >> AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata
> > >> =X
> > >> 8YSo1DfxxYxAmz%2BHGrEPM9ymBKSYLthhK4ZWCUr8Ss%3D&amp;reserved=0
> > >> <
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > >> uo 
> > >> d.ac.uk%2Fsig-cvc&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de
> > >> 8a 
> > >> 9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C
> > >> 1% 
> > >> 7C0%7C637436339671332559%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAw
> > >> MD 
> > >> AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata
> > >> =X
> > >> 8YSo1DfxxYxAmz%2BHGrEPM9ymBKSYLthhK4ZWCUr8Ss%3D&amp;reserved=0
> > >>>>
> > >>>
> > >>>
> > >>> From: Benjamin Lerer <benjamin.lerer@datastax.com<mailto:
> > >> benjamin.lerer@datastax.com<mailto:benjamin.lerer@datastax.com%
> > >> 3cmailto:benjamin.lerer@datastax.com>>>
> > >>> Date: Tuesday, 15 December 2020 at 11:50
> > >>> To: dev@cassandra.apache.org<mailto:dev@cassandra.apache.org<mailto:
> > >> dev@cassandra.apache.org%3cmailto:dev@cassandra.apache.org>> <
> > >> dev@cassandra.apache.org<mailto:dev@cassandra.apache.org<mailto:
> > >> dev@cassandra.apache.org%3cmailto: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 
> > >>> <golive@microsoft.com.invalid
> > >> <mailto:golive@microsoft.com.invalid<mailto:golive@microsoft.com.
> > >> in valid% 3cmailto:golive@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
> > >>
> > >>
> > >> -----------------------------------------------------------------
> > >> --
> > >> -- To unsubscribe, e-mail:
> > >> dev-unsubscribe@cassandra.apache.org<mailto:
> > >> dev-unsubscribe@cassandra.apache.org>
> > >> For additional commands, e-mail: dev-help@cassandra.apache.org<mailto:
> > >> dev-help@cassandra.apache.org>
> > >>
> > >> The University of Dundee is a registered Scottish Charity, No:
> > >> SC015096
> > >>
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: dev-unsubscribe@cassandra.apache.org
> > For additional commands, e-mail: dev-help@cassandra.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@cassandra.apache.org
> For additional commands, e-mail: dev-help@cassandra.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cassandra.apache.org
For additional commands, e-mail: dev-help@cassandra.apache.org


Re: [EXTERNAL] Re: Triggers

Posted by Stefan Miklosovic <st...@instaclustr.com>.
On Tue, 15 Dec 2020 at 14:24, Greg Oliver <go...@microsoft.com.invalid> wrote:
>
> Why not batches: I thought that it might be best that read and write models are in different keyspace for perf reasons? As I understand, a batch cannot span keyspaces.

What performance reasons? Do you mean that you want to write into one
keyspace but read it from the second one because of performance, or
something similar? Once you set up your two DCs, to be e.g. on NTS and
3:3 RF and CL for write is QUORUM or what have you, in order to be
faster in reads you might relax CL to something less demanding,
LOCAL_QUOURUM, ONE, TWO, THREE ... you got the idea. I am just
struggling to see how the fact that you would have multiple keyspaces
suddenly enable different queries to be faster.

> I've been querying around to see if I can find a "reference implementation" of cqrs using Cassandra to see how people recommend manifesting the query model(s). No luck so far.
>
> Why trigger? Because according to the docs, a trigger runs atomically with the original write.
>
> But - as Benjamin Lerer says below - triggers don't work as expected? Still would like to know the right ways and wrong ways to use triggers. Need a blog on the topic!
>
> Is materialized view the best way? Can it be in a different keyspace? I doubt it - testing.
>
> I originally posted in Cassandra-dev because I'm writing Java code to implement the trigger. Didn't know that "dev" means working on Cassandra itself. Sorry about that. I'll move the conversation to user@
>
> Thanks very much all for your contributions.
>
>
> -----Original Message-----
> From: Stefan Miklosovic <st...@instaclustr.com>
> Sent: Tuesday, December 15, 2020 12:59 PM
> To: dev@cassandra.apache.org
> Subject: [EXTERNAL] Re: Triggers
>
> Hi,
>
> why can't this be achieved by batches? Do I miss something fundamental here? Batches may write to different tables right ... I am just missing the point of using triggers for this.
>
> I add specifics to Brian's first paragraph, this is covered by
> CASSANDRA-13985 -
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fcassandra%2Fcommit%2F54de771e643e9cc64d1f5dd28b5de8a9a91a219e&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637436339671292733%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=pdsbvfRORRGz23mqPOUwSl%2Bn6NUdp%2BH3qM2WX%2FCWz0k%3D&amp;reserved=0
> This will be firstly introduced in 4.0.
>
> Stefan
>
> On Tue, 15 Dec 2020 at 13:49, Brian Hess <br...@gmail.com> wrote:
> >
> > One challenge to be aware of is that when you use multiple data centers, the users can make changes in either data center and those changes will propagate to the other data center. That is, there is no concept of a “read-only data center” in Cassandra. That may be fine, but some organizations want to grant access to the data for analytics but don’t want those teams to be able to modify the original data. You can, in some cases, restrict the write access through user/role permissions (the analytics team only has read access to that table), but that may not work depending on your use case (but it usually does work).
> >
> > One comment from Benjamin’s comment below. There is one scenario where the Trigger could guarantee the data makes it to both tables, specifically if both tables reside in the same keyspace and have the same partition key(s). Mutations in the same keyspace on tables that have the same partition key are internally to Cassandra merged into a single internal Mutation and always applied atomically. So, if you had an exactly same schema for your second table and it resides in the same keyspace (mytable and mytable_analytics, say, both in mykeyspace) your trigger could duplicate the mutation to the source table to be an exact copy into the second table and Cassandra will apply these both atomically (they both succeed or they both fail - never just one). In this scenario, the analytics team could modify data in the second table and not effect the data in the source table.
> >
> > ---->Brian
> >
> > > On Dec 15, 2020, at 7:38 AM, pauloricardomg <pa...@gmail.com> wrote:
> > >
> > > To extend Paul's point, datacenters in cassandra are logical
> > > concepts which may be useful for your use case and do not
> > > necessarily need to be represented by physical data centers.
> > >
> > > The presentation mentioned by Andrew, while helpful, covers some
> > > concepts which are specific to Hadoop and may be outdated in more
> > > recent versions of Cassandra.
> > >
> > > I'd recommend two more recent presentations on the multi-DC topic:
> > > -
> > > https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fww
> > > w.slideshare.net%2FDataStax%2Fapache-cassandra-multidatacenter-essen
> > > tials-julien-anguenot-iland-internet-solutions-c-summit-2016&amp;dat
> > > a=04%7C01%7Cgolive%40microsoft.com%7C9de8a9d3369f4934c45508d8a0f93cf
> > > 6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637436339671302694%7C
> > > Unknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik
> > > 1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=AtpoZGyBAOGYrSwHGtC8D7UySR4bxP
> > > 4pIPwkWB3vytU%3D&amp;reserved=0
> > > -
> > > https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fww
> > > w.slideshare.net%2FDataStax%2Foperations-consistency-failover-for-mu
> > > ltidc-clusters-alexander-dejanovski-the-last-pickle-cassandra-summit
> > > -2016&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9d3369f4934c4
> > > 5508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C63743633
> > > 9671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luM
> > > zIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=3a5jlc%2BMv6IckwJ
> > > CEDLMzurkICg829go%2BTU52HNPiX8%3D&amp;reserved=0
> > >
> > > Finally, if you have any more questions on this I'd recommend you
> > > send them to the user@cassandra.apache.org mailing list as this
> > > mailing list (
> > > dev@cassandra.apache.org) is related to the project development of
> > > Cassandra.
> > >
> > >> Em ter., 15 de dez. de 2020 às 09:28, Greg Oliver
> > >> <go...@microsoft.com.invalid> escreveu:
> > >>
> > >> Can't see it in the email. What's the slide #?
> > >>
> > >> From: Andrew Cobley (Staff) <a....@dundee.ac.uk>
> > >> Sent: Tuesday, December 15, 2020 12:26 PM
> > >> To: dev@cassandra.apache.org
> > >> Subject: [EXTERNAL] Re: Triggers
> > >>
> > >> Yes that's right.  I remember this illustration:
> > >>
> > >> [Diagram  Description automatically generated]
> > >>
> > >>
> > >> From this presentation:
> > >>
> > >> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fw
> > >> ww.slideshare.net%2Frastrick%2Fpresentation-12982302&amp;data=04%7C
> > >> 01%7Cgolive%40microsoft.com%7C9de8a9d3369f4934c45508d8a0f93cf6%7C72
> > >> f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637436339671302694%7CUnkno
> > >> wn%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haW
> > >> wiLCJXVCI6Mn0%3D%7C1000&amp;sdata=vINBSIM5G2WYkF0RpvYvGadBJ5b8LCigK
> > >> EZsH7s2Ra0%3D&amp;reserved=0<
> > >> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fw
> > >> ww.slideshare.net%2Frastrick%2Fpresentation-12982302&amp;data=04%7C
> > >> 01%7Cgolive%40microsoft.com%7C9de8a9d3369f4934c45508d8a0f93cf6%7C72
> > >> f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637436339671302694%7CUnkno
> > >> wn%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haW
> > >> wiLCJXVCI6Mn0%3D%7C1000&amp;sdata=vINBSIM5G2WYkF0RpvYvGadBJ5b8LCigK
> > >> EZsH7s2Ra0%3D&amp;reserved=0
> > >>>
> > >>
> > >> Might help.
> > >>
> > >> Andy
> > >>
> > >> [University of Dundee shield logo]<
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> > >> d.ac.uk%2Fsig-home&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > >> a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > >> %7C0%7C637436339671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > >> DAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > >> UCsPPZsn00NOQbZtCQQemL8%2BUKrcjR%2BkYbletbFAUTU%3D&amp;reserved=0
> > >>>
> > >>
> > >>
> > >> 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.cobley@dundee.ac.uk<mailto:
> > >> a.e.cobley@dundee.ac.uk>
> > >> [University of Dundee Facebook]<
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> > >> d.ac.uk%2Fsig-fb&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> > >> C0%7C637436339671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=op
> > >> oI%2Fy8MQGUoZUf4JLNSwO0AXvo%2BSPgmlCrMDYqxfVA%3D&amp;reserved=0>
> > >> [University of Dundee Twitter] <
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> > >> d.ac.uk%2Fsig-tw&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> > >> C0%7C637436339671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Pf
> > >> UixxwmmdsvAAgIOtFAmvCWBAuyZHHxaDF7a7EI0J8%3D&amp;reserved=0>
> > >> [University of Dundee LinkedIn] <
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> > >> d.ac.uk%2Fsig-li&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> > >> C0%7C637436339671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=4p
> > >> kmZtJbfmOhYEUqHVHuNqJ82sKffi55UlNoqRM9iYU%3D&amp;reserved=0>
> > >> [University of Dundee YouTube] <
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> > >> d.ac.uk%2Fsig-yt&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> > >> C0%7C637436339671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=b6
> > >> WDU5BQ2MPxdUXMV7svX7GwwoA2o9dxVTaH30SUlWw%3D&amp;reserved=0>
> > >> [University of Dundee Instagram] <
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> > >> d.ac.uk%2Fsig-ig&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> > >> C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=xO
> > >> 3aYY76pRSXudHj0fMwreYc9WE%2BL9WvFUVSOpT3Xr0%3D&amp;reserved=0>
> > >> [University of Dundee Snapchat] <
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> > >> d.ac.uk%2Fsig-sc&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> > >> C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=fM
> > >> BdqlVnUrZ8LY8KTe4RfmkWT%2BQqFQ0hkbNN%2F0Cz0s8%3D&amp;reserved=0
> > >>>
> > >> One of the UK's top 20 universities<
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> > >> d.ac.uk%2Fsig-strapline&amp;data=04%7C01%7Cgolive%40microsoft.com%7
> > >> C9de8a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db4
> > >> 7%7C1%7C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4w
> > >> LjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;s
> > >> data=%2Fm6vL%2FpEWhutdwcVmEksANunJ71ufHH7BSMleW6vxpM%3D&amp;reserve
> > >> d=0
> > >>>
> > >> The Guardian University Guide 2021
> > >> [Covid code of conduct icons]<
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> > >> d.ac.uk%2Fsig-cvc&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a
> > >> 9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%
> > >> 7C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMD
> > >> AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=u
> > >> gYXppAj6idOsHR38kfycILz4TzzUTX3ncPqXIr9HEQ%3D&amp;reserved=0
> > >>>
> > >>
> > >>
> > >> From: Paul Chandler <pa...@redshots.com>>
> > >> Date: Tuesday, 15 December 2020 at 12:16
> > >> To: dev@cassandra.apache.org<ma...@cassandra.apache.org> <
> > >> dev@cassandra.apache.org<ma...@cassandra.apache.org>>
> > >> Subject: Re: Triggers
> > >> Hi Greg,
> > >>
> > >> Andy is talking about Cassandra datacenters, which can easily be co
> > >> located in the same physical datacenter.
> > >>
> > >> Paul
> > >>
> > >>> On 15 Dec 2020, at 12:10, Greg Oliver
> > >>> <golive@microsoft.com.INVALID
> > >> <ma...@microsoft.com.INVALID>> wrote:
> > >>>
> > >>> That's great in theory, but what if your customer is a national
> > >> government (they require their data to remain within their borders)
> > >> and there aren't enough DC's in nation to support multiple DC data distribution?
> > >>>
> > >>> To get the throughput needed (say - if the government announces a
> > >>> new
> > >> program and 30M people try to sign up at the same time) CQRS seems
> > >> a likely part of the solution.
> > >>>
> > >>> With Cassandra (and I'm definitely new to it), as I learn more it
> > >>> looks
> > >> like a set of materialized views might be a way to achieve the goal.
> > >>>
> > >>> Thoughts?
> > >>>
> > >>> From: Andrew Cobley (Staff) <a.e.cobley@dundee.ac.uk<mailto:
> > >> a.e.cobley@dundee.ac.uk>>
> > >>> Sent: Tuesday, December 15, 2020 11:57 AM
> > >>> To: dev@cassandra.apache.org<ma...@cassandra.apache.org>
> > >>> Subject: [EXTERNAL] Re: Triggers
> > >>>
> > >>> 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]<
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> > >> d.ac.uk%2Fsig-home&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > >> a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > >> %7C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > >> DAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > >> cemMScOW969CviEM%2F8FOddPPREJKdxP5SGIsJEHjAr4%3D&amp;reserved=0
> > >> <
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> > >> d.ac.uk%2Fsig-home&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8
> > >> a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1
> > >> %7C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> > >> DAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> > >> cemMScOW969CviEM%2F8FOddPPREJKdxP5SGIsJEHjAr4%3D&amp;reserved=0
> > >>>>
> > >>>
> > >>>
> > >>> 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.cobley@dundee.ac.uk<mailto:
> > >> a.e.cobley@dundee.ac.uk<mailto:a.e.cobley@dundee.ac.uk%
> > >> 3cmailto:a.e.cobley@dundee.ac.uk>>
> > >>> [University of Dundee Facebook]<
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> > >> d.ac.uk%2Fsig-fb&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> > >> C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=my
> > >> 43KF0x8a7Cfw1Mxw89vgzev2V4IE77unYI63GN5%2FM%3D&amp;reserved=0
> > >> <
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> > >> d.ac.uk%2Fsig-fb&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> > >> C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=my
> > >> 43KF0x8a7Cfw1Mxw89vgzev2V4IE77unYI63GN5%2FM%3D&amp;reserved=0>>
> > >> [University of Dundee Twitter] <
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> > >> d.ac.uk%2Fsig-tw&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> > >> C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=hS
> > >> 23WW9TkmlvBaHTDLjhRD%2FfIxMfPnBaemqI6g69i1s%3D&amp;reserved=0
> > >> <
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> > >> d.ac.uk%2Fsig-tw&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=mu
> > >> RPgCkCk9F9BNnTAaZGMFihOoV6Jp9ao9hyOftVhBI%3D&amp;reserved=0>>
> > >> [University of Dundee LinkedIn] <
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> > >> d.ac.uk%2Fsig-li&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=g7
> > >> qWH7kEBgcFAFuOxxnplwbk2EOQoq1bkpL3Y04FJe4%3D&amp;reserved=0
> > >> <
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> > >> d.ac.uk%2Fsig-li&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=g7
> > >> qWH7kEBgcFAFuOxxnplwbk2EOQoq1bkpL3Y04FJe4%3D&amp;reserved=0>>
> > >> [University of Dundee YouTube] <
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> > >> d.ac.uk%2Fsig-yt&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=vh
> > >> MK%2BRhhGpltjgJE6qsmn4sdyuKPqbiBLfpKOMryQ3o%3D&amp;reserved=0
> > >> <
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> > >> d.ac.uk%2Fsig-yt&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=vh
> > >> MK%2BRhhGpltjgJE6qsmn4sdyuKPqbiBLfpKOMryQ3o%3D&amp;reserved=0>>
> > >> [University of Dundee Instagram] <
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> > >> d.ac.uk%2Fsig-ig&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Jq
> > >> J0aOaMVjlOIHozWuZG0tjC2GX%2BMbC%2Fon2ZSduahEQ%3D&amp;reserved=0
> > >> <
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> > >> d.ac.uk%2Fsig-ig&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Jq
> > >> J0aOaMVjlOIHozWuZG0tjC2GX%2BMbC%2Fon2ZSduahEQ%3D&amp;reserved=0>>
> > >> [University of Dundee Snapchat] <
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> > >> d.ac.uk%2Fsig-sc&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=rw
> > >> i61R76R0b6rciwyDC7xzZDZy3GJDkTET%2BC5Em1KcI%3D&amp;reserved=0
> > >> <
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> > >> d.ac.uk%2Fsig-sc&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9
> > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7
> > >> C0%7C637436339671332559%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=WV
> > >> 2DT5Kwq3VEiw8IMZBlzJ0TNFXnV%2F%2F1puvkaacCjH8%3D&amp;reserved=0
> > >>>>
> > >>> One of the UK's top 20 universities<
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> > >> d.ac.uk%2Fsig-strapline&amp;data=04%7C01%7Cgolive%40microsoft.com%7
> > >> C9de8a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db4
> > >> 7%7C1%7C0%7C637436339671332559%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4w
> > >> LjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;s
> > >> data=J8FCwXqHWyAUzE4fLi1QHAg01nD9amvfAF5IhrYtggc%3D&amp;reserved=0
> > >> <
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> > >> d.ac.uk%2Fsig-strapline&amp;data=04%7C01%7Cgolive%40microsoft.com%7
> > >> C9de8a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db4
> > >> 7%7C1%7C0%7C637436339671332559%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4w
> > >> LjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;s
> > >> data=J8FCwXqHWyAUzE4fLi1QHAg01nD9amvfAF5IhrYtggc%3D&amp;reserved=0
> > >>>>
> > >>> The Guardian University Guide 2021 [Covid code of conduct icons]<
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> > >> d.ac.uk%2Fsig-cvc&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a
> > >> 9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%
> > >> 7C0%7C637436339671332559%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMD
> > >> AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=X
> > >> 8YSo1DfxxYxAmz%2BHGrEPM9ymBKSYLthhK4ZWCUr8Ss%3D&amp;reserved=0
> > >> <
> > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo
> > >> d.ac.uk%2Fsig-cvc&amp;data=04%7C01%7Cgolive%40microsoft.com%7C9de8a
> > >> 9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%
> > >> 7C0%7C637436339671332559%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMD
> > >> AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=X
> > >> 8YSo1DfxxYxAmz%2BHGrEPM9ymBKSYLthhK4ZWCUr8Ss%3D&amp;reserved=0
> > >>>>
> > >>>
> > >>>
> > >>> From: Benjamin Lerer <benjamin.lerer@datastax.com<mailto:
> > >> benjamin.lerer@datastax.com<mailto:benjamin.lerer@datastax.com%
> > >> 3cmailto:benjamin.lerer@datastax.com>>>
> > >>> Date: Tuesday, 15 December 2020 at 11:50
> > >>> To: dev@cassandra.apache.org<mailto:dev@cassandra.apache.org<mailto:
> > >> dev@cassandra.apache.org%3cmailto:dev@cassandra.apache.org>> <
> > >> dev@cassandra.apache.org<mailto:dev@cassandra.apache.org<mailto:
> > >> dev@cassandra.apache.org%3cmailto: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
> > >>> <golive@microsoft.com.invalid
> > >> <mailto:golive@microsoft.com.invalid<mailto:golive@microsoft.com.in
> > >> valid% 3cmailto:golive@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
> > >>
> > >>
> > >> -------------------------------------------------------------------
> > >> -- To unsubscribe, e-mail:
> > >> dev-unsubscribe@cassandra.apache.org<mailto:
> > >> dev-unsubscribe@cassandra.apache.org>
> > >> For additional commands, e-mail: dev-help@cassandra.apache.org<mailto:
> > >> dev-help@cassandra.apache.org>
> > >>
> > >> The University of Dundee is a registered Scottish Charity, No:
> > >> SC015096
> > >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@cassandra.apache.org
> > For additional commands, e-mail: dev-help@cassandra.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@cassandra.apache.org
> For additional commands, e-mail: dev-help@cassandra.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cassandra.apache.org
For additional commands, e-mail: dev-help@cassandra.apache.org