Serverless architectures have rapidly emerged as a new technology concept in recent years. Using this architecture, developers can create a variety of applications for various industries. Many enterprises have already started adopting serverless products such as Alibaba Cloud Function Compute into their solutions. Serverless solutions help you build light, highly-flexible, and stateless applications easily. In this article, we will explore four common applications of serverless with Alibaba Cloud Function Compute.
Before we begin, let's familiarize ourselves with the history and features of serverless architecture.
Developers are constantly on the lookout for more effective ways to maintain the software development lifecycle. Every introduction of a new technology concept is accompanied with an increase of productivity. Similarly, serverless architecture was introduced to help businesses focus on application development. With serverless, businesses no longer have to worry about server infrastructure, reducing development costs and shortening the development cycle.
The development process for serverless architecture is built upon previous achievements starting from virtualization (cloud computing). Although the process is rather continuous, it is marked by several notable milestones:
Serverless architectures has the following features:
Specifically, Alibaba Cloud Function Compute provides you with the following advantages:
|Function Compute||Self-built Computing Environment|
|Reliability||Code and configurations are stored in OSS with automatic, multi-level redundant backup||
Serverless can be applied to scenarios that involves multiple devices accessing various file types, such as mobile phones and PCs uploading images, videos, and text files.
You can apply a serverless architecture for similar use cases on Alibaba Cloud by using Function Compute with Object Storage Service (OSS). After a user uploads video files to OSS, Function Compute is triggered to obtain and transmit the object metadata to the core algorithm library. Based on the algorithm, the core algorithm library pushes the relevant video files to the CDN origin site, hot-loading the specified video. In another scenario, after video files are uploaded to OSS, Function Compute is triggered to synchronize multiple transcoding rates and store the processed video files in OSS. This provides a lightweight data processing solution.
In multimedia processing scenarios, massive volumes of files are often uploaded to OSS for processing, such as watermarking, transcoding, fetching file attribute data. Function Compute can help users easily address technical difficulties in event-triggered computing scenarios through these features:
Serverless architecture is ideal for live video broadcasting scenarios. In the diagram below, the broadcasting room client collects audio and video streams from hosts and audiences and sends them to Function Compute for multiplexing. Function Compute sends the collected data to the multiplexing service for synthesis and pushes the synthesized video stream to CDN. Viewers can pull the live stream in real time to view the multiplexed and synthesized video.
In certain live video scenarios, multiple audience members may interact, so the host is simultaneously connected to multiple microphones. The host can connect multiple audience members or friends to the screen and synthesize the picture into a single scenario, which is then provided to the livestream viewers.
Serverless architecture addresses the difficulties that may arise in such scenarios. As a real-time audio and video forwarding cluster for the host and connected microphones, Function Compute automatically resizes multiple execution environments used to process real-time data streams based on the concurrent volume. After traffic peaks, Function Compute can reduce the resource volume appropriately. Code management capabilities are deployed on the cloud, allowing you to modify and maintain code iterations at any time. You no longer have to manage multiple software runtime environments.
Serverless architecture can be applied to Internet of Things (IoT) scenarios such as the one shown below.
The architecture is divided into two parts:
Smart device status processing also generates several key technical difficulties. You must design an efficient non-polling technical framework to process the status data from a large number of devices to the IoT platform. Then, you need a way to efficiently and transparently transmit the processed data to other products, such as writing to a database or pushing data to mobile terminals.
Customers can use a dispatch platform to choose from the services provided by various sellers, such as ordering food or buying products. The dispatch platform then notifies the nearest delivery staff to pick up the relevant product from the nearest seller and deliver the product to the customer. A simple process is shown in the following figure:
Such a process can be easily implemented with a serverless architecture. In the diagram below, Alibaba Cloud Function Compute is used with other products to develop a delivery dispatch system.
In this solution, Function Compute can provide dynamic resizing capabilities, while API Gateway performs authentication and ensures secure access. Function Compute can communicate with multiple products to seamlessly use other resources and content. All processed data is stored in Table Store databases, and all logs are directly loaded to Log Service for subsequent data reporting.
Through the preceding scenarios, we can conclude that serverless architecture brings a multitude of benefits not only to developers but also to businesses. Alibaba Cloud Function Compute helps you develop a serverless architecture while addressing cost, efficiency, and connectivity considerations.
Although Function Compute is applicable to many scenarios, it is not a one-size-fits-all solution. For example, it may not be the most cost effective solution for businesses that do not have significant request fluctuations. In addition, Function Compute's execution environment does not record states, so serverless frameworks are not well suited to tightly coupled applications. However, as an emerging technology, serverless frameworks have yet to show its full potential for developers and businesses.
Alibaba Clouder - March 14, 2019
Alibaba Clouder - June 23, 2020
Alibaba Clouder - August 22, 2019
Alibaba Cloud Serverless - December 4, 2019
Alibaba Clouder - November 12, 2018
Alibaba Cloud Serverless - May 9, 2020
Alibaba Cloud Function Compute is a fully-managed event-driven compute service. It allows you to focus on writing and uploading code without the need to manage infrastructure such as servers.Learn More
API Gateway provides you with high-performance and high-availability API hosting services to deploy and release your APIs on Alibaba Cloud products.Learn More
More Posts by Alibaba Clouder