In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Original articles, welcome to reprint. Reprint please indicate: reproduced from IT Story Association, thank you!
Original link address: "Advanced article" docker container for micro-service advantages and disadvantages (4)
Let's take a look at the advantages and disadvantages of microservices.
advantage
Independence.
From the construction and deployment, expansion and reception, fault tolerance, the database is managed separately. Each service is managed separately. If there is a problem with a microservice, it will only affect himself. Will not affect the entire service. Each has a separate database.
Agility
For users, the interface exposed by micro-services is relatively simple, because their functions are very single, clear api, but also can quickly respond to changes, according to new requirements quickly find micro-services that need to be modified, to modify it.
Flexible technology stack
As long as the api interface remains the same, the service is refactored.
Efficient team
Each team is only responsible for its own micro-services, make some architectural adjustments, architectural changes, a few people have a small meeting on it.
Deficiency
There is no best architecture, only the most suitable.
Extra work
The split of services, in fact, the separation of services is a very deep knowledge.
Consistency of data
It is easy to achieve consistency in a single database, and micro-services all have their own services, although we try our best to reduce table join operations in micro-services and try to be in the same micro-services, there will inevitably be associations of one kind or another.
Communication cost
Api change, monolithic architecture, if you want to change an interface, you can change the place where this API is called, but in microservices, you are not responsible for what you want to change, pushing other people and other groups to modify it. If other people or other groups have more communication costs, it will be clear.
Understand DDD (Domain driven Design)
Software development VS DDD
General software design or software development can be divided into two types: waterfall and agility.
The former is generally that after a lot of business analysis, the project manager will sort out a basic model based on the existing requirements, and then pass the results to the developers, this is the developer's requirements document, they just need to follow this development. In this mode, it is difficult to get feedback from users frequently, so it has been acquiesced in the early analysis that the business model is correct, so the result is conceivable that when it is delivered months or even years later, there must be a big gap between it and the customer's expectations.
The latter has been improved on this basis, and it also needs a lot of analysis, and the scope will be designed to a more detailed business module. It is a small-step iteration with a cycle of × × payment, so it is more frequent and timely to get feedback from customers. But Agile can not take into account all aspects of the business, and Agile embraces change, a large number of requirements or business model changes will bring a lot of maintenance costs, at the same time, the requirements of people (Developer) will inevitably be higher.
DDD is different: it is like a smaller granularity iterative design, and its smallest unit is the domain model (Domain Model). The so-called domain model is the carrier that can accurately reflect a certain knowledge element in the domain. The acquisition of this kind of knowledge requires frequent communication with domain experts (Domain Expert) to transform professional knowledge into a domain model. Domain model-independent technology has a high degree of business abstraction, it can accurately describe the knowledge system in the domain; at the same time, it is also independent, we also need to learn how to make it expressive and establish a relationship between models to form a complete domain architecture. Usually we can use pictographs or a common language (Ubiquitous Language) to describe the relationship between them. On top of this, we can do code design in the domain (Domain Code Design). If you compare software design to building a house, domain code design is like wallpaper. The former has planned the blueprint framework of the house, while the latter is only a small part of the design: if the wallpaper is wrong, we can start over, but if the house structure is wrong, it will be a tragedy.
PS: the requirements of microservices are small enough particles for analysis and thorough analysis of the project.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.