当前位置:网站首页>Transformation of traditional projects
Transformation of traditional projects
2022-07-30 03:32:00 【Leon_Jinhai_Sun】
To talk about the hottest topic in recent years, it has to be microservices, so what are microservices?
We can start from the evolution of technology. After we learn JavaWeb, the general website development model is Servlet+JSP, but in fact, after we learn SSM, we will find this modelIt is already far behind. First, it is impossible for a company to recruit so many developers who can know both front-end and back-end at the same time. Even if they are recruited, it does not necessarily guarantee that they are good at both aspects. Compared with the front-end and back-end learning separatelyDevelopers, obviously the latter is less expensive to learn and more focused.Therefore, the separation of front and back ends has become a new trend.By using SpringBoot, we can develop a high-performance single application almost very quickly. We only need to start a server, and our entire project will start running. The functions are integrated and development is easier.
But as our project continues to expand, the monolith seems to be a bit sluggish.
As more and more functions are added to a SpringBoot project, and as the number of interfaces increases, the entire system must respond to more types of requests at the same time. Obviously, thisIt is impossible to use the extension method indefinitely. One day, this SpringBoot project will be so large that it runs slowly.And if all functions are integrated on a single end, all requests will be brought together on one server, which will cause huge pressure on this server.
You can imagine, if our computer has been upgraded to i9-12900K, but it is still slow when running the project and cannot respond to thousands of requests at the same time, then this problem is no longer simple.Upgrading the machine configuration can solve it.

As the scale of the project expands, the traditional monolithic architecture application will actually expose more and more problems, especially a server cannot withstand the deployment of a huge monolithic application, and theMaintenance will also become more and more difficult, and we have to find a new development architecture to solve these problems.
In short, the microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API. These servicesare built around business capabilities and independently deployable by fully automated deployment machinery. There is a bare minimum of centralized management of these services, which may be written in different programming languages and use different data storage technologies.
Martin Fowler proposed the "microservice" architecture in 2014, which is a new architectural style.
- Microservices split a huge single application into small services. For example, in our original book management project, there are functions such as login, registration, add, delete, and search, then weThese functions can be individually made into small SpringBoot projects and run independently.
- Each small microservice can be deployed and upgraded independently, so that even if the entire system crashes, it will only affect the operation of one service.
- Using HTTP for data interaction between microservices is no longer an internal interaction within a single application. Although this will be more troublesome, the benefits are also very direct, and can even break through language restrictions, using different programming languages for microservice development, you only need to use HTTP for data interaction.
- We can purchase multiple hosts at the same time to deploy these microservices separately, so that the pressure of a single machine is distributed to multiple machines, and the configuration of each machine does not necessarily need to be too high, so that we canSave a lot of costs, while security is also greatly guaranteed.
- Even the same microservice can exist at the same time, so that when one of the servers fails, other servers are running the same microservice, so that the high availability of a microservice can be guaranteed.

Of course, here is just a simple demonstration of the microservice architecture, which is definitely much more complicated in actual development.
It can be seen that the adoption of the micro-service architecture is better able to cope with the various tests in the current era. The development mode of traditional projects needs to be upgraded in architecture.
边栏推荐
猜你喜欢
随机推荐
One book 1922 - table tennis
JUC(七):变量的线程安全分析
Nacos Configuration Center
NLP自然语言处理(二)
历经5面的阿里实习面经篇~
阿里巴巴按关键字搜索新品数据 API
星光不问赶路人!武汉校区小姐姐三个月成功转行软件测试,收获9k+13薪!
OPENSQL
答对这3个面试问题,薪资直涨20K
记录NLP各种资源网址
OPENSQL
运营人必须掌握的6大类26个基本模型
REUSE_ALV_GRID_DISPLAY详解
TCP拥塞控制技术 与BBR的加速原理
Nacos命名空间
软件测试面试题及答案解析,2022最强版
SDL播放器实战
(RCE)远程代码/命令执行漏洞漏洞练习
VMware磁盘扩容记录
SQLSERVER将子查询数据合并拼接成一个字段









