Its Time to go Back to the Monoliths. Use Modular Monolith, save costs

Поділитися
Вставка
  • Опубліковано 10 чер 2024
  • Modular monoliths are often a better option for your application. These are not the monoliths of old, these are dynamic and powerful tools that surpass microservices in most metrics. In this video we will discover what it means to have a modular monolith (as opposed to older monoliths). How we can apply them today and why they can scale.
    Check out the full post at debugagent.com/is-it-time-to-...
    Title: Its Time to go Back to the Monoliths. Save costs with Modular Monolith
    --------------
    👉 Twitter: / debugagent
    👉 LinkedIn: / shai-almo. .
    👉 Website: debugagent.com/
    👉 GitHub: github.com/shai-almog
    👉 Mastodon: mastodon.social/@debugagent
    ---------------
    #monolithic #monoliths #monolith #microservices #microservice #java #springboot #module #modules #modular #scalability #scalable #distributed #distributedsystems #softwarearchitecture #softwaredeveloper #softwareengineering #softwareasaservice
    monolith vs microservices architecture,microservices,microservices architecture,microservices in java,microservices spring boot,microservices architecture patterns,microservices tutorial,microservices vs monolithic,microservices vs monolithic pros and cons,monolith scalability,scaling monolith,modulith spring,modular monolith,monolith,observability,distributed transactions,microservices spring boot tutorial,software architecture,microservice architecture,monoliths
    00:00 Introduction
    00:21 Everything old is new again
    01:15 Do Monoliths Scale Well?
    02:04 Modern Monolith
    02:14 Modulith
    03:31 Layered Architecture Revisited
    04:41 Module Annotations
    05:28 Enforced Decoupling
    06:01 Automated Documentation
    06:13 Infrastructure as Code
    06:37 Microservices Complexity
    07:10 Costs should trend down
    07:26 Java Platform Module System (Jigsaw)
    07:48 Maven Modules
    08:23 Scaling a Monolith
    09:22 Reduce observability costs
    10:17 Database Bottleneck
    11:26 Transactions vs. Eventual Consistency
    11:50 Raw Performance
    12:13 Complexity in the "Right Place"
    12:40 Microservices work best with dynamic languages
    12:58 Kubernetes lit the fire
    14:24 Start with Monolith
    15:05 Final Word
  • Наука та технологія

КОМЕНТАРІ • 36

  • @gusik89
    @gusik89 Рік тому +8

    I could not agree more with your analysis. In an age when fiber-optic reaching practically everywhere and hardware is attainable enough that practically anyone can ran a decent server in their basement a lot of hype is created by so called big tech to sell more services and they keep getting expensive. Of course they do a lot to implement vendor locking tools and technologies, as well. Hence, server-less, microservices and more. Of course, these have their use cases. But if you are a company that continually runs high loads and pays 100K a month to a cloud provider with your serverless and microservices you might be better of having a data center in the basement of your company with a monolith.

    • @jonahacquah2785
      @jonahacquah2785 8 місяців тому +3

      The cost of that decision could be far greater. I think too often we worry about how much is paid to the cloud provider without considering the risk to the revenue. If 100k rakes in 100million in revenue, it’s worth it.

  • @luciusartoriusdante
    @luciusartoriusdante 6 місяців тому +1

    After working with microservices for almost a year now I was beginning to reconsider monoliths for new projects - moduliths sound like something I definitively want to learn more about!

  • @kahnfatman
    @kahnfatman 8 місяців тому +2

    Hello renegades! This video deserves a lot of deep thoughts. You struck on the nail regarding religious mindset -- Microservice Architecture is not the silver bullet for every company, but sure is for tech companies and tech agencies. What would they do they companies don't tear down their functional stuff??

  • @compateur
    @compateur Рік тому +3

    I always had the idea that microservices were pushed by companies that benefit from these architectures. They came up with the narrative of all the advantages that microservices bring and most developers have swallowed these arguments, almost religiously, as the truth.
    Thank you for your analysis. I totally agree with your assessment.
    Modularity can be accomplished in many ways. In the early days we had JEE/Corba and DCOM in order to create a distributed component architecture. We nalso had OSGi, which I liked a lot.
    To my surprise I do see that Apache Karaf, an OSGi implementation, is called a Modulith runtime nowadays. Is this the revival of OSGi?

    • @debugagent
      @debugagent  Рік тому

      100%. Everything old is new again. Back in the day I wasn't a fan of the complexity in OSGi. In retrospect it is much simpler than a lot of the crazy architectural hoops we need to pass through.

  • @lambda-dev
    @lambda-dev Рік тому +2

    Awesome analysis. I agree with the monolith-first approach. When using microservices, debugging can also be very difficult when events are sent from one to antoher.
    One reason for a microservice would be for a very fault-resistant part of the application that needs to be better isolated, but that's rather an exception.
    Although there are many advantages of monoliths, I see some challenges: Longer load and run times in the IDE, when the whole application needs to be loaded. Maybe there are options to just load and run a single module? How do teams work together and avoid merge conflicts?

    • @debugagent
      @debugagent  Рік тому +1

      Funny you should mention that because I'm dropping a sequel tomorrow that goes deeper on microservices...

    • @debugagent
      @debugagent  Рік тому +1

      FYI the video I mentioned is now available here: ua-cam.com/video/PrFZB9NqZ5E/v-deo.html

  • @alexisdamnit9012
    @alexisdamnit9012 7 місяців тому +1

    Everyone who only read the title to Amazon’s article is on the monolith train

  • @genericdeveloper3966
    @genericdeveloper3966 8 місяців тому +1

    Good points. Though I'm learning k8s and terraform right now and will be making money in microservices as long as web apps are using that architecture.

    • @debugagent
      @debugagent  8 місяців тому

      I think Kubernetes some very valid use cases in the very high end.

  • @phoenicianathletix2866
    @phoenicianathletix2866 Рік тому +1

    for a video page if the video file is served from Database A and the stats(views, likes,comments etc) of that video was served from Database B is that doable in the Modular Monolith?

    • @debugagent
      @debugagent  Рік тому +1

      Sure. You can do that in a regular monolith too. You can have multiple databases in a single monolith. It isn't as rare as one would think, many monoliths have both SQL and Redis (or memcached) which are separate databases technically.

    • @phoenicianathletix2866
      @phoenicianathletix2866 Рік тому +1

      Wow ok so SQL is for the video file and Redis for the video stats?

    • @debugagent
      @debugagent  Рік тому

      @@phoenicianathletix2866 Sure. You can do that. You can use block storage for the file or any other type of storage. You can even use two SQL databases e.g. if you have a service that tracks everything, you would want a time series DB like QuestDB. But it might not be what you want for the general storage where you might want to go with a more conservative storage.
      Spring and Microprofile support such a deployment where you can bind to multiple data-sources.

  • @piyushmishra889
    @piyushmishra889 7 місяців тому

    When number of microservices increases its become difficult to know where and in which repo you have the code to work with. A developer start coding in different repo when he sees new microservice

  • @rommellagera8543
    @rommellagera8543 Місяць тому

    I hope also, one day, Devs doing manual testing makes a comeback, it forces you to system wide thinking and business domain knowledge
    You cannot properly test what you don't understand

  • @ramireznoy
    @ramireznoy 8 місяців тому +1

    I am failing to see how is any of that "different" this time... He is just describing any modular architecture. The vast majority of web Frameworks are constructed around those concepts from the beginning. Django, Symfony, Ruby on Rails and yes, also Spring. In fact, microservices are just an evolution of that modular architecture, the main difference been the ability to run it in a separated node. In a way, any monolith using a DB and some mailer service, is also a microservice architecture
    So, what's the new stuff?

    • @debugagent
      @debugagent  8 місяців тому

      Historic monoliths were focused on layered architecture as opposed to standalone modules (similar to microservices). A company could rearchitect their monolith to use modules in the past but there was no way to enforce that efficiently and effectively. Spring Modulith (which recently reached 1.0) is a tool that both enforces that separation and provides a lightweight event bus (instead of MOMs). That's one thing that changed.
      Another thing is a change in mindshare. I figure that by now we all have enough real world experience with microservices, this has shown both the problems and the advantages of that approach. My second focus here is to show how the advantages can be a part of a monolith as well and are not exclusive to a microservice architecture.

  • @probuilderai
    @probuilderai 7 місяців тому

    I have been around for just as long - not sure why their is an assumption that monoliths of old were not modular.

    • @debugagent
      @debugagent  7 місяців тому

      Are you referring to things such OSGI or just informal project organization?
      Famously, monoliths at companies like Ebay, Amazon etc. were just divided based on layers and were difficult to maintain due to that division. OSGI garnered excitement, but I never ran into a project that actually used it for backend in all my years as a consultant. The main thing I'm talking about are standardized approaches for modularity that allow enforcing the module boundaries. These existed before but are only starting to gain awareness/traction recently.

  • @hansgeorgzojer6345
    @hansgeorgzojer6345 2 місяці тому

    a big disadvantage of a monolith in big applications still is, that you cannot upgrade individual parts of your application one by one. New hibernate version? All or nothing! New Spring version? All or nothing! Moving from jpa to jakarta persistence? All or nothing! New UI framework version? All or nothing! And you also need a very good test coverage or: all or nothing must be tested manually, unless you can afford production testing by the end user.

    • @debugagent
      @debugagent  2 місяці тому

      I would argue those are advantages. It's a matter of perspective. E.g. on microservices we have a hodgepodge of versions and features with very little standardization. No enforcement or control. A new vulnerability comes out... Our team needs to go through everything and hope that everything is clear and documented. It might be reasonable if we have an army of developers but for a more moderate team just updating the main project pom is so much simpler.
      It's interesting that you mention testing... Integration tests are FAR simpler with a monolith, I barely need to set stuff up to get amazing coverage. With Microservices it means I need to bring up a cloud of complexity just for a simple integration test. Then there's the test failures which are absolutely unreadable. Unit tests are simpler in Microservices but that's a bit of a misdirection because they don't cover as much.

  • @morgadoapi4431
    @morgadoapi4431 8 місяців тому +1

    Weird that it took you so long to realize this.

  • @DivineMisterAdVentures
    @DivineMisterAdVentures 8 місяців тому

    Has Monular / Modulith neo-architecture been responsible for the infuriating data drop we've been noticing growing in Corp Service Front-ends? Who you are and what you're responding to gets dropped entirely between an email link with full purpose and engagement, and you winding up on just another Home Page with another log-in. Typically. The dirty shell game is hiding the customer support, or the proffered "free" deal, or actual terms of service, or to opt-out of auto-renewal, etc. I would think Architecture plays no role. Maybe security, and for sure bait and switch.