Comments by "" (@ContinuousDelivery) on "Monolith vs Microservices" video.
-
3
-
3
-
2
-
Yes, in that case the most efficient way to organise things is to have a single (not necessarily gigantic) repo for both services. As I said, the real question is what do you have to test before changes anywhere, in either of these services, are safe to release? The real answer given your scenario is both services.
For microservices it is generally preferable to duplicate behaviour than share code between services, to retain their independence, and keep them de-coupled, unless the code that they are sharing is another, decoupled, microservice.
The downsides of monorepo are that you need to work harder to get results fast enough, and that it can result in poor or inexperienced teams to ignore coupling within the repo (this is true of microservices too but they suffer more when it happens). Even in a mono repo you still want good, modular design.
2
-
2
-
2
-
2
-
2
-
1
-
1
-
I think that you start with a false alternative, it is not "microservice or corporate repo", it is "align your repo boundaries with deployable things". So mostly I'd have a repo per system, and the test for "deployable things" is "do I need to test this with anything else before I release it?". If not you are good, if you do, then you are dealing with more complexity than you need to.
In my experience coupling is a MUCH bigger problem than lack of re-use. Of course we want to architect systems so that there are cannonical versions of some behaviours, I am a big fan of service oriented design, key to the strategy of microservices is to reduce coupling, and as soon as you share code you increase coupling. This means that it is always a dance. There is no single simple answer, and my experience for the past few years is that virtually every client company that I have worked with are struggling to cope with too much coupling between things that they think of as microservices, when they are really coupled-modules.
I don't advise mono repos for everything, but I at the moment I see many more people struggling because of multi-repos than because of mono repos. It is more complex than either one of these solutions which is why I like the "independently deployable unit" as a guide. That doesn't rule-out sharing code, but when you do, you protect those boundaries where you share in some of the ways that I mentioned.
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
For me it is all about scope of evaluation. If your mini-services, from which you construct "independently deployable services" are all in one repo, and all evaluated in the same pipeline prior to release, then yes, I think that is the most efficient way to organise things. If each of your mini-services is in a separate repo, and then you test them all together when composed as an "independently deployable service" or even worse "your mini services are used in multiple 'independently deployable service" then IMO you have an inefficient distributed monolith, either at the level of each of your "independently deployable services" or in the second, worst, case at the level of your whole system which is coupled through the re-use of the mini-services.
if your mini services are in separate repos, the question is, what do you have to test after changing a mini service?
1
-
1
-
1