We are already in micro-services era. Yes, no doubt. From monolith time, in which it is almost impossible to run a chunky application on your laptop, to micro-services era, your application has been discomposed into much smaller services that can be deployed and started independently.
Inner loop includes code, build, deploy and debug. Developers depends on inner loop steps to change code and verify new features before make a pull request to the main branch.
Outer loop starts from the code review, after the code review, the code is going to be built, deployed to the integration environment to run integration testing, make security and compliance checking.
Dependency chain of micro-services makes the inner loop much more difficult.
Debug cost soars because of complexity introduced by micro-services architect
When you update one service to add a new feature, because of dependency, your debug environment must have your dependencies running, otherwise you need mock services or stub code to debug your code.
Many teams create a large fleet of VMs to host a herd of services as their testing environment, and setup a complex multi-tenant system to manage their testing environment. Each developer need publish their code to the testing environment through pipelines before start debugging. This is not a good idea to do the debug work because developers needs to wait for the deployment and then get a feedback if his code change works. The loop is too long to have an instant feedback, because update a remote environment usually takes several minutes.
Cloud testing environment is very suitable for integration testing when you create a pull request before your code is merged to the main branch. But for your debug purpose, a debug environment on your laptop is your good friend.
Let`s imagine the ideal solution first to see what it will be like.
We would like to make the inner loop feedback from several minutes to a few seconds so that you can debug your micro-service in the same way of monolith application.
In the following articles, I will introduce how to implement these features on your laptop with a simple sample project.