Dave
Assistant Engineer
Assistant Engineer
  • UID627
  • Fans2
  • Follows0
  • Posts55
Reads:2613Replies:1

Alibaba Cloud function computing - an event-driven serverless computing platform

Created#
More Posted time:Oct 28, 2016 13:15 PM
Abstract: Alibaba Cloud function computing is an event-driven serverless computing service. You only need to compile and upload the code, and Alibaba Cloud function computing will execute the code in a reliable way and scale smoothly with the changing access stress.
From the first cloud service S3 launched in 2006 by AWS, the storage, computing and other IT infrastructure capacities have been provided to the users in the form of service. In the past decade, cloud services have profoundly changed the ways for society to obtain and use computing capability. The cloud services themselves are also evolving quickly at an extremely high speed with new forms of service emerging in an endless manner. Serverless computing is among those services. Alibaba Cloud function computing is an event-driven serverless computing service. You only need to compile and upload the code, and Alibaba Cloud function computing will execute the code in a reliable way and scale smoothly with the changing access stress. You can trigger the Alibaba Cloud function computing service with events after associating the code with multiple event sources, or directly call the service through HTTP requests.
Taking the development of the backend system for a mobile application for example, traditional practices would require you to do the following:
1. Make a reasonable estimate of the business volume, purchase servers (physical machines or virtual machines), install and configure the system, network and the dependent software stacks.
2. Consider the error tolerance, resizing, resource reusage and load shifting issues.
3. Establish sound monitoring and warning services.
4. Deploy and maintain the system.
This way of system establishment forces users to devote much of their effort to non-differentiated server-related issues, prohibiting them from focusing on edging the core competitiveness of the business. With the serverless development model however, you only need to focus on the implementation of the business logic. The capacity planning, deployment and maintenance, error tolerance and scaling issues of the servers are handled by the computing service provider. The figure below shows the implementation of an image service using the function computing.


1. The user implements a group of functions to process the image, such as image scaling and Face Service. The processing logic can be either through libraries to conduct computing in the function computing environment, or through calling other image processing services to achieve more complicated processing. The user configures the function to make it respond to the Object Storage Service (OSS) events.
2. After the mobile application uploads an image to Alibaba Cloud OSS, the corresponding function will be triggered and executed. The function stores the execution results to OSS again, and notifies the terminal users through Alibaba Cloud Mobile Push service.
3. Mobile applications can also access the function through the API Gateways to complete other functions, such as user management.
We can see that you do not need to care about server-related issues if you establish business systems based on function computing, boasting significant advantages.
1. A high development efficiency.
o You do not need to care about the error tolerance, loading balancing and automatic scaling issues related to the servers, and the development difficulty is also reduced.
o The function computing requires you to decouple the system into a group of single-function functions which will work together to accomplish the processing. Therefore, some public components, such as identity authentication, can be abstracted to be handled by dedicated services, without additional efforts from you.
o The function computing service has a built-in log and performance indicator monitoring function, and you do not need to configure and maintain related systems.
2. A low O&M cost.
o You do not need to manage servers.
o Deployment and upgrading operations are simplified to code uploading, and rollbacks to a specified version become quick and easy to use.
3. Smooth scaling.
o The execution capabilities of functions are horizontally scalable in real time and totally transparent to you.
o This is very suitable for applications with apparent access fluctuations.
4. A low cost.
o The function computing fees are charged according to the actual usage.
o You don't need to worry about reserving resources to meet the demand in peak periods, nor will you pay for idle resources.
In a broad sense, the development of cloud computing is actually the process of becoming serverless. For example, with Alibaba Cloud OSS, you can achieve serverless storage; with Alibaba Cloud Data+ computing platform, you are able to achieve serverless big data processing. Services emerging in recent years such as the Platform-as-a-Service (PaaS) and Container-as-a-Service (CaaS) all achieve serverless processing. Every kind of service abstracts computing at different granularity levels. Alibaba Cloud function computing, however, promotes the abstracting granularity of computing to the function level, namely the Function-as-a-Service (FaaS). Compared with PaaS and CaaS, FaaS supports smaller granularity for metering and scaling, thus featuring unique advantages in cost and scalability smoothness.


The table below makes a comparison between IaaS, CaaS, PaaS and FaaS in different dimensions.


Development Efficiency
• Low: You have to deal with server-related issues, including error tolerance and resizing.
• Medium: You only need to implement the business logic.
• High: You only need to implement the business logic and establish various service combinations effectively in the event-driven manner. For example, uploading an image to OSS will automatically trigger corresponding function processing.
Scalability
• Low: With the server as the granularity, resizing can be completed within minutes.
• Medium: With the container as the granularity, resizing can be completed within seconds.
• High: With the event/request as the granularity, resizing is transparent to users. The service is automatically scalable with the volume of traffic.
O&M Availability
• Low: You need to manage the OS layer and above.
• Medium: You need to manage the container layer and above.
• High: You need to manage the application layer and above.
Cost
• High: Charges are collected by hour according to the resource specification.
• Low: Charges are collected by millisecond according to the resource specification.
To sum it up, FaaS such as Alibaba Cloud function computing is a type of very interesting service. Their advantages such as the ease of use, low costs, high availability, and real-time scalability make them quite attractive across various very different scenarios.
• Frequently-visited applications, such as development of the backend systems of websites/mobile applications. Alibaba Cloud function computing features high availability, real-time auto scaling, charges-on-demand and a low cost. You can quickly implement the system prototype, expand smoothly across systems of the same architecture to achieve rapid business scaling.
• Applications with a low access frequency, such as various data import and export jobs, or cron jobs in the system. Alibaba Cloud function computing not only ensures reliable execution of jobs, reduces O&M burden, but also charges fees in a pay-as-you-go manner, cutting down operational costs.
Although FaaS is a new concept facing challenges in terms of the tool chain and ecological maturity, it has unveiled a huge potential. Alibaba Cloud function computing will be committed to creating a serverless computing ecosystem and maximizing value to users. Stay tuned in!

zjuwangk
Intern
Intern
  • UID3779
  • Fans0
  • Follows0
  • Posts1
1st Reply#
Posted time:Oct 4, 2017 2:11 AM
A few concerns:
- How long does it typically take to deploy the code?
- Can we test code locally before deployment?
- Does local compilation require special system image?
Guest