Spring Tips: Spring Modulith

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024

Комментарии • 56

  • @djxak
    @djxak 4 месяца назад +11

    I think "reliable event bus" deserves its own project, unrelated to Modultith. It would be wonderful to be able to just add a starter to the project and have fault-tolerant ApplicationEvents out of the box.

  • @Anshulkatta
    @Anshulkatta 18 дней назад +2

    i have no idea how nodejs and python are doing this, spring makes it so easy for Java

  • @parthokr
    @parthokr 5 месяцев назад +4

    Java ecosystem is thriving with spring lately.

  • @mrowox
    @mrowox 4 месяца назад +1

    Okay so I have watched a lof of talks about moduliths from the SpringIO conference and from the Spring developer channel and while most of them were all talks and going indepth, this video is actually the one i love most because it actually examples. Short but really relevant examples. Now I feel like I have better understanding of the Spring Modulith project. Thank you very much Long...

  • @Anderson-bz7fm
    @Anderson-bz7fm 5 месяцев назад +20

    One little doubt. How to rollback the first part of transaction if needed?

    • @speedbreaker5642
      @speedbreaker5642 5 месяцев назад +1

      We need to trigger a compensating transaction. When @Async is used it is altogether runs under different thread and in different transaction.

    • @samuelvishesh
      @samuelvishesh 4 месяца назад +1

      Use SAGA pattern to handle loosely distributed transactions such as these.

    • @djxak
      @djxak 4 месяца назад +1

      And when the compensating transaction fails for whatever reason, we need to trigger a compensating transaction for a compensating transaction. :) Oh, I miss the good old times..

    • @speedbreaker5642
      @speedbreaker5642 4 месяца назад +3

      @@djxak everything comes with a price.

    • @Sir0fficerNasty
      @Sir0fficerNasty 4 месяца назад

      It's a big doubt. It requires proper planning around events and know which can be async and which should be synchronous transactions (all-or-nothing).

  • @pr0master
    @pr0master 5 месяцев назад +3

    Why is the Java Jigsaw module system completely ignored?

  • @pavelbazin8734
    @pavelbazin8734 4 месяца назад

    Great explanation, on point and with working example. Thank you so much!

  • @khalildureidy
    @khalildureidy 5 месяцев назад +4

    as always, super amazing!! 🇵🇸🇵🇸🇵🇸

  • @RickDkkrd
    @RickDkkrd 3 месяца назад

    Thanks for a very useful introduction, as always

  • @ВоробійВіталій
    @ВоробійВіталій 4 месяца назад +1

    Thanks, indeed very useful module.

  • @xenoterracide
    @xenoterracide 5 месяцев назад +3

    The reason why you also support a layered architecture in addition to a vertical architecture is because, and I've seen people do this, they access certain types of code in the wrong spots because their compiler gave them access to it. Also you can have layered code that you don't want to expose to a higher level of module. Not everything in my model needs to be accessible at the controller level. Here's a good example, It is a good design to use getters and setters with hibernate in order to facilitate appropriate lazy loading when dealing with collections and joins, hibernate has yet to support fully immutable objects. So I make package protected setters, I do not want my controller calling my setters... They are simply there to facilitate hibernate. If I need to set something I should use a more domain oriented method.
    Now, should everything go into a top-level controller package with no sub packages? No that's not a good idea.
    I think we should be doing both vertical and horizontal slicing. A decent question is though... Should it be, say, registration.controller or controller.registration?
    As far as other concerns with public types... There's JPMS and it should be getting used. If you really really want to hide your public types you should be using jpms. If you can't use JPMS please go open bugs with the relevant projects or comment on the existing ones that you want this because they seem to be under the impression that people don't want compile time safety and non-transient dependencies Only. Which spring modulus doesn't appear to deal with? The problem of transient library dependencies getting pulled on to my compile time class path which I've seen in the real world result in people directly using code that later broke because they depended on something directly that we didn't intend to depend on directly. Probably because their IDE suggested it.

    • @boredbytrash
      @boredbytrash 12 дней назад

      Layered architecture is not best practice anymore. I see what you’re saying is completely right but nowadays you think more in Onion/Hexagonal architecture but the point remains: all architectural patterns are there to control data flow as well as support dependency inversion.

  • @danielmachadovasconcelos877
    @danielmachadovasconcelos877 5 месяцев назад +2

    It's a pretty nice video! It's nice to see spring boot evolution.
    Could this also work with Apache Kafka?

  • @kosnowman
    @kosnowman 2 месяца назад

    this is wonderful, you gave me a great idea to test it out, the demo is amazing!

  • @Ant-s3b
    @Ant-s3b 4 месяца назад +1

    Can you fit in Webflux in a meaningful way? Let's say you have a handler module with a listener that has a reactive complex flow, do you gain any benefits from that? A new event will start a new reactive chain so probably we don't gain anything?

  • @javadahmadzadeh7129
    @javadahmadzadeh7129 Месяц назад

    Thanks a lot! It was really great demo

  • @kevinmaltby4202
    @kevinmaltby4202 22 дня назад

    Can similar if not the same things be achieved with Spring integration with respect to messaging between independent components of a system?

  • @anisulislam306
    @anisulislam306 5 месяцев назад

    What about separate datasource per module? Would be nice to have per module decoupled and isolated datasource configuration.

  • @hansmuster5291
    @hansmuster5291 4 месяца назад +3

    multiple classes in 1 file, my eyes are bleeding 😱

  • @arnaudpoutieu1331
    @arnaudpoutieu1331 5 месяцев назад

    Many thanks Josh for such lovely content! 🙏🏿

  • @at5517
    @at5517 3 месяца назад

    How it will work when we scale like when we have more than one instance of services.

  • @cbmeeks
    @cbmeeks 5 месяцев назад

    Would Spring Modulith be a good fit for a small workflow type project?

  • @ronaldgarciavazquez8232
    @ronaldgarciavazquez8232 5 месяцев назад

    Muchísimas gracias, aunque no entiendo porque tantas dependencias pero sigo aprendiendo el modulith.. Saludos

  • @asterixcode
    @asterixcode 4 месяца назад

    how do you get autocompletion/suggestions in the application.properties by just typing springd at 4:43 for example?

  • @SwapnilNakate7
    @SwapnilNakate7 5 месяцев назад

    nicely put

  • @francescocorbosiero1624
    @francescocorbosiero1624 3 месяца назад

    where is the code brother? :(
    incredible content btw

  • @prdoyle
    @prdoyle 5 месяцев назад

    Great stuff!

  • @augustoangelvivaldelli6975
    @augustoangelvivaldelli6975 4 месяца назад

    ApplicationModuleListener is being deprecated

  • @ganeshbabu8263
    @ganeshbabu8263 5 месяцев назад +1

    What is your first fav place on the internet ?

  • @LaserowyWódz
    @LaserowyWódz 5 месяцев назад

    How to handle pressure in Scrum Sprints as a Java Developer

    • @RickDkkrd
      @RickDkkrd 3 месяца назад +1

      Conduct bi-weekly bare-fist fight ceremonies after your retros with your dev team and your pm. Scrum is an expansible framework after all.

  • @kid1412621
    @kid1412621 5 месяцев назад

    Micro services in monolith?

  • @SonysonyYnos
    @SonysonyYnos 5 месяцев назад

    it was so damn nice !

  • @avalagum7957
    @avalagum7957 5 месяцев назад

    Lombok is not preferred anymore: that is understandable
    curl was used instead of httpie: why?

    • @simongeard4824
      @simongeard4824 5 месяцев назад +1

      I prefer HTTPie myself, but I suspect the answer is that Curl is installed on pretty much every command-line environment you'll ever need to access.

    • @avalagum7957
      @avalagum7957 5 месяцев назад

      @@simongeard4824 Your reply makes me wonder if there's a single binary execution for httpie and there is. I used to install it like a python app.

    • @adambickford8720
      @adambickford8720 5 месяцев назад +1

      Lombok isn't going anywhere any time soon; java is years behind without it
      cUrl is the defacto standard, most tools work with it

  • @jameskimani3574
    @jameskimani3574 5 месяцев назад +1

    what a loaded 38 minutes!

  • @xenoterracide
    @xenoterracide 5 месяцев назад

    If you want to call them the same name you could put them in a different package... And then use jpms to control what you export... 😂 And then you'll have to fully qualify your package name. I wish Java had type aliases... Because every library has a Component class... You say that you want that but if you actually did it you'd realize on any significantly large code base you would run into the problem of trying to open the right type with your IDE and being frustrated with your auto completion. So that's not only about Java but your IDE and general human readability.

  • @boredbytrash
    @boredbytrash 12 дней назад

    Your programming style is interesting, but don’t forget: you’re working alone.
    Youngsters, make sure to always put Maintainability at the front. Your current as well as future coworkers will appreciate it.
    Putting 20 classes and records into one file looks fancy in this video but is hell for teams bigger than 2…

  • @sandrodelacruz8125
    @sandrodelacruz8125 5 месяцев назад

    Decoupled, not decomposed.

  • @xenoterracide
    @xenoterracide 5 месяцев назад

    Now having watched this whole thing. I feel like the only convincing usage of it is for the documentation purposes. I'm actually a bit concerned about how smart it is since you were showing it throwing errors on internal packages. Arguably makes using jpms for more control harder. Jpms will enforce only exported packages be be accessible. In other words an internal package is always an internal package and you can't access it outside of that jar as long as you don't export the internal package. Perhaps another video covering modulith with jpms And enforcing that things like jpa annotations aren't accessible on your controller... Of course this assumes that you can get jpms working. I'm about to take another pass on that and my code and see what spring boot is throwing these days.

    • @mrowox
      @mrowox 4 месяца назад

      I dont think that is an error that would make the overall application not to start. I think its just a way to verify if you are doing things right. I am not so sure, I haven't tried out any spring modulith codebase