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

Case Analysis of serverless and Cloud Development

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

What this article shares with you is an example analysis of serverless and cloud development. The editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.

An epidemic in early 2020 gave us more time to stay at home and study. Not long ago, I was invited to serve as the guest judge of the online commonweal hacker marathon of "working together to fight the epidemic" sponsored by Tencent. The difference between this dark horse race and the past is that the whole process is online, free to form a team, through 2 days to develop a WeChat Mini Programs related to fighting the epidemic. In two days, nearly 200 people submitted more than 80 entries.

There are also two technical points in this competition, namely, "cloud development".

When it comes to cloud development, we naturally think of another concept, which is Serverless. There is no doubt that 2019 is the year of large-scale promotion of Serverless, whether it is Serverless-related books and articles, or various conferences on Serverless-related topics, are very popular. There are even many articles calling Serverless front-end 3. 0.

Front-end 1.0 represented by ajax

Front end 2.0 represented by Node.js

Front end 3.0 represented by Serverless

Node.js brings the capabilities of front-end JavaScript to the server side, making it easy for front-end developers to create Full Stack or (BFF) Backends for Frontend. Many front-end developers also define their career goals as full stack engineers. Obviously, this runs counter to the mainstream concept of software development: let professionals do professional things. Many developers have also slowly changed from "full-stack engineers" to "full-time engineers"-they can do anything, but they can't do anything well.

As a front-end developer, you also know how to configure nginx. But is your nginx really the best? Why not give it to a professional to do it?

As a front-end developer, you also know how to configure mysql. But is your mysql really the best? Why not give it to a professional to do it?

As a front-end developer, do you really understand concurrency, network, expansion, disaster recovery, monitoring, and logging? Why not give it to a professional to do it?

Through chatting with several developers during this dark horse contest, I got a general idea of cloud development. Basically, it can be thought of as a set of best practices and solutions built on Serverless, covering a combination of FaaS (Function as a service, function as a service) and BaaS (Backend as a service, backend and services).

The implementation is the model shown in the following figure:

Based on the functions and services provided by the cloud development system, front-end developers can access the business logic layer hosted by cloud function and the data storage layer supported by cloud database and cloud storage at a small cost, in addition to UI and interaction logic. In short, the focus of the front end is: interactive logic + business logic (cloud function) + data (cloud database / cloud storage).

Many articles about Serverless will mention CDN (Content Delivery Network, content delivery network), which is the first Serverless service that most front-end developers come into contact with, even though we have been using the term Serverless for a long time. Developers using CDN do not need to care about the privacy, security and authentication mechanism of files, and do not need to know the status of CDN server and the specific location of file storage. They only need to deploy files. CDN is Serverless for front-end developers.

In this dark horse competition, more than 80% of developers use cloud development, and the most frequently used feature is cloud function. Cloud functions are similar to AWS Lambda. Developers only need to write the core code in the language supported by the platform and set the conditions for the code to run, then they can run the code flexibly and safely on Tencent Cloud infrastructure.

The most obvious advantage of SCF is that users only need to write the most important "core code" and no longer need to care about surrounding components, which greatly reduces the complexity of building service architecture. Without any manual configuration, the cloud function can be scaled and scaled horizontally according to the number of requests. Regardless of whether the number of requests per day of your application is at a peak or trough, SCF can automatically arrange reasonable computing resources to meet business needs.

One of the biggest advantages of cloud development in this dark horse competition is "zero deployment, zero maintenance", so the contestants are developers and there are no professional operation and maintenance engineers. And any Mini Program online, in addition to the Mini Program, there are gateways, computing services, infrastructure management, databases, file services, caching services and so on. Cloud development provides a more complete server architecture and can ensure the stability of services.

The above is the example analysis of serverless and cloud development. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

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