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 <stefan.mikloso...@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&data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637436339671292733%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=pdsbvfRORRGz23mqPOUwSl%2Bn6NUdp%2BH3qM2WX%2FCWz0k%3D&reserved=0 This will be firstly introduced in 4.0. Stefan On Tue, 15 Dec 2020 at 13:49, Brian Hess <brianmh...@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 <pauloricard...@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&dat > > a=04%7C01%7Cgolive%40microsoft.com%7C9de8a9d3369f4934c45508d8a0f93cf > > 6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637436339671302694%7C > > Unknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik > > 1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=AtpoZGyBAOGYrSwHGtC8D7UySR4bxP > > 4pIPwkWB3vytU%3D&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&data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9d3369f4934c4 > > 5508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C63743633 > > 9671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luM > > zIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=3a5jlc%2BMv6IckwJ > > CEDLMzurkICg829go%2BTU52HNPiX8%3D&reserved=0 > > > > Finally, if you have any more questions on this I'd recommend you > > send them to the u...@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 > >> <gol...@microsoft.com.invalid> escreveu: > >> > >> Can't see it in the email. What's the slide #? > >> > >> From: Andrew Cobley (Staff) <a.e.cob...@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&data=04%7C > >> 01%7Cgolive%40microsoft.com%7C9de8a9d3369f4934c45508d8a0f93cf6%7C72 > >> f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637436339671302694%7CUnkno > >> wn%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haW > >> wiLCJXVCI6Mn0%3D%7C1000&sdata=vINBSIM5G2WYkF0RpvYvGadBJ5b8LCigK > >> EZsH7s2Ra0%3D&reserved=0< > >> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fw > >> ww.slideshare.net%2Frastrick%2Fpresentation-12982302&data=04%7C > >> 01%7Cgolive%40microsoft.com%7C9de8a9d3369f4934c45508d8a0f93cf6%7C72 > >> f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637436339671302694%7CUnkno > >> wn%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haW > >> wiLCJXVCI6Mn0%3D%7C1000&sdata=vINBSIM5G2WYkF0RpvYvGadBJ5b8LCigK > >> EZsH7s2Ra0%3D&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&data=04%7C01%7Cgolive%40microsoft.com%7C9de8 > >> a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1 > >> %7C0%7C637436339671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM > >> DAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata= > >> UCsPPZsn00NOQbZtCQQemL8%2BUKrcjR%2BkYbletbFAUTU%3D&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.cob...@dundee.ac.uk<mailto: > >> a.e.cob...@dundee.ac.uk> > >> [University of Dundee Facebook]< > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo > >> d.ac.uk%2Fsig-fb&data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9 > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7 > >> C0%7C637436339671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=op > >> oI%2Fy8MQGUoZUf4JLNSwO0AXvo%2BSPgmlCrMDYqxfVA%3D&reserved=0> > >> [University of Dundee Twitter] < > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo > >> d.ac.uk%2Fsig-tw&data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9 > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7 > >> C0%7C637436339671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Pf > >> UixxwmmdsvAAgIOtFAmvCWBAuyZHHxaDF7a7EI0J8%3D&reserved=0> > >> [University of Dundee LinkedIn] < > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo > >> d.ac.uk%2Fsig-li&data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9 > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7 > >> C0%7C637436339671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=4p > >> kmZtJbfmOhYEUqHVHuNqJ82sKffi55UlNoqRM9iYU%3D&reserved=0> > >> [University of Dundee YouTube] < > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo > >> d.ac.uk%2Fsig-yt&data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9 > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7 > >> C0%7C637436339671302694%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=b6 > >> WDU5BQ2MPxdUXMV7svX7GwwoA2o9dxVTaH30SUlWw%3D&reserved=0> > >> [University of Dundee Instagram] < > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo > >> d.ac.uk%2Fsig-ig&data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9 > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7 > >> C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=xO > >> 3aYY76pRSXudHj0fMwreYc9WE%2BL9WvFUVSOpT3Xr0%3D&reserved=0> > >> [University of Dundee Snapchat] < > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo > >> d.ac.uk%2Fsig-sc&data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9 > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7 > >> C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=fM > >> BdqlVnUrZ8LY8KTe4RfmkWT%2BQqFQ0hkbNN%2F0Cz0s8%3D&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&data=04%7C01%7Cgolive%40microsoft.com%7 > >> C9de8a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db4 > >> 7%7C1%7C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4w > >> LjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&s > >> data=%2Fm6vL%2FpEWhutdwcVmEksANunJ71ufHH7BSMleW6vxpM%3D&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&data=04%7C01%7Cgolive%40microsoft.com%7C9de8a > >> 9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1% > >> 7C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMD > >> AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=u > >> gYXppAj6idOsHR38kfycILz4TzzUTX3ncPqXIr9HEQ%3D&reserved=0 > >>> > >> > >> > >> From: Paul Chandler <p...@redshots.com<mailto:p...@redshots.com>> > >> Date: Tuesday, 15 December 2020 at 12:16 > >> To: dev@cassandra.apache.org<mailto:dev@cassandra.apache.org> < > >> dev@cassandra.apache.org<mailto:dev@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 > >>> <gol...@microsoft.com.INVALID > >> <mailto:gol...@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.cob...@dundee.ac.uk<mailto: > >> a.e.cob...@dundee.ac.uk>> > >>> Sent: Tuesday, December 15, 2020 11:57 AM > >>> To: dev@cassandra.apache.org<mailto:dev@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&data=04%7C01%7Cgolive%40microsoft.com%7C9de8 > >> a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1 > >> %7C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM > >> DAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata= > >> cemMScOW969CviEM%2F8FOddPPREJKdxP5SGIsJEHjAr4%3D&reserved=0 > >> < > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo > >> d.ac.uk%2Fsig-home&data=04%7C01%7Cgolive%40microsoft.com%7C9de8 > >> a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1 > >> %7C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM > >> DAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata= > >> cemMScOW969CviEM%2F8FOddPPREJKdxP5SGIsJEHjAr4%3D&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.cob...@dundee.ac.uk<mailto: > >> a.e.cob...@dundee.ac.uk<mailto:a.e.cob...@dundee.ac.uk% > >> 3cmailto:a.e.cob...@dundee.ac.uk>> > >>> [University of Dundee Facebook]< > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo > >> d.ac.uk%2Fsig-fb&data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9 > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7 > >> C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=my > >> 43KF0x8a7Cfw1Mxw89vgzev2V4IE77unYI63GN5%2FM%3D&reserved=0 > >> < > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo > >> d.ac.uk%2Fsig-fb&data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9 > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7 > >> C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=my > >> 43KF0x8a7Cfw1Mxw89vgzev2V4IE77unYI63GN5%2FM%3D&reserved=0>> > >> [University of Dundee Twitter] < > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo > >> d.ac.uk%2Fsig-tw&data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9 > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7 > >> C0%7C637436339671312644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=hS > >> 23WW9TkmlvBaHTDLjhRD%2FfIxMfPnBaemqI6g69i1s%3D&reserved=0 > >> < > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo > >> d.ac.uk%2Fsig-tw&data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9 > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7 > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=mu > >> RPgCkCk9F9BNnTAaZGMFihOoV6Jp9ao9hyOftVhBI%3D&reserved=0>> > >> [University of Dundee LinkedIn] < > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo > >> d.ac.uk%2Fsig-li&data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9 > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7 > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=g7 > >> qWH7kEBgcFAFuOxxnplwbk2EOQoq1bkpL3Y04FJe4%3D&reserved=0 > >> < > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo > >> d.ac.uk%2Fsig-li&data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9 > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7 > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=g7 > >> qWH7kEBgcFAFuOxxnplwbk2EOQoq1bkpL3Y04FJe4%3D&reserved=0>> > >> [University of Dundee YouTube] < > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo > >> d.ac.uk%2Fsig-yt&data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9 > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7 > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=vh > >> MK%2BRhhGpltjgJE6qsmn4sdyuKPqbiBLfpKOMryQ3o%3D&reserved=0 > >> < > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo > >> d.ac.uk%2Fsig-yt&data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9 > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7 > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=vh > >> MK%2BRhhGpltjgJE6qsmn4sdyuKPqbiBLfpKOMryQ3o%3D&reserved=0>> > >> [University of Dundee Instagram] < > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo > >> d.ac.uk%2Fsig-ig&data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9 > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7 > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Jq > >> J0aOaMVjlOIHozWuZG0tjC2GX%2BMbC%2Fon2ZSduahEQ%3D&reserved=0 > >> < > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo > >> d.ac.uk%2Fsig-ig&data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9 > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7 > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Jq > >> J0aOaMVjlOIHozWuZG0tjC2GX%2BMbC%2Fon2ZSduahEQ%3D&reserved=0>> > >> [University of Dundee Snapchat] < > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo > >> d.ac.uk%2Fsig-sc&data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9 > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7 > >> C0%7C637436339671322604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=rw > >> i61R76R0b6rciwyDC7xzZDZy3GJDkTET%2BC5Em1KcI%3D&reserved=0 > >> < > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo > >> d.ac.uk%2Fsig-sc&data=04%7C01%7Cgolive%40microsoft.com%7C9de8a9 > >> d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7 > >> C0%7C637436339671332559%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA > >> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=WV > >> 2DT5Kwq3VEiw8IMZBlzJ0TNFXnV%2F%2F1puvkaacCjH8%3D&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&data=04%7C01%7Cgolive%40microsoft.com%7 > >> C9de8a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db4 > >> 7%7C1%7C0%7C637436339671332559%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4w > >> LjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&s > >> data=J8FCwXqHWyAUzE4fLi1QHAg01nD9amvfAF5IhrYtggc%3D&reserved=0 > >> < > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo > >> d.ac.uk%2Fsig-strapline&data=04%7C01%7Cgolive%40microsoft.com%7 > >> C9de8a9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db4 > >> 7%7C1%7C0%7C637436339671332559%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4w > >> LjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&s > >> data=J8FCwXqHWyAUzE4fLi1QHAg01nD9amvfAF5IhrYtggc%3D&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&data=04%7C01%7Cgolive%40microsoft.com%7C9de8a > >> 9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1% > >> 7C0%7C637436339671332559%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMD > >> AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=X > >> 8YSo1DfxxYxAmz%2BHGrEPM9ymBKSYLthhK4ZWCUr8Ss%3D&reserved=0 > >> < > >> https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fuo > >> d.ac.uk%2Fsig-cvc&data=04%7C01%7Cgolive%40microsoft.com%7C9de8a > >> 9d3369f4934c45508d8a0f93cf6%7C72f988bf86f141af91ab2d7cd011db47%7C1% > >> 7C0%7C637436339671332559%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMD > >> AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=X > >> 8YSo1DfxxYxAmz%2BHGrEPM9ymBKSYLthhK4ZWCUr8Ss%3D&reserved=0 > >>>> > >>> > >>> > >>> From: Benjamin Lerer <benjamin.le...@datastax.com<mailto: > >> benjamin.le...@datastax.com<mailto:benjamin.le...@datastax.com% > >> 3cmailto:benjamin.le...@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 > >>> <gol...@microsoft.com.invalid > >> <mailto:gol...@microsoft.com.invalid<mailto:gol...@microsoft.com.in > >> valid% 3cmailto:gol...@microsoft.com.invalid>>> > >>> wrote: > >>> > >>>> Hi all, > >>>> > >>>> My customer wants to use Cassandra together with the CQRS > >>>> pattern. This > >> is > >>>> to say, they want to separate reads and writes to different > >>>> tables, potentially in different keyspace or database. > >>>> > >>>> In my experience with relational databases I would set up a > >>>> trigger on > >> the > >>>> "write" table such that on new row & update row events, a similar > >>>> row > >> would > >>>> be inserted into the "read" table. > >>>> > >>>> I found a few examples of setting up a trigger on a Cassandra > >>>> table and have replicated that on my system. But in reading the > >>>> various Stack Overflow posts on the topic a persistent message > >>>> saying "don't do it > >> unless > >>>> you really know what you're doing" pops up. > >>>> > >>>> Why? What are the cases for and against using triggers in Cassandra? > >> What > >>>> are the edge cases to avoid? What is the happy path? > >>>> > >>>> Thanks, > >>>> Greg > >>>> > >>> > >>> The University of Dundee is a registered Scottish Charity, No: > >>> SC015096 > >> > >> > >> ------------------------------------------------------------------- > >> -- To unsubscribe, e-mail: > >> dev-unsubscr...@cassandra.apache.org<mailto: > >> dev-unsubscr...@cassandra.apache.org> > >> For additional commands, e-mail: dev-h...@cassandra.apache.org<mailto: > >> dev-h...@cassandra.apache.org> > >> > >> The University of Dundee is a registered Scottish Charity, No: > >> SC015096 > >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@cassandra.apache.org > For additional commands, e-mail: dev-h...@cassandra.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@cassandra.apache.org For additional commands, e-mail: dev-h...@cassandra.apache.org