上QQ阅读APP看书,第一时间看更新
Multiple repos
The multiple repos approach is exactly the opposite. Each project, and often each library, has a separate source control repository. Projects consume each other just like third-party libraries. There are several advantages to this approach:
- Clear physical boundaries between projects and services.
- One-to-one mapping of source control repositories and services or projects.
- It is easy to map deployments of services to source control repositories.
- Uniform treatment of all dependencies—internal and third party.
However, there are significant costs to this approach, especially as the number of services and projects grows and the dependency graphs between them become more complicated:
- Applying changes often requires changes across multiple repositories.
- You often need to maintain multiple versions of a repository, as different services depend on different services.
- It is difficult to apply cross-cutting changes across all repositories.