Function calculation is an event driven all hosting computing services, you write code upload function calculation, and then through the SDK or RESTful API to trigger the execution function, at the same time you can also through the cloud product event to trigger the execution function, for example, the OSS ObjectCreated/ObjectRemoved events. Function computing is integrated with various cloud products, such as object storage (OSS), log service, API gateway, table storage, etc. The following data flow diagram shows how to use the function calculation: ①, the developer wrote the code, currently supported languages such as Java, NodeJS, Python, etc., see details. (2) Upload the code to the function calculation through API or SDK, console page or command-line tool Fcli. Function calculation can be triggered by API&SDK, and function calculation can also be triggered by event sources of cloud products. (4) During the execution of function calculation, the function calculation will be dynamically expanded according to the amount of requests requested by users to ensure the execution of peak requests. This process is transparent and unaware to users. (5) After the function is executed, you can check the execution cost through the bill. According to the actual execution time of the function, the charging granularity is accurate to 100ms. See the billing item for details.

Through the previous examples, you learned the basic concepts of functional evaluation. With the help of powerful command-line tools, you can quickly build a Web Server sample application with highly available, real-time elastic scaling capabilities. Function calculation has the following advantages

High development efficiency. Functional computing can help you focus on the development of business logic and quickly build low-cost, highly available, flexible and scalable systems

Real time elastic expansion. Function calculation can help you cut peaks and valleys and reduce costs, which is ideal for business scenarios where loads have obvious peaks and troughs

Low operation and maintenance costs. You do not need to manage and maintain infrastructure such as machines, greatly reducing deployment and maintenance difficulties

The basic concept

Service: A Service is the basic unit of resource management. You can perform authorization, log configuration, and create functions on the service. These Settings are shared by all functions under the service. There are limits to how many functions can be created under a service, see Function calculation restrictions

Function: A Function is a piece of code written by a user that performs a specific Function triggered by an event. Functions are the basic units of scheduling and execution.

Event: Anything that triggers the execution of a function is called an Event. For example, an HTTP request to call a function can be viewed as an event. Uploading an object to a specific OSS bucket and triggering a function call is also an event

Trigger: Users define and manage how events are generated through triggers. For example, when you create an OSS PutObject trigger, when you put an object to the specified OSS location, an event is generated that fires the corresponding function

Ali Cloud function calculation details:

Ali cloud function calculation using tutorial

Function Compute is an event-driven, fully managed computing service. With functional computation, you don’t need to manage infrastructure such as servers; you just write code and upload it. Functional computation prepares you with computational resources to run your code in an elastic, reliable manner. Even better, you only have to pay for the resources your code actually consumes when it runs — there’s no charge when it doesn’t.)

Official website of Ali Yun University (Official website of Ali Yun University, Innovative Talent Workshop under cloud Ecology)