I used a Monorepo for 12 months - here’s my opinion

แชร์
ฝัง
  • เผยแพร่เมื่อ 31 พ.ค. 2024
  • Should you consider using a monorepo or rather stick with polyrepos? In this video, I would like to talk about my experience using a monorepo, how versioning with Git would work the best, what to avoid, and some personal suggestions for those who want to try it out.
    Consider supporting the channel by clicking the "Thanks" button ❤️
    🙌 Become my Patreon and get exclusive perks: / softdevdiaries
    💼 Follow me on LinkedIn and drop me a message if you'd like: / gusgadirov
    💻 Also, let's connect on GitHub: github.com/gusgad
    📚 Resources:
    Microsoft's huge monorepo: devblogs.microsoft.com/bharry...
    Trunk Based Development: trunkbaseddevelopment.com/
    🕒 Timestamps:
    (0:00) Why we don't like monorepos but still use it?
    (03:27) Best way to use a monorepo
    (07:04) Downsides of monorepos
    (08:17) My 2 cents
    And don't forget to subscribe for more videos like this 😊
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 25

  • @sabya56
    @sabya56 9 หลายเดือนก่อน +6

    Thanks. Please keep posting more such content.

  • @alfabetatest
    @alfabetatest หลายเดือนก่อน +1

    Actually one of the most reflected opinions regarding this topic I've seen so far.
    [Imho] Both approaches can become doomed, and both can lead to great success-stories. In my experience the biggest benefit of small independent repos is their atonomy, their biggest downside is their tendency to create dependency-hell (or it's weaker cousin, orphaned projects, which are still in use). On the other hand the biggest strength of monorepos is their ability to show the whole picture, unfortunately they tend to rely on heavy tooling as their biggest downside. [/imho]
    Unfortunately I see a trend in the last 5 years, especially in the JS/TS community, to build tooling which only serves a their language and don't support propper support for other tool-chains. This is really bad for monorepos, since one of the key-ideas of such a setup is to not constrain you too much on the language. (Buck/Bazel/Gradle/Nx [mostly language independent] vs. TurboRepo/Lerna [heavily relying on one language]). Another pain-point can be to maintain languages which (by default) rely on a specific structure of repositories or directories, like golang...

  • @user-iq1fc3ii2j
    @user-iq1fc3ii2j 8 หลายเดือนก่อน +1

    thanks man you explain very well, but I have a small question what if I have to deploy multiple services with mono repo using CICD, should I wait till a service is done and then execute the next one or is there a way to deploy them at same time?

    • @SoftwareDeveloperDiaries
      @SoftwareDeveloperDiaries  8 หลายเดือนก่อน +1

      That's a really good question. It depends on your requirements: do your services depend on each other for ex. is there a specific setup that has to be finished or maybe some library is being used from a parent service? If there is no dependency then you can deploy them in parallel, otherwise you have to configure your pipelines to do it sequentially.

    • @nanonkay5669
      @nanonkay5669 7 หลายเดือนก่อน

      I've been wondering about that too. I think you should be able to set up your CI/CD jobs in such a way that allows for parallel execution. If there are any dependencies, you can set up a job that runs only when the dependency is done and ready. Idk but this is what makes sense to me

  • @user-zy2zx1nv8d
    @user-zy2zx1nv8d 5 หลายเดือนก่อน

    Why only 1 team on a monorepo. I would assume we just resolve the merge conflicts with the clashing team? What do you think?

  • @austinvalentine7307
    @austinvalentine7307 5 หลายเดือนก่อน +1

    Isn't a monorepo for team a separate issue that team can decide without other teams that make direct updates to included submodules even needing to know about it? In other words, a monorepo is an extra aggregating repo that simply allows you to deal with multiple independent repos together. So it doesn't destroy anything by making it available. Am I missing something?

  • @kavinduvindikasomadasa352
    @kavinduvindikasomadasa352 2 หลายเดือนก่อน

    How can I configure the mono repository to use same package in each and every project ? Let’s say we have our UI and API projects in mono repo, both written in JS. Now how can we make both to use same package version ? Because each of them have it’s own package.json to manage its own dependencies, right ?

    • @David-gj6dc
      @David-gj6dc หลายเดือนก่อน

      You want to search for workspaces. npm and all the other major package managers have a way to do this.

  • @buddy.abc123
    @buddy.abc123 9 หลายเดือนก่อน +5

    Once a while the TH-cam algorithm recommends a great channel. Now is such a time.
    Nice to meet you - keep posting great content

  • @mikami5799
    @mikami5799 หลายเดือนก่อน +2

    no more than one team use monorepo, what??? Super confused. Are you suggesting multi-repo instead of MONOrepo? How can a company only has one team???

  • @evamotto9276
    @evamotto9276 8 หลายเดือนก่อน +5

    My main issue with Monorepos is the required config. If you can't understand the config from a quick-glance, get rid of it! Because when the author leaves the team, you're screwed. Web development is 50% config hacking these days

    • @SoftwareDeveloperDiaries
      @SoftwareDeveloperDiaries  8 หลายเดือนก่อน +2

      Good point

    • @ehm-wg8pd
      @ehm-wg8pd 6 หลายเดือนก่อน +2

      i just studied nx and turborepo, migrating it require me to study specific configuration for each, and doesnt work at first try, definetly learning curve

    • @incarnateTheGreat
      @incarnateTheGreat 6 หลายเดือนก่อน +4

      I used Next with Nx and it wasn't that bad, to be honest. Worked well with Vercel, as well.
      Also, people shouldn't own projects, applications, or features. These should be documented so they can be shared and picked up by other Devs in the case that someone leaves, it can be easily picked up.

    • @evamotto9276
      @evamotto9276 6 หลายเดือนก่อน +1

      @@incarnateTheGreat Agree 100% with that last statement.

  • @imranzunzani3120
    @imranzunzani3120 8 หลายเดือนก่อน

    Polyrepos are also helpful when you want your code (business) logic to be packed differently for deloyment over to varied hostings over different geographies, as separating the build in other repos works well when working with multiple teams, in a large organization. I have seen people trying to forcefully fit cases in monorepos which is not a good practice. It creates overcomplications and takes things away from the 'Single Responsibility' based thought processes. Just because Google or some other big org does it, shouldn't be the reason to force monorepos everywhere.

    • @kellyrankin8844
      @kellyrankin8844 3 หลายเดือนก่อน

      part of the gig is finding ergonomic ways to do things...generally what I see is that yes people sometimes "Force" things, but that was not the only option.

  • @CanadaRulez4Ever
    @CanadaRulez4Ever 4 หลายเดือนก่อน

    we have about 250 repos

  • @EkaneGideon
    @EkaneGideon 17 วันที่ผ่านมา

    Great Job @sofwaredeveloperDaiaries. please i will like to connect with you regarding this topic of mono repo, if you do not mind please.. i have a project there, which i would like to understand somethings