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

The Advanced docker Container for the Evolution of Software Architecture (2)

2025-04-07 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 articles" docker container on the evolution of software architecture (2)

Also worked for 10 years, for the software architecture is also a continuous learning summary, how to develop to the micro-service architecture.

What is software architecture?

In the interior of the software, after comprehensive consideration of various factors, weigh and select specific technologies, divide the system into different parts and make these parts divide each other, write each other, and provide users with the value they need.

What are the factors?

Business requirements, technology stack, cost, organizational architecture, scalability, maintainability, based on my personal experience, a layer of architecture

In 2007, I worked as an intern in a local company in Henan. I was responsible for an old system, which used the technology of jsp and servlet,jdbc, the early standard technology of java, saw html in jsp, and saw a large piece of java code written directly in jsp. In servlet, there are thousands of lines of code, 300500 lines of very common things, including business logic, business content returned to jsp, business operations, database operations. Maintenance makes you break down, but you just put up with it after graduation and lasted for half a year. Then I'm going to Jinan. This is feasible in a very simple business, but it can no longer be seen.

MVC

In 2008, I went to Jinan. After all, Jinan wanted a nationally famous company to enter. Although 996, but feel good, at least the code is not so complex, although there is no jsp,java code, divided into a lot of folders, a clear level of division of labor, but also learned the three-tier architecture of MVC. Solve the code call disorder, make the code clear, through the way of defining the interface between each layer, separate the interface and implementation, you can replace the original implementation with a solution, let others understand, reduce communication costs, maintenance costs, the clear division of labor to perform their own duties, for a long time is the classic pattern of software architecture. Like SSH and SSM, actually the implementation of MVC.

Dubbo

In 2013, I changed a company, and dubbo only came out for one year at that time. The company tried to transform a core system with dubbo. Why should I use dubbo? because there are more than 1 million lines of java code and page code, and it needs to be constantly added every month. People who have been familiar with it for more than 3 years may not be able to get familiar with it for at least 2-3 months, and they can only find a way to split it. The process of splitting is also a process of combing and refactoring the old code. The emergence of dubbo allows the front and rear ends to be physically isolated and completely turned into two modules that can be maintained separately, and the sensory complexity has been reduced by half. This kind of development process may not be obvious in Henan, and there should be similar experiences in the north, Shanghai and Guangzhou. Many years of development personnel.

In fact, the above is a single architecture, many of the current companies are also single architecture, although dubbo, separated into two individuals, but it is not a micro-service.

What is a single architecture?

Function, the business is concentrated in a release package, and the deployment runs in the same process.

advantage

Easy to develop (convenient for developers to develop) easy to test (prepare a server and test under deployment) easy to deploy (all the code is packed in a package, directly copy a war to be deployed on the server, directory) easy to scale horizontally (replication of nodes, new servers, configured running environment, directly copy a war deployed on the server) challenges faced by singletons

As many traditional industries consider the Internet, business changes rapidly, system upgrades become more and more frequent, the number of users is growing rapidly, single architecture has been unable to meet the development of the Internet, it has a lot of fatal injuries.

The code is bloated and difficult to maintain (with the emergence of bug, the cost of analysis and positioning is very high, with code development, developers have less and less understanding of the overall situation, repair a bug, which may introduce other bug, a vicious circle, resulting in difficult maintenance) build, deployment costs (more and more code, construction deployment starts longer and longer, more and more people maintain the project, everyone is building, everyone is deploying It will inevitably affect each other, resulting in a bug repair, which takes a long time to submit to the test and verification, and the efficiency is getting lower and lower.) it is difficult for newcomers to get started (now Internet companies are all iron soldiers, and newcomers leave before they fully understand it) Innovation difficulties (difficulties in successfully introducing a new framework Even if the learning cost is introduced successfully, the scalability is poor (the code is all running in the same process, and a process can only run on a machine for one day. How much memory and how much cpu can be added to this machine before we can use it for this project? some frameworks have high requirements for CPU, some frameworks have high requirements for memory, and some frameworks have high requirements for hard disk. In fact, they finally choose a machine that is good in all aspects. Does it increase the cost of expenditure)

PS: to sum up, the monomer architecture has been out, old man, you can consider other, how to consider next time to continue.

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

Servers

Wechat

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

12
Report