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

preview_player
Показать описание
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 ❤️

📚 Resources:

🕒 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 😊
Рекомендации по теме
Комментарии
Автор

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...

alfabetatest
Автор

Thanks. Please keep posting more such content.

sabya
Автор

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

evamotto
Автор

hey - cool vide, thx! I like the design of the diagrams - what tool you are using on it? :)

alfonszelicko
Автор

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???

mikami
Автор

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

JesperEnemark
Автор

No more monorepo! Total chaos..At the time of making your video Kubernetes and Google were already transisioning to polyrepos. I've never seen a monorepo that works well with gitflow. A repo that just respects a normal gitflow. Sooo yeah those companies started back in the days.

nelsonnl
Автор

i only just figured out how stupid i was all those years to maintain multiple private repositories for my hobby projects.

weirdwordcombo
Автор

Once a while the YouTube algorithm recommends a great channel. Now is such a time.

Nice to meet you - keep posting great content

siya.abc
Автор

Isn't a mono repo only an advantage if the services only depend on eachother at compile time? One can have multiple services, written in different languages that have nothing to do with eachother at compile time. It is the interface definition that defines their dependency. And the risk of breaking that only occurs at run time (in an integration test environment, before it is deployed to production). Storing each service in it's own repo works perfectly fine than.

TheVincent
Автор

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?

austinvalentine
Автор

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 ?

kavinduvindikasomadasa
Автор

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?

wayneshang
Автор

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.

imranzunzani
Автор

Absolutely no value to this video. A lot of rambling explaining what monorepos are and at the end a neutral diplomatic opinion. No technical explanations, no breakdown of pros and cons of specific monorepos as opposed to others. I could make this video with 12 mintues of using a Monorepo, not 12 months.

j.r.r.tolkien
Автор

The Linked link you've used in your video description it doesn't work.

HamzaMaimi
Автор

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

EkaneGideon