DEV Community

Alexsandro Souza
Alexsandro Souza

Posted on • Edited on

Are you starting with microservices? Forget the DRY principle and embrace redundancy!

I am always posting provoking post on my Linkedin, and I have decided to replicate those here. Let's socialize!

Are you starting with microservices? Forget the DRY programming principle and embrace redundancy!

Extracting common code to a library seems to be the best practice. However, if two microservices share a library, they are coupled and not independent anymore.

That will increase the coordination effort, and a trivial change in the library will become very hard because it has to be coordinated among the microservice teams.

Someone may suggest adding versioning; then it will add restrictions and may lead to painful version conflicts.

Developers will fear adding improvements and refactoring the code because they will not know how their changes can affect other microservices.

Accept redundancy. It's ok to have redundancy to stay independent. This way, we will avoid technical and organizational coupling, speed up the development and enable modernization.

You can find more here

Heroku

Deploy with ease. Manage efficiently. Scale faster.

Leave the infrastructure headaches to us, while you focus on pushing boundaries, realizing your vision, and making a lasting impression on your users.

Get Started

Top comments (0)

AWS Q Developer image

Your AI Code Assistant

Automate your code reviews. Catch bugs before your coworkers. Fix security issues in your code. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

👋 Kindness is contagious

If you found this post helpful, please leave a ❤️ or a friendly comment below!

Okay