前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Bring development environment back to your laptop(part1)

Bring development environment back to your laptop(part1)

作者头像
jimmyhzhao
发布2022-04-10 12:01:41
2390
发布2022-04-10 12:01:41
举报
文章被收录于专栏:SkemaloopSkemaloop

Decompose your applications

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 and outer loop

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.

Testing environment in the cloud?

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.

Your local debug solution

Let`s imagine the ideal solution first to see what it will be like.

  1. when you change your code and save the file, the build process should be triggered automatically and your container should be updated.
  2. the running service should be able to be attached to your debugger so that you can add break points.
  3. the attachment should be done automatically.
  4. you can define dependencies in a configuration file and when you start your debug session, all dependencies should be started automatically.
  5. you can define mock services to support your debug.

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.

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2022-03-30,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • Decompose your applications
  • Inner loop and outer loop
  • Testing environment in the cloud?
  • Your local debug solution
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档