Monolith vs SOA vs MicroServices and when to use what

Sdílet
Vložit
  • čas přidán 5. 08. 2024
  • In "Monolith vs SOA vs MicroServices and when to use what" I show you the basics of each of these architectures.
    A podcast version of the channel can be found here: anchor.fm/fredrik-christenson

Komentáře • 37

  • @mubashirhasan2329
    @mubashirhasan2329 Před 4 lety +13

    this was so easily explained. I remember reading an online article some time back but could understand nothing. Thank you Frederik!

  • @LeducDuSapin
    @LeducDuSapin Před 4 lety +25

    I would strongly disagree with the notion, that the only difference between microservices and SOA is the size of the services, although it is true, that microservices are smaller.
    If your microservices call other services directly via http calls, you end up with a distributed monolith, because these services are now tightly coupled. This is something you want to avoid. As you point out, MS brings also organisational benefits, as every service can be developed and deployed (somewhat) independently. This is much harder to achieve, when they are coupled.
    Also deprecate, replace, or split an existing service is much harder, when there are dependent services.
    Microservices should only communicate via a message bus or, even better, event sourcing, like Apache Kafka. In that way, kafka is the only dependency the microservice has.
    In your example the user and book service would send a message for each user and book they create and update through the message bus. The orders service would then store a copy of the users and the books in its own database. Perhaps not the entirety of the object, just the properties it needs.
    As an additional benefit the orders service can serve the request much quicker, as it does not need to wait for the responses of the books and users service (which in turn could also call other services and so on)

    • @austin.valentine
      @austin.valentine Před rokem

      You are right. He is assuming that you write all the functions in the code the same way and that just isn’t true. I think a lot of service orientation principles are beneficial in monolith applications as well for maintenance reasons, and you could give yourself the option of breaking them out, but this seems to be an anachronistic approach to the differences in these architectures.
      Also, microservices are just an option for implementing service orientation principles that provide service autonomy, independent scaling, and more agility.

  • @AstorSkywalker
    @AstorSkywalker Před rokem

    Finally I understand why the different paradigms

  • @kerau8435
    @kerau8435 Před rokem

    I found your explanation really helpful! Saludos, from Argentina :)

  • @srs.shashank
    @srs.shashank Před 3 lety

    Very clearly explained in a simple Language. Thanks Fredrik, keep it up!

  • @xhian7719
    @xhian7719 Před 3 lety

    I've been looking for this explanation all day. Thank you

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

    Amazing! I am a new huge fan of yours! Thank you so much for showing the code to go with the explanations.

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

    I follow too many programming related youtube channels, and most of them just talk...
    I'm going to unsubscribe from them, because at this stage they are just a distraction. Thanks Fredrik, for actually educating me.
    You and my mentor are the only one's that showed me the real path.

  • @tonykelly7616
    @tonykelly7616 Před 3 lety

    Great video, pretty sure you just completely cured my microservices FOMO

  • @burnmodafoca
    @burnmodafoca Před 2 lety

    Very well explained. Thank you so much.

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

    interesting topic and very good descriptions!

  • @behnamvakili7239
    @behnamvakili7239 Před 2 lety

    Well explained! Thanks.

  • @moqpoq
    @moqpoq Před 3 lety

    Love it!

  • @jvminhell
    @jvminhell Před 4 lety

    Great video, do you recommend some good book about SOA?

  • @yi-feitsai1310
    @yi-feitsai1310 Před 2 lety

    It is really usefull!! thanks

  • @TheDesvendador
    @TheDesvendador Před 4 lety

    great video as usual, do you have some material suggestions about architecture for beginners?

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

      For an introduction I suggest you Google "layered software architecture".
      This is the most common architecture there is in web work.
      Software Architecture Patterns by Mark Richards will walk you through the standard patterns but I warn you, this is not junior level knowledge.
      Nothing that book will teach you will be useful to you until you are over the beginner stage and it is time for you to take on the role of a senior.
      The layered architecture is good enough for most juniors.
      Chances are that you will never work with anything else.

  • @mak9856
    @mak9856 Před 2 lety

    SOA uses middleware as well, so that services can talk with one another, Micro-ervices dont need them. just API calls , also in Microservice architecture, each service has its own local DB, and these DBs are synchronised.

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

    Would love to have more videos on SOA, like how do you choose how to split the monolith and how to deal with the network calls has @Dawid Dahl asked. I was pretty naive on this, thinking that async/await + errors would just be enough ...

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

      I can make a video on how to think around splitting.
      The basic idea is to ask these three questions:
      1. What are we optimizing for?
      2. What will be the technical impact of splitting?
      3. How should we split to create as few dependencies as we can?
      Running a successful SOA comes down to understanding good architecture and how the company works.
      Get any of these two things wrong and your reward will be more bugs and a slower delivery process.
      It takes experience to answer these questions well.

    • @flaviuse
      @flaviuse Před 4 lety

      @@FredrikChristenson thank you for your answer, I would be very interested on a video on how you think about splitting.
      Those questions are a great start and from my very limited experience start to understand that without an extensive knowledge on the company it's really hard to answer them. Thank you again for those videos you are really helping me in my journey into becoming a professional :)

  • @sandeeproy3126
    @sandeeproy3126 Před 3 lety

    Hey I am planning to develop a clash of clans style mobile game as a free time project , which among this 3 architecture will you recommend , Thank you

    • @FredrikChristenson
      @FredrikChristenson  Před 3 lety

      Start with a monolith. As a default it is the best option and when the system grows transition in to SOA.

    • @sandeeproy3126
      @sandeeproy3126 Před 3 lety

      @@FredrikChristenson thank you , but only SOA not microservice

    • @FredrikChristenson
      @FredrikChristenson  Před 3 lety

      Without extensive experience you will fail at MicroServices. The difference between SOA and MicroServices are very small and the benefits usually only found at very large scale development. Not something you will have to care about when starting your company.

  • @danielkrajnik3817
    @danielkrajnik3817 Před 3 lety

    4:30 hasn't Sun pioneered cloud computing? why would you say that all they created was monoliths?

  • @hermanplatou
    @hermanplatou Před 3 lety

    Great video, but i feel as if you have glanced over some of the major benefits of a distributed architecture (this includes SOA and MSA).
    What about scaling?
    Continuous integration and deployment?
    The developer experience might be greater / easier with a monolith, but there are also other organisational and business needs that are more important than this.

    • @FredrikChristenson
      @FredrikChristenson  Před 3 lety

      Fully agree. There are many things to consider and the monolith is not a choice for a scaling company as it has drawbacks that can't be solved without moving to SOA or similar architectures.
      However this video is simply intended to give an overview of when each of these architectures may be a good choice.
      For a more in depth look at the benefits there are many resources that will help someone understand those benefits.

  • @alxx736
    @alxx736 Před 3 lety

    Why SOA cant deploy independent ¿ In your example you could deploy Order.js without deploying the rest right?

    • @FredrikChristenson
      @FredrikChristenson  Před 3 lety

      ofc SOA ca be deployed independently. SOA and MicroServices are almost the same thing and most things true for MicroServices is true for SOA.

    • @alxx736
      @alxx736 Před 3 lety

      @@FredrikChristenson SOA and Microservices are like bible for me . Depend who you talk with , depend the article you read , each of them understand them differently but no one them ia wrong . Theory about this is driving me crazy !!

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

      This indicates that you are not at a point in your career where you should get deep in to the theory of MicroServices.
      To keep it simple, MicroServices are a form of SOA with more rules for how to do things. Most companies use SOA and only few use MicroServices because not all companies benefit from following the extra rules.

  • @rajmiglani4159
    @rajmiglani4159 Před 4 lety

    Where does ESB come in SOA?

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

      ESB is a type of SOA architecture but it is not requried to be part of a SOA system.
      Usually you use a ESB in SOA when you want to pass messages between services.
      I have some videos coming up that will show how queues work in this type of system.

  • @newsnetworkz
    @newsnetworkz Před rokem

    Good except the title should have been CDN system design.