Ask HN: Mono Repo vs. Multi Repo? What are the benefits and downsides of choosing one approach over another.
From the perspective of a small team. |
Ask HN: Mono Repo vs. Multi Repo? What are the benefits and downsides of choosing one approach over another.
From the perspective of a small team. |
Either way, it doesn't really matter that much. In the end, it's mostly just a personal preference.
We are a small team and the codebase would not be that big.
Going multi first is just too annoying to manage and doesn't make much sense. Also, it's more repos you have to get running on your device, and more room for divergence.
It gets even worse when small companies insist on creating their own packages...
Also, I usually have a repo that is for deployment-focused stuff, like kubernetes configs. These are good reasons. I think maybe a "scripts" or "scratch file" or a mix of the two can also be its own repo, for stuff that doesn't really belong anywhere specific and isn't getting called by other code.
Is it also better if we have to use some open source dependency at multiple places?
I'm not sure what you mean!
The question with monorepos is not if they will become a nightmare. It is when they will become a nightmare.
Making a multirepo feel like a single workspace is trivial. Making a part of a monorepo feel like a repo from a multi repo is impossible.
We have a guy on our team who loves the shiny new thing, but lots of times you can get it working in a much easier, more understandable way.
For azure functions, a separate repo may make sense. I would probably do that, but I also suggest not putting much logic at all in the azure functions. For example, this:
- When the function is executed, drop a document here
- ... write this db record
- ... execute some job somewhere ...
- ... call an API ...
Is a good use of azure functions. Keep it "functional!"
Bad uses are "systems" implemented in Azure functions. As soon as you feel like you need to use or even MIGHT need to use code in your main codebase, please, don't use azure functions! :)