Monorepo
A monorepo approach in microservice context.
First, let's talk about Microservice
What is a Microservice?
First, let's talk about Microservices
What is a Microservice?
- "In short, the microservice architectural style is an approach to developing a single application as a suite of
small services, each running in its own process and communicating with lightweight mechanisms, often an
HTTP resource API."
(Font: https://martinfowler.com/articles/microservices.html - Martin Fowler - 2014)
- "Microservices are small, autonomous services that work together."
- "The golden rule: can you make a change to a service and deploy it by itself without changing anything
else?"
(Font: Building Microservice - Sam Newman - 2015)
Microservices
What is a Microservice?
(Font: https://martinfowler.com/articles/microservices.html - Martin Fowler - 2014)
Microservices
"The golden rule: can you make a change to a service and deploy it by itself
without changing anything else?"
(Font: Building Microservice - Sam Newman - 2015)
Microservices
Ok, so always "1 microservice == 1 application" ?
Microservices
Ok, so always "1 microservice == 1 application" ?
Let's take a look how Companies are implementing microservices partner:
Fonte: https://docs.microsoft.com/en-us/dotnet/architecture/cloud-native/map-eshoponcontainers-azure-services
Fonte: https://github.com/dotnet-architecture/eShopOnContainers
Classic Example:
Fonte: https://github.com/dotnet-architecture/eShopOnContainers/issues/1307
Fonte: https://docs.microsoft.com/en-us/dotnet/architecture/cloud-native/map-eshoponcontainers-azure-services
Fonte: https://github.com/dotnet-architecture/eShopOnContainers
Example Classic:
Microservices (back)
"The golden rule: can you make a change to a service and deploy it by itself
without changing anything else?"
(Font: Building Microservice - Sam Newman - 2015)
Microservices
"The golden rule: can you make a change to a service and deploy it by itself
without changing anything else?"
(Font: Building Microservice - Sam Newman - 2015)
Option #1
First, let's talk about Microservice
"The golden rule: can you make a change to a service and deploy it by itself
without changing anything else?"
(Font: Building Microservice - Sam Newman - 2015)
Option #2
What is Mono-repo ?
"All the code in a single codebase (git repository)."
?
organization-xyz-all-code
"All the code from the Organization X."
What is Mono-repo ?
All the code in a single codebase (git repository).
All the code that belongs to the microservice(domain) in a single codebase (git repository).
Option #1
What is Mono-repo ?
All the code in a single codebase (git repository).
All the code that belongs to the microservice(domain) in a single codebase (git repository).
Option #2
References:
- O Quality Engineering em Monorepo da Airbnb (https://qeunit.com/pt/blog/o-quality-engineering-em-monorepo-da-airbnb/)
- Payment services in Bazel monorepo (https://blog.coinbase.com/payment-services-in-bazel-monorepo-eafc08305a5)
- Building Uber’s Go Monorepo with Bazel (https://eng.uber.com/go-monorepo-bazel)
- Benefits and challenges of using monorepo development practices (https://circleci.com/blog/monorepo-dev-practices)
- Complex Made Bearable - Lucas Cavalcanti (https://www.youtube.com/watch?v=ct5aWqhHARs)
- Your Microservices May Need A Monorepo For Quality At Speed
(https://qeunit.medium.com/your-microservices-may-need-a-monorepo-for-quality-at-speed-bfe5ba64dfc7)
- Curly Braces #1: Java and a project monorepo (https://blogs.oracle.com/javamagazine/post/curly-braces-java-git-monorepo)
- Mantenha a sua cozinha organizada: o case Monorepo no iFood
(https://news.ifood.com.br/mantenha-a-sua-cozinha-organizada-o-case-monorepo-no-ifood)
- O Monorepo à la Google (https://qeunit.com/pt/blog/o-monorepo-a-la-google/)
- Why Google Stores Billions of Lines of Code in a Single Repository (https://research.google/pubs/pub45424/)
- Microservices: Mono repo vs. multiple repositories
(https://jaxenter.com/microservices-mono-repo-vs-multiple-repositories-130148.html)
- SpareBank Financial institution - Monorepo sample (https://github.com/SpareBank1/monorepo-sample)
- Modular-Architecture-Hexagonal-Demo-Project (https://github.com/AlicanAkkus/Modular-Architecture-Hexagonal-Demo-Project)
TKS

Monorepo.pdf

  • 1.
    Monorepo A monorepo approachin microservice context.
  • 2.
    First, let's talkabout Microservice What is a Microservice?
  • 3.
    First, let's talkabout Microservices What is a Microservice? - "In short, the microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API." (Font: https://martinfowler.com/articles/microservices.html - Martin Fowler - 2014) - "Microservices are small, autonomous services that work together." - "The golden rule: can you make a change to a service and deploy it by itself without changing anything else?" (Font: Building Microservice - Sam Newman - 2015)
  • 4.
    Microservices What is aMicroservice? (Font: https://martinfowler.com/articles/microservices.html - Martin Fowler - 2014)
  • 5.
    Microservices "The golden rule:can you make a change to a service and deploy it by itself without changing anything else?" (Font: Building Microservice - Sam Newman - 2015)
  • 6.
    Microservices Ok, so always"1 microservice == 1 application" ?
  • 7.
    Microservices Ok, so always"1 microservice == 1 application" ? Let's take a look how Companies are implementing microservices partner:
  • 8.
  • 9.
  • 10.
  • 11.
    Microservices (back) "The goldenrule: can you make a change to a service and deploy it by itself without changing anything else?" (Font: Building Microservice - Sam Newman - 2015)
  • 12.
    Microservices "The golden rule:can you make a change to a service and deploy it by itself without changing anything else?" (Font: Building Microservice - Sam Newman - 2015) Option #1
  • 13.
    First, let's talkabout Microservice "The golden rule: can you make a change to a service and deploy it by itself without changing anything else?" (Font: Building Microservice - Sam Newman - 2015) Option #2
  • 14.
    What is Mono-repo? "All the code in a single codebase (git repository)." ? organization-xyz-all-code "All the code from the Organization X."
  • 15.
    What is Mono-repo? All the code in a single codebase (git repository). All the code that belongs to the microservice(domain) in a single codebase (git repository). Option #1
  • 16.
    What is Mono-repo? All the code in a single codebase (git repository). All the code that belongs to the microservice(domain) in a single codebase (git repository). Option #2
  • 17.
    References: - O QualityEngineering em Monorepo da Airbnb (https://qeunit.com/pt/blog/o-quality-engineering-em-monorepo-da-airbnb/) - Payment services in Bazel monorepo (https://blog.coinbase.com/payment-services-in-bazel-monorepo-eafc08305a5) - Building Uber’s Go Monorepo with Bazel (https://eng.uber.com/go-monorepo-bazel) - Benefits and challenges of using monorepo development practices (https://circleci.com/blog/monorepo-dev-practices) - Complex Made Bearable - Lucas Cavalcanti (https://www.youtube.com/watch?v=ct5aWqhHARs) - Your Microservices May Need A Monorepo For Quality At Speed (https://qeunit.medium.com/your-microservices-may-need-a-monorepo-for-quality-at-speed-bfe5ba64dfc7) - Curly Braces #1: Java and a project monorepo (https://blogs.oracle.com/javamagazine/post/curly-braces-java-git-monorepo) - Mantenha a sua cozinha organizada: o case Monorepo no iFood (https://news.ifood.com.br/mantenha-a-sua-cozinha-organizada-o-case-monorepo-no-ifood) - O Monorepo à la Google (https://qeunit.com/pt/blog/o-monorepo-a-la-google/) - Why Google Stores Billions of Lines of Code in a Single Repository (https://research.google/pubs/pub45424/) - Microservices: Mono repo vs. multiple repositories (https://jaxenter.com/microservices-mono-repo-vs-multiple-repositories-130148.html) - SpareBank Financial institution - Monorepo sample (https://github.com/SpareBank1/monorepo-sample) - Modular-Architecture-Hexagonal-Demo-Project (https://github.com/AlicanAkkus/Modular-Architecture-Hexagonal-Demo-Project)
  • 18.