Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Does the construction of micro-service project want aggregation project or not?

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces whether the construction of micro-service projects should be an aggregation project or not. The content is very detailed. Interested friends can use it for reference. I hope it will be helpful to you.

This is an introductory question, to do micro-service projects, the first thing is to build Project, what form of code to organize, this is the first problem we are faced with.

In traditional projects, we often need to build aggregation projects, which can facilitate sub-module management of the project and reduce the difficulty of maintenance.

Do we need to continue this way of development in microservice projects? Combine your own experience in the project and have a brief chat with you about the organization of the code in the micro-service project.

1. Development mode

To figure out how the code is organized, you first need to understand what the microservice architecture looks like!

In the micro-service architecture, a complete project is divided into many independent micro-services, such as an e-commerce project, which may be divided into commodity management, merchant management, user management, transaction management, SEO management, App management, financial management, system management and many other micro-services.

These microservices are independent projects and are developed and maintained by different teams.

Different teams develop independently, maintain independently, test independently (depending on the situation), and go online independently, which can effectively improve the development efficiency of the project.

According to the actual situation of the project, different teams can even choose different technology stacks, such as commodity management module using Java, transaction management may use Go, portals may use PHP, and so on. In terms of micro-service architecture, these are supported, which is also one of the advantages of micro-services, that is, the same system does not have to adhere to the same language, of course, in practice. You also need to combine the team's technology stack and the features of the language to choose.

In fact, when you see here, you will probably understand whether the aggregation project can still be used here!

two。 Do you want to aggregate the project?

First of all, on the whole, that is, at the project level, we no longer need aggregation projects. Aggregation projects can uniformly package projects, solve dependency problems in projects, and uniformly manage dependent versions, but these features are not important to micro-service projects.

If the commodity management module uses Java, transaction management uses Go, and portals use PHP, then these three independent micro-services are certainly not necessary to make an aggregation project, and you can't aggregate either. Of course, this is a rather extreme situation. Even if different micro-service modules are developed in Java language, there is no need for aggregation, because different micro-services are actually independently run projects, developed and maintained by different teams. One of the major advantages of micro-services is that each team develops independently and does not affect each other. If you do an aggregation project, you bind the teams together.

However, between different micro-services, it is inevitable to use some public libraries, which can be packaged and uploaded to the company's Maven private service, and then different teams can rely on them, or use them through git subtree.

This is from a big level. Specific to each micro-service, the advantages of aggregation engineering are still there, and should be used. For example, in the commodity management module, aggregation engineering can continue to be used.

3. Why is there a doubt?

The question of whether or not to use aggregation engineering in microservices is originally a very small problem, but why do many partners have doubts?

Let me tell you, I know a few things.

One situation is that the company's micro-service is transformed on the basis of the old project, hastily launched, changed again and again, changed beyond recognition, no longer pay attention to the structure of these things, the function can be realized, this kind of time even at a large level to use the aggregation project, as a result, different teams develop, or affect the whole body, if a small partner has also developed this kind of project There may be questions about the use of aggregation engineering. This is the case when a friend is working on a project of a central enterprise in Guangzhou.

Another situation may be due to the small number of people in the company, and the development of micro-service projects is made into an aggregation project as a whole, which is very convenient to modify when the number of people in the project is small and the quantity of the project is small.

I hope the above content can help you and learn more about whether the aggregation project should be shared or not for the construction of micro-service projects. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report