Applying the Saga Pattern • Caitie McCaffrey • GOTO 2015

Sdílet
Vložit
  • čas přidán 27. 07. 2024
  • This presentation was recorded at GOTO Chicago 2015. #gotocon #gotochgo
    gotochgo.com
    Caitie McCaffrey - Distributed Systems Diva at Twitter ‪@CaitieMcCaffrey‬
    RESOURCES
    x.com/caitie
    / caitie-mccaffrey-7831379b
    github.com/CaitieM20
    www.caitiem.com
    ABSTRACT
    As we build larger more complex applications and solutions that need to do collaborative processing the traditional ACID transaction model using coordinated 2-phase commit is often no longer suitable. More frequently [...]
    Download slides and read the full abstract here:
    gotocon.com/chicago-2015/prese...
    / gotochgo
    / gotoconference
    #DistributedSystems #SagaPattern
    Looking for a unique learning experience?
    Attend the next GOTO conference near you! Get your ticket at gotopia.tech
    Sign up for updates and specials at gotopia.tech/newsletter
    SUBSCRIBE TO OUR CHANNEL - new videos posted almost daily.
    czcams.com/users/GotoConf...
  • Věda a technologie

Komentáře • 111

  • @t529615
    @t529615 Před 11 měsíci +6

    Great presentation. Still relevant in 2023 👍

  • @mrbharatmehta
    @mrbharatmehta Před 6 lety +23

    Very helpful presentation. Saved me a lot of effort in understanding why and how Saga is used for orchestrating a transaction

  • @laytonmiller5865
    @laytonmiller5865 Před 6 lety +12

    Finally, the slides and the video at the same time. Also, excellent presentation. Very knowledgeable.

  • @nmuta1
    @nmuta1 Před 6 lety +4

    This talk will be relevant for a while as we all are looking into various ways forms of asynchronous data, multiple data streams, and complex dependencies in transactions . Love this talk !!!!!

  • @iloveyeseul
    @iloveyeseul Před 5 lety +14

    what a clear presentation!! Thanks to your talk, i figure out what saga pattern is and could imagine what redux-saga does. Thx again!!

  • @jjong
    @jjong Před 6 lety +2

    So much comprehensive explanation that irresistibly leads me to understand what saga is

  • @legiogallica
    @legiogallica Před 5 lety +7

    Very clearly and thoroughly explained, thank you.

  • @jch.254
    @jch.254 Před 8 lety +13

    Fantastic presentation! Thanks

  • @programming6881
    @programming6881 Před rokem +1

    Wonmderful talk! Very articulate and the examples are excellent. Thanks for sharing this.

  • @cvetkovicslobodan
    @cvetkovicslobodan Před 11 měsíci +2

    Nice talk, still valid in 2023. :)

  • @ValeriyaSerdyukova
    @ValeriyaSerdyukova Před 7 měsíci +1

    Awesome talk. Thanks for a great presentation

  • @perkimon
    @perkimon Před 5 lety +4

    This presentation made Saga's click for me. Nice one.

  • @rahulchakraborty626
    @rahulchakraborty626 Před 5 lety +3

    Awesome Presentation. Very well explained . Thanks !!

  • @markomilenkovic2714
    @markomilenkovic2714 Před 4 lety +2

    That was a great presentation, thank you Caitie

  • @abhilashbandi3866
    @abhilashbandi3866 Před 4 lety +2

    Blown away!!! Thank you :)

  • @pontusdevelopment9284
    @pontusdevelopment9284 Před 5 lety +7

    Need to learn the Saga Pattern for my first developer job, and this video was certainly a superb starting point!
    Seldom does new concepts click as fast and easily as this one did after watching your talk.
    Thank you, Caitie!

    • @brucewayne2480
      @brucewayne2480 Před 4 lety

      hi , it's been a year so what other ressources did you use to learn more about saga pattern ? thanks

    • @seol1500
      @seol1500 Před 2 lety

      @@brucewayne2480 microservices pattern, other than that checkout a book by martin kleppmann

  • @Viniter
    @Viniter Před 6 lety +1

    Very well explained and practical!

  • @HafizQutaiba
    @HafizQutaiba Před 7 lety +2

    Good talks, well explained. Thanks

  • @markosfragkakis4984
    @markosfragkakis4984 Před 5 lety +1

    Very good presentation, thank you

  • @dorelbarbu9453
    @dorelbarbu9453 Před 2 lety +1

    Very good presentation! Thanks for sharing!

  • @sergeyberezovskiy8921
    @sergeyberezovskiy8921 Před 5 lety +13

    Great to watch at 0.75 speed!

    • @jimlaredo8864
      @jimlaredo8864 Před 5 lety +1

      It all depends - worked for me at 1.25

    • @davidc24994
      @davidc24994 Před 5 lety +2

      Yep She speaks too fast for non - natives I think :)

    • @user-hr8ny3di3r
      @user-hr8ny3di3r Před 5 lety +1

      ​@@davidc24994​, yes, she does, but she speaks clearly and doesn't swallow words' endings. To my surprise, it was comprehensible. And awesome as well!

    • @logarythm591
      @logarythm591 Před 3 lety

      lool

  • @izebit
    @izebit Před 6 lety +1

    Thank a lot for a good explanation of saga. All are clear, even for me

  • @ravikumarmistry
    @ravikumarmistry Před 2 lety +1

    this is a very amazing talk. Thankyou

  • @MrTractor01
    @MrTractor01 Před 8 lety +5

    Very impressive! Interesting topic that was explained and illustrated well and the presentation was right on point.

  •  Před rokem +1

    Excellent talk.

  • @CFXplosive
    @CFXplosive Před 4 lety +2

    Although it is a bit fast, and some background knowledge is assumed, it's a great presentation ... Thanks !!

  • @technoarte
    @technoarte Před 8 lety +110

    What a smart engineer. Well explained! Thanks.

  • @ahmadtinku
    @ahmadtinku Před 6 lety +1

    Awesome talk ! Thanks

  • @sfontesv
    @sfontesv Před 6 lety +1

    Very nice talk! Thanks

  • @willemojnr
    @willemojnr Před 3 lety +1

    Great talk. I learnt some new things.

  • @partyY2Hard
    @partyY2Hard Před 6 lety +1

    Good job. Thanks,

  • @computerex
    @computerex Před 7 lety +6

    Fantastic talk

  • @TowhidIslam
    @TowhidIslam Před rokem +1

    Awesome 👍😀

  • @thecrazychosid
    @thecrazychosid Před 3 lety +1

    Fantastic.

  • @dhaferbenali5302
    @dhaferbenali5302 Před 3 lety +1

    Great talk. Thx !

  • @XibaXela
    @XibaXela Před 3 lety +4

    Two questions
    1. The presenter says they are using Azure Service Bus as a log. How does this work? I don't understand how a queue would be a useful way to store log information.
    2. They mention a "CP log", what does that mean in this context?

  • @sujeetagrahari5274
    @sujeetagrahari5274 Před 3 lety +2

    My Ears didn't breathe at all watching whole talk 😂

  • @delprofundo
    @delprofundo Před 5 lety +1

    haha thank you! exactly the guidance I needed.

  • @alexpiper4773
    @alexpiper4773 Před 4 lety

    Many thanks 👍👍👍👍

  • @thegrumpydeveloper
    @thegrumpydeveloper Před rokem

    Cool this is workflows and is implemented in things like temporal in 2023. Still wish it were easier to implement but we’re getting there.

  • @ornous
    @ornous Před 7 lety +3

    Very cool talk. Thanks very much! (:

  • @chrismaandhika
    @chrismaandhika Před 6 lety +1

    What if the Saga Log node fails? I think from her presentation, the Saga Log node is not allowed to fail.

  • @parrottsquawk975
    @parrottsquawk975 Před 4 lety +1

    15:45 Don't be the person that interrupts someone in the middle of their presentation!

  • @GiveMeAnOKUsername
    @GiveMeAnOKUsername Před 3 lety

    So load data into big bucket and then, at leisure, process and parcel out to store. On fail, retry. This is similar to CQRS except with that the big bucket is kept around and considered to be the database.

  • @aneeinaec
    @aneeinaec Před 2 lety +1

    Smart!

  • @limitless9483
    @limitless9483 Před 4 lety

    I don't see the relationship between this and redux-saga, but hey I watched the full thing and maybe, later on, I might come back and laugh at how stupid I was :) great speech.

  • @jimlaredo8864
    @jimlaredo8864 Před 5 lety +2

    What techniques did you use to achieve idempotency in your scenarios? - Great talk!

  • @Bugslamor
    @Bugslamor Před 2 lety +1

    Jeez I was just trying to make ajax calls from my web page. Great talk though !

  • @marvinalone
    @marvinalone Před 2 lety +1

    0.75x speed is perfect!

  • @mostafav12
    @mostafav12 Před 6 lety +1

    An excellent presentation, but I have a question, consider T1 for booking hotel runs without problem and we call T2 start, at this moment another service that creates reports for hotels starts to sending new booking records to hotels, but T2 fails and we runs c2 and c1, how should we handle this kind of exceptions?

    • @renatoargh
      @renatoargh Před 5 lety

      This report will be eventually consistent, after C1 finishes running. This is my understanding, at least.

    • @quangtung2912
      @quangtung2912 Před 3 lety

      @@renatoargh or i think another approach is we will have a third state like 'processing'. And in the happy flow we must send 2 request, one for normal transaction processing, another for converting 'processing' to 'accepted' state. So the report query only use records with the 'accepted' state.
      This pattern as I remember is called 'semantic locking' found in the Microservices Patterns book.

  • @pranjalagnihotri6072
    @pranjalagnihotri6072 Před 4 lety

    This talk is based on the paper 09:03

  • @goldenking2046
    @goldenking2046 Před 5 lety +2

    So if I'm understanding correctly: in order for the Saga to survive the Coordinator dying, either the forward transaction or the compensating transaction must be idempotent. However in the example of email, neither seems to be the case. Obviously sending out the email is not idempotent, nor would I want to flood the customer's inbox with hundreds of "disregard the last email" messages if the compensating action needs to be retried.

    • @GiveMeAnOKUsername
      @GiveMeAnOKUsername Před 3 lety

      Only send one email.

    • @LimitedWard
      @LimitedWard Před 2 lety +1

      What's stopping you from sending a second email? That sort of thing happens all the time with e-commerce sites. You get one email with your order confirmation and another later when the order has shipped. You may also receive an email saying your order was cancelled or the shipment was delayed. All of those are valid compensations for the original email(s).

  • @saeidh.2033
    @saeidh.2033 Před 3 lety +1

    An LLT is a saga if it can be written as a sequence of transactions that can be interleaved *with other transactions*. What the presenter mentioned at 10:11 (the one gotcha that sub-transactions cannot depend on one another .. T2 cannot take input from T1) is not correct!

  • @ravir5630
    @ravir5630 Před 6 lety +1

    she keeps mentioning about the paper. Do people read many published papers? How do I know which kickass concept I have to use? It must be published somewhere in a paper?

    • @bicatu
      @bicatu Před 5 lety

      they are usually the source of some of the trends for more complex patterns. It is good after you read a blog or presentation to see in more details and get your own conclusion for your domain.

  • @gannalyo0015
    @gannalyo0015 Před 6 lety +3

    Beautiful. Then, are there translations for Chinese? Thank you.

  • @wildknowledge4816
    @wildknowledge4816 Před 3 lety +1

    Ohohoho! Perfect explanation. Now I can do my homework )) I'll borrow a couple of your slides if you don't mind of course. Thx!

  • @basilio100
    @basilio100 Před 5 lety +1

    I wonder if this pattern (transaction idempotentcy) can be applied in financial world? Probably it will be more complex solution - if you for example do fund transfer, how would your system retry if transaction failed...Also how compensation will work?

    • @davidc24994
      @davidc24994 Před 5 lety

      Hi Basilio100, Maybe then you need to add a bit of logic there and identify your transaction with an ID, e.g see if you have already applied this ID rollback... What do you think?

    • @basilio100
      @basilio100 Před 5 lety +1

      @@davidc24994 don't know. I did few POC projects, used correlation Id to mark transactions... All is not so easy...

  • @supermajic
    @supermajic Před 5 lety +1

    This didn't click last time I watched this, this time it's like I already understood the whole thing. When did I actually learn it lol.

  • @hydtechietalks3607
    @hydtechietalks3607 Před 4 lety

    Looks like a great fan base here for her... God Save them!

  • @rajeshg3570
    @rajeshg3570 Před 2 lety +2

    nice explanation and slides. i'm wondering where is the saga state stored if it's not in SEC?

  • @user-ee2cp5ex4i
    @user-ee2cp5ex4i Před 4 lety +1

    My english is terrible but she is great even for me all was understandably

  • @samchebbs7399
    @samchebbs7399 Před 4 lety +1

    Totally stupid question - how do you achieve idempotency when you are making a totally new car/hotel/flight booking? Wouldn't that be a POST request? a new entry in db of the remote service? and POST is not idempotent.

    • @samchebbs7399
      @samchebbs7399 Před 4 lety +1

      .. and i got my answer :P - medium.com/@saurav200892/how-to-achieve-idempotency-in-post-method-d88d7b08fcdd

    • @quangtung2912
      @quangtung2912 Před 3 lety

      Some kind of request_id for request deduplicating. But how to generate it reliable in a distributed manner even in the case of Coordinator crash is not an easy task :))

  • @HanifCarroll
    @HanifCarroll Před 3 lety

    25:43 Doesn't it make sense t hat it's always the best game they've ever had? Doesn't seem that people are likely to be as upset or call in if you got their stats wrong on a game that they played terribly.

  • @ChaojianZhang
    @ChaojianZhang Před 2 lety

    21:38 What if the compensating request fail😂

    • @cvetkovicslobodan
      @cvetkovicslobodan Před 11 měsíci

      This is very important actually. You need to capture that compensating transaction failed and mark it for manual intervention to fix it manually. Also, you can have a retry mechanism in place that could help but not always, manual intervention might still be needed. Sometimes even manual intervention could be hard to do as some other events are already applied some changes to that resource so it can become quite challenging to get back to a consistent state in this case.

  • @bimalgrg8951
    @bimalgrg8951 Před 5 lety +4

    came from redux-saga docs ... didn't understand

    • @Greenthum6
      @Greenthum6 Před 4 lety +1

      Yup it was like watching how to build a skyscraper when you need to build a doghouse.

    • @SunsetRacer
      @SunsetRacer Před 3 lety

      same! :(

    • @eolculnamo2
      @eolculnamo2 Před 3 lety

      As far as I can tell, the Sagas discussed here and Redux Sagas are two very different concepts.

  • @rahmanandika612
    @rahmanandika612 Před 5 lety

    cantik

  • @user-dp3ye8hd4l
    @user-dp3ye8hd4l Před 2 lety

    뭔말이냐이게

  • @gogoubai
    @gogoubai Před 7 lety +1

    Good explanation, but why you talk way too fast as if you on the run ?

    • @JeremyAndersonBoise
      @JeremyAndersonBoise Před 6 lety +4

      Gogo Ubari I am sure they didn’t give her an unlimited amount of time to make the presentation, maybe she has a lot to say?

    • @Ins3rtN4m3H3r3
      @Ins3rtN4m3H3r3 Před 6 lety +6

      Most people, including professional developers, don't have public speaking as their day job. She was perfectly understandable the way she presented it.

  • @jamiro85it
    @jamiro85it Před 7 lety +4

    nothing new in the distributed transaction world. same old concepts execute/undo with an appealing name

  • @realB12
    @realB12 Před 8 lety +18

    Great content but TERRIBLE Speaker: Comme on, we are ment to work on a global scale. So do not speak the way you would speak for a bunch of local American-Friends in a TacoBell . Get dressed, sneeze and moderate your talking speed, please!

    • @lennahc1925
      @lennahc1925 Před 7 lety +26

      comments about attire aside, if you don't like the video's speed, you can slow it down by clicking 'settings' in the bottom right, and selecting 'speed'.
      there just isn't a speed that's appropriate for everyone--I'm a native speaker, so I prefer quicker speakers. I think the best option is for the speaker to speak however fast they want, and then let the users decide at what speed they wish to listen.

    • @_lede
      @_lede Před 7 lety +39

      seriously, a tech guy commenting about the attire? what about male presenters on shorts and t-shirts? I dont find the dress too bad. and the presentation is pretty good too. like +lennahc said you can slow the speed and turn on the caption.

    • @MrKlaygomes
      @MrKlaygomes Před 7 lety +3

      René Baron as a non English native speaker I felt uncomfortable with her speed, but it is still a good talk by the way

    • @MrKlaygomes
      @MrKlaygomes Před 7 lety +1

      Ps. It is not possible slow down video speed on mobile devices :(

    • @samir_485
      @samir_485 Před 7 lety +15

      Well I do agree that the speaker talks fast, but it didn't bother me much and I'm not a native speaker. She speaks clearly and loud enough and honestly I prefer this to those 2-hour long talks where the speaker is more concerned about his developer tales and jokes than the subject of the talk.