May 27, 2021 A minimalist getting started manual for cloud development serverless
The current industry Serverless is a hot word, all kinds of tall concept packaging, like the castle in the sky. B ut the development of a large number can only be across the shore to see flowers, hope Mei thirst. I t's important to be clear about trends, and it's important to get people to the ground. The following from the perspective of commercial side technology, cloud development as an example, analysis of the development of technology.
First of all, we need to be aware of the development trend of technology.
First of all, we look at the development of business, business development generally revolves around the following four elements.
Business development must depend on upstream and downstream, so in the role positioning, the most important thing is what business value you can bring to the customer, can help him make a profit. I f this question is clearly answered, the company's survival is a high probability event. T hat is, to help customers realize business value. T his is demanding and difficult, especially with the commercialization of technology.
The cloud computing industry is more about the next three. T echnology is hard to measure to visually generate business value for customers. S elf-argument is a very difficult process, and it's hard to say how much user growth you've brought with you with the cloud of C, or how much revenue you'll lose without your cloud. O ften the first step in the commercialization of technology is to "reduce costs".
Reducing costs This seems simple, but it's very difficult and requires deep technological innovation. I f you find a way to significantly reduce costs, the industry will change dramatically, including that upstream and downstream relationships will be redefined. N ow the competition for cloud services is hot????, every cloud manufacturer is racking their brains to do technological innovation, hoping to reduce costs through technological innovation. T he whole industry, there are a number of cloud manufacturers are happy, cherish this has not yet completely divided the winning and losing era; S o on IaaS (Infrastructure as a Service), there's only one way out: innovation. C ut it out to say: lower and stable.
Efficiency is
straight up, that is, how to make the customer's business grow faster, how to make people more efficient. A
s shown in the figure below, the vast majority of cloud manufacturers are doing business with two-way vendors, but this two-way vendors have much higher technology requirements than other industries. T
he era without cloud computing is the basic resources, each self-processing. W
ith cloud computing, roughing is done by cloud vendors, and is a benchmark at the IaaS layer, but the costs and benefits here are transparent. H
ow much profit margin, has long been the industry's common understanding. S
o the way out for cloud vendors to get high returns is to make resources "fine", providing value that can be close to the business.
This process is difficult, so PaaS (Platform as a Service) and SaaS (Software as a Service) are the only way to blur some value estimates, especially SaaS near the business.
Cloud computing revolves around "reduced efficiency". A t present, it is not a business that can "fast" make a lot of money, but more to increase the productivity of the industry. But we can't deny that the future of water companies, gas companies can also make money.
The other is "experience enhancement." U sers are developing, and there is a pursuit of beauty and experience. T he 2000 Internet product experience is estimated to be one that no one can look at now. T hen around the "experience enhancement" of the service, is every step of the need, but also close to customers and users. For example, video cloud services, such as live cloud services, CDN services, are a manifestation of experience enhancement.
Cloud computing from roughing to fine processing, to value-added services, the trend is "integrated cloud services, package sales", to put it more directly is "can you pack to stay", developers do not know the details, developers do not want to touch the details. ps?
Obviously, the concept of Serverless was proposed in the hope that "the package is complex and the exposure is simple".
From the initial to the rapid development of the Internet, applications and business models are becoming more and more complex, the challenges to the technical team are increasing, so the job functions appear fine division of labor. B
ut the development of technology will always spiral up, slowly began to self-revolution. C
an you automate operations, can you devops? F
urther, research and development of self-revolution, can we further improve efficiency?
Can devopsless, whether only application development engineers are required....
Therefore, "complex packaging, simple exposure" must be the trend of technology, but also the trend of commercialization.
Serverless is technically "complex package, simple exposure", and from a commercial point of view, it is to drive multiple processing of resources, fine deep processing, can drive the integration and integration of PaaS layer services.
Serverless is an idea that there is currently no standard product, between FaaS (function-as-a-service) as a product host and FaaS plus BaaS (back-end as a service) as a product host. s erverless.com is standard and needs to be considered. Is it the practice of ideas and the landing of business that also needs to be ????
The following image is a simple FaaS model.
We also want to ask:
So the benefits of FaaS are:
Conclusion: FaaS consolidates cloud servers and networks at the IaaS tier and reorganizes computing units.
Functions are just places where logic is run, and it is not possible to have functions. C
an a cloud database be provided? C
an cloud storage be provided? I
s monitoring available? D
o you want to provide log services? A
t this point, you'll find that FaaS is just a computing container, or "cell." W
e develop a business that can't just do computing, we can't do data storage, we can't do file storage.
So the problem for BaaS service providers is to consolidate PaaS (Platform as a Service) products, all in the cloud, without the need for on-premises build and deployment.
Performance and stability, security are supported by services provided by cloud vendors.
BaaS assembles the service and attempts to package it in a complex way.
With FaaS and BaaS, Serverless's philosophy is no longer an aerial pavilion. The computing containers for the service are available, or are the computing units more reasonable, and can the underlying IaaS and PaaS layers also be converged?
Previous concerns:
Tencent is currently
launching
Cloud https://cloudbase.net/,
a product implementation of Serverless.
None of this needs to be cared about in cloud development.
With so much integration, I think the first step in completing the bag stay is the "cloud" side OK.
As shown in Figure 1 above, in general, cloud functions are used to build Serverless services, and cloud functions act as logic and glue. M
ost Serverless scenarios are now on the market. S
o do you want to improve the "end" side? F
or example, I am in a secure client environment, upload a picture, do you want to write a cloud function, and then the cloud function to call the database service?
To get a list of data, do you have to write a cloud function first, and then request the function to get the data?
How to further improve efficiency and further integrate the end side. T
encent Cloud Development therefore provides an end-side SDK, such as a JS-SDK that can operate the cloud database directly, cloud storage, so that some capabilities, no longer need to write cloud functions, can be directly in the client with the SDK provided API operations, as shown in Figure 2 below.
nt.
const tcb = require('tcb-js-sdk');
const app = tcb.init({
env: "环境ID, 环境是一个集合,包含数据库、存储、云函数的资源"
});
// 1. 获取数据库引用
var db = app.database();
//2.获取数据库集合
//3.条件查询
db.collection("users")
.where({
name: 'vczero'
})
.get()
.then(res => {
console.log(res.data);
});
Such a client engineer, you can assume all the "application development" tasks, the collaborative work is their own. R eally do it, SDK in hand, the app says there is. Cloud development now offers not only JS-SDKs, but also Flutter SDKs, .NET SDKs, Node .js SDKs.
With the analysis of the core concepts of Serverless and cloud development, we can clearly see that the general trend in technology development is irreversible: