In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
How to analyze the front and back-end integration framework based on Serverless, I believe that many inexperienced people do not know what to do about it. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
Overview
Serverless is a "serverless architecture" model, which does not care about the running environment, resources and quantity of programs, but only needs to focus on the technology of business logic. To develop web applications based on Serverless, architects always try to transplant traditional solutions to Serverless, although they can not only have the dividend brought by the new Serverless technology, but also maintain the development experience of the traditional development model. However, the changes brought about by Serverless technology may be more than these, and it may be a revolutionary technology that subverts the whole traditional web application development model.
Development mode
The development mode of business application is a process from integration to split to front and back end, and then to front and back end integration.
Note: the back-end refers specifically to the back-end business logic.
In the early stage, integrated.
There is no front-end and back-end concept, at that time, applications are stand-alone, all business logic is written together, developers do not need to care about network requests, engineers in this period are completely focused on the development of business code. With the growth of the scale of the business, many problems have been exposed:
High concurrency problem
High availability issu
Description: some problems such as difficulties in upgrading business applications are not the concern of this article, so they will not be listed one by one.
Now, split.
Back-end business logic wrapped in front-end + high availability and high concurrency maintenance:
Description: now Serverless technology has been around for some time, not only does not solve the problem of development experience, but brings more development experience problems, so I do not highlight Serverless technology here.
Problem solved:
High concurrency. The problem of high concurrency of business is solved through distributed deployment and multi-level load balancing.
High availability. The problem of high availability of business is solved through technologies such as master-slave architecture.
Solve a problem and bring about a lot of problems:
Split business applications. In order to solve the problem of high availability and high concurrency, business applications introduce a distributed architecture, which ensures high availability and high concurrency through load balancing and master-slave mode, but this solution is intrusive to business applications. As a result, the application with high cohesion is split into front-end and back-end.
Pollute the business code. The logic related to high availability, high concurrency and operation and maintenance is intertwined with the back-end business logic, which makes the threshold of the back-end technology higher, so that multiple back-end engineers are required to master all the back-end technologies.
Increase the cost of joint transfer. The joint adjustment work between the front and rear ends is becoming increasingly onerous, which has become a bottleneck to improve the efficiency of engineering development. New functions and BUG can only be completed with the cooperation of front and rear engineers. If you are a full stack development engineer, you must have a lot of experience. Many BUG can tell at a glance whether it is a front-end problem or a back-end problem.
The development speed of the mismatched front-end technology, the front-end technology is developing rapidly, the back-end technology is relatively stable, the front-end can only passively adapt to the back-end, so that the latest front-end technology is greatly reduced in the use experience. The most ideal way is to consider the overall development of the front and rear end. Do not need to optimize one line of code at the back end, and let the front end write 100 lines of code to achieve it.
Limits code abstraction. Because the implementation is the same business requirements, so the front and back end code has a high degree of relevance, if we can abstract the code logic on the front and back end code, we can certainly make a great difference. At the same time, there is also a qualitative improvement in the development and maintenance of the code. as a result of the split between the front and back ends, we have to abstract the code at the front end or the back end, and the abstract code may be one-sided and repetitive.
Increase the technical complexity. The front and rear ends are split, and the front and rear engineers form their own technology stacks, including languages, tools and ideas, which makes it extremely difficult for a single engineer to maintain the whole business application, and makes the front and rear engineers reject each other's technology stacks. With the passage of time, the technology stack is becoming more and more different, a project, no matter how small, at least two engineers, full-stack development engineers are another matter.
Increase the cost of operation and maintenance. Special operation and maintenance engineers are needed for operation and maintenance. although the cost of operation and maintenance has been reduced by technical means, the cost of operation and maintenance is still high and difficult.
This is why small startups like full-stack development engineers, because in the early stage of start-up, the need for high availability and high concurrency is not so urgent, so operation and maintenance is relatively simple. Using full-stack development engineers not only shortens the project delivery cycle, but also reduces the company's operating costs, which is very important for small start-ups.
In the future, it will be integrated back into one.
Frontend + backend + Serverless + platform services = > Business applications + Serverless + platform services:
Description: sharing logic is the sharing logic of the front and rear ends. In the past, due to the split of the front and back ends, it was difficult to abstract the code at the front and back end level. After the front and rear ends were integrated, it became simple and natural.
Bring confusion:
Isn't it good to divide the front and rear? In the past, decomposing a complex problem into several simple sub-problems, high concurrency and high availability are impossible not to invade business applications, which is indeed a good solution and there is no way. The cost problem brought about by the division of labor and cooperation between the front and back ends is becoming more and more prominent. Now that Serverless transparently solves the problems of high concurrency and high availability, why do we need to divide it from the technical dimension? don't we recommend it by the business dimension?
The back end is still very difficult, and the threshold to control the front and back end is still very high. Back-end code logic can be difficult without high concurrency and high availability, such as AI. I believe that there may be difficult business like this now, and there will be relevant development kits or platform services to solve for us in the future, so that these difficult technologies can be popularized. The difficult technology is left to the professionals to solve.
Get back to your original heart:
Return to business, front and rear integration. With the emergence of Serverless technology, the problems of high availability, high concurrency and operation and maintenance have been solved. As engineers, we should look back and find our original intention: focus on business code. Let the back-end business code and the front-end code that were originally together merge again. So isn't front-end integration the ultimate solution for application development that we've lost for a long time?
Current situation
Serverless has done the following two things:
Engineers only need to care about the technical aspects of business logic.
Have an experience close to traditional application development (it may be a long way to solve problems left over from history)
The traditional application framework is tasteless, but it is a pity to abandon it:
At present, many users have realized the benefits of high availability, high concurrency and free operation and maintenance brought by Serverless. Users can naturally think that it would be great if the existing development framework can be ported to Serverless. The Serverless platform will naturally provide migration solutions for existing frameworks. The problem to be solved is to migrate the traditional solution to Serverless, so that users can have traditional development experience on Serverless.
Apply the framework to get back to the original heart:
The integration of front and back end business logic code, that is, front and back end integration
What problems does front-end integration solve:
Solve the problems in the second phase of the development model, please refer to: "solve a problem, bring a lot of problems."
To realize the integration of front and rear end, the deficiencies are as follows:
Front-end Integration Framework based on Serverless
Tools
Among them, the front-end integration framework based on Serverless solves the front-end integration problem; the tool shields the details of the Serverless platform and provides a consistent deployment operation and maintenance experience.
The future
In the future, a large number of Serverless-based front-end integration frameworks and tools will emerge in the open source community. Webassembly makes the front-end integration break the limitations of the development language, and can be developed with any development language, such as java, go and so on. Because javascript is born for the front end, typescript is the current working front-end development language, the front and back ends are unified with typescript, other languages can be called by the typescript language through webassembly technology may be the best choice.
To become a popular Serverless-based front-end integration framework, you need to have a few characteristics:
Open source is not bound
Community operation
Forming standard
Simple model
Conclusion
Serverless technology makes us take the left foot to the door of the new world, please let the integrated framework based on Serverless help us take the right foot. At the same time, please stop calling me a front-end development engineer, I am a business application development engineer.
Quan A
Q: does front and back end integration need to publish the front and back end code to the same place?
A: no, release separately. The front end can be sent to CDN and the back end can be released to Serverless platform, such as Ali Cloud function Computing, through a unified tool.
Q: will there be no back-end engineers in the future?
A: yes. The front-end engineer only does the business logic code of the front-end and the back-end, and the back-end engineer does the real back-end. At that time, the back-end engineer will be more professional, and the front-end engineer may become an application development engineer (for the time being). For small and medium-sized enterprises, most of them may be application development projects, with a small or no professional back-end engineers.
Q: why not build a web application framework like expressjs?
The A:expressjs framework is designed without Serverless and does not take into account the technical architecture changes brought to us by Serverless. If we need a framework like expressjs, we can migrate the expressjs framework to Serverless to run, and there is no need to create another set.
Q: why the nodejs framework?
A:nodejs and front-end js use the same language, can make the front-end integration more extreme, webassembly can also let any language run in the front-end, can also achieve front-end language consistency, but js is created for the front-end, more affinity. But other languages can be compiled into intermediate languages through webassembly, and nodejs invokes functions provided by other languages through vm. It does not rule out the possibility that there will be a new runtime environment in the future to replace nodejs and be more suitable for multilingual and Serverless scenarios.
Q: what is the feeling of the extreme integration of front and rear?
A: the front and back end code is written in the same language in the same project. Define a back end interface method locally, and the front end calls the back end method just like calling the local method (for example, cross components, external services). The front end can abstract more common logic, such as tool classes, etc., and a developer can maintain the whole project. Without the pain of multi-project and multi-language switching.
After reading the above, have you mastered the method of how to analyze the front-end integration framework based on Serverless? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
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.