Author: Liu Yu
Someone once asked me: What is the relationship between Alibaba Cloud Function Computing services and functions? I believe that there are still friends who have not figured out the connection between them.
In the past few days, Alibaba Cloud has officially released a "concept": application. So Alibaba Cloud Function Computing already has three layers of concepts: function-service-application, which is really dizzying.
From another point of view, small partners who follow Alibaba Cloud Serverless should have discovered two things:
- Alibaba Cloud Function Computing has not only released "applications", but is also hotly promoting "applications";
- Alibaba Cloud Function Compute launched an experience activity based on "applications": one-click deployment of network disks;
Why does Alibaba Cloud Function Compute release so many functions, and only a few functions will be operated together with experience activities? So what exactly is this "application" sacred? What does he have to do with the current "service" and "function"?
Briefly speaking from the business level
First of all, we need to make it clear that many concepts are abstract and not absolute, especially after the resources are associated with the business level. For example, what does the function correspond to? Is it a function, a method, a function, a business, or a framework? In fact, there is no strict division, so our exploration this time must be based on a kind of "the golden mean", a subtle feeling of "unexplainable and difficult to describe".
Secondly, because all nouns are abstract, there may be some differences between different development tasks and different businesses, so the following exploration is only for "most cases".
Before talking about function-service-application, let me put my own thoughts first:
Through this picture, it is not difficult for everyone to find that the so-called:
- Application : It refers to a slightly higher-level concept, which is actually a combination of one or more FaaS resources and one or more BaaS resources. For example, one of my photo album applet backends uses a function computing service (three functions are included below), a domain name, a bucket, a NAS, a MySQL database, a Redis database, and the corresponding VPC resources , log resources, etc., and these, to a certain extent, can be considered an application. Because from my personal point of view, these FaaS and BaaS resources are combined to realize a complete application function or business capability;
- Service : The service here refers to the service of function computing to a certain extent. It is actually a grouping of functions, or functions that we think are related and can be grouped together according to certain rules. It's just that the grouping here has a special point, that is, it has a certain configuration. In other words, a function computing service has an associated set of functions that use the specified log storage, VPC, NAS and other resources with the same business attributes or accomplish some business goals. Therefore, the service of function computing is actually "service-level configuration" and "a series of function resources";
- Function : relatively speaking, this can be considered a resource at the business level; for example, there are three functions in the back-end business of the photo album applet mentioned above:
<!---->
- Function 1: Implement a REST-style API to provide some functions for my applet. For example, adding, deleting, modifying and checking albums, adding, deleting, modifying and checking photos, etc.;
- Function 2: The uploaded photo will be stored in the object storage, and the function will be triggered through the object storage to achieve asynchronous image compression, Image Caption of the image, and clustering of people in the image.
- Function 3: Regularly clean/process/proof/analyze the corresponding resources;
In summary, it can be seen that: functions are more of a resource, corresponding to the granularity of our business; services are more of a collection of functions and abstract certain configurations; applications, more services a combination of resources.
Does "application" have "value"?
Function computing already has the concept of service and function. At first glance, function and service are "a kind of resource", then there are already two layers of concepts, and then a concept of "application" is added on top, and more applications are applied. It is not a kind of "resource", but a kind of "logic", a kind of "logic" that associates "resources", so what is the value of the application? Why have apps, why use apps?
In fact, from my point of view, "application" is a kind of mental upgrade to a certain extent, that is, the process of upgrading from resources to business logic. In addition, the emergence of "application" also means that what the serverless architecture delivers in the future may really be "application". How to understand this sentence? Looking at the current "application" of function calculation, it is not difficult to find that the current "application":
- Corresponding to a code repository, it can often be roughly considered that a repo is an application;
- Just put the business code on github (push/release) to trigger application construction and release (involving the release of different resources, etc.);
- Subsequent monitoring, alarming, multi-environment and other functions, and even the overall deletion of the application, can be done directly at this level;
Therefore, this is an idea of "playing Sererless architecture with application latitude". Of course, it is undeniable that the current "application" still has many functions in the process of improvement, but we can also see that he is also working on it. More delicate, more refined and more interesting.
Therefore, to a certain extent, application is a full-life cycle management capability that is closer to the business layer. It is a kind of "ideological upgrade that allows developers and business teams to pay more attention to their own business logic, their own applications, and their own functions." ". Compared with the application deployment and management at the traditional resource level, the "application" is more professional and clearer. You can see all the resources on one page, and manage these resources appropriately:
In addition, how many times the application has been deployed in total, and the results/logs of each time can be viewed directly (and can be rolled back at any time):
In the near future, monitoring, alarming, and environment division will be reflected in the application latitude, which will be "a boon for business development." At least, I am eating my own dog food, and the more I eat it, the more I eat." Addiction".
The app is "open"
The "application" launched by Alibaba Cloud Function Compute is a very interesting capability. There are two ways to create it. One is to directly import an application that conforms to the Serverless Devs specification, and the other is to create an application through an existing template. Quickly create:
Through the above figure, it is not difficult to find that in the application, there are various web frameworks, web applications, and artificial intelligence cases for reference. Therefore, it is not difficult to find that, on the one hand, the application is trying to solve the "pain point" of how to make Serverless onboarding quickly (the threshold for getting started/experience is relatively high), on the other hand, it is also empowering developers with more cases to be simple and fast. , Easy to get started with Serverless architecture (there are even many applications out of the box).
Take an application of lossless compression of PNG images that a friend asked me to help write in the first few days as an example:
As a community contributor, after developing an application, I only need to fill out an official application inclusion form (reference for developing applications and submitting forms: https://github.com/Serverless-Devs/Serverless-Devs/discussions/439 ):
After the review is passed, it can be automatically synchronized to the application center for more people to test/use. When others are using it, it is also simple to click twice:
- create
- deploy
- experience
The whole process went smoothly and smoothly. At present, the templates in the application include dozens of community-contributed applications including AI target detection, OCR recognition, etc.:
So when I say Open here, I also mean that the "application" of Alibaba Cloud's function computing actually echoes the community open source project Serverless Devs. A subset of open source", in other words, all the cases/templates of this "application" are actually another manifestation of the Serverless Devs application center: working hard to open source, contributing to open source construction, and opening up the ecosystem. It is the attitude of playing with the serverless architecture with developers. Of course, I also very much hope that more developers can play the serverless architecture with us. Now there are more and more community projects appearing. I believe this Just getting started.
1 minute serverless deployment of personal network disk
Build a real network disk in 1 minute
1 step to get the ever-changing fidget spinner!
This scenario is based on Serverless Application Center + Alibaba Cloud Function Computing + KodBox, an open-source enterprise-level online file management system , which allows you to save resources at will, download at unlimited speed, use multiple terminals, and share with friends with just a few clicks. The exclusive personal network disk for resources...
When: May 9 - May 20 (during working days)
Prize: 200 Fidget Spinners per day
Recommendation: PC-side experience
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。