Epidemic statistics push robot developed by Serverless Function Computing

1、 Serverless function calculation

What is Serverless?

Serverless is defined as follows in Serverless Architectures:

Serverless was first used to describe applications that significantly or fully incorporate third-party, cloud-hosted applications and services, to manage server-side logic and state. These are typically “rich client” applications—think single-page web apps, or mobile apps—that use the vast ecosystem of cloud-accessible databases (e.g., Parse, Firebase), authentication services(e.g., Auth0, AWS Cognito), and so on. These types of services have been previously described as “(Mobile) Backend as a service", and I use “BaaS” as shorthand in the rest of this article. Serverless can also mean applications where server-side logic is still written by the application developer, but, unlike traditional architectures, it’s run in stateless compute containers that are event-triggered, ephemeral (may only last for one invocation), and fully managed by a third party. One way to think of this is “Functions as a Service” or “FaaS”. (Note: The original source for this name—a tweet by @marak—isno longer publicly available.) AWS Lambda is one of the most popular implementations of a Functions-as-a-Service platform at present, but there are many others, too.

I believe there are many children who don't understand this description. We can understand Serverless in this way:

Its Chinese literal translation is "serverless"

At present, there are several ways to interpret Serverless:

• In some scenarios, it can be interpreted as a software system architecture method, usually called Serverless architecture

• In other cases, it can represent a product form called Serverless product

It can be understood as Severless=FAAS+BAAS=Function as a Service+Backend as a Service

Alibaba Cloud function computing

Alibaba Cloud function computing is an event-driven fully managed computing service. Using function calculation, you do not need to purchase and manage infrastructure such as servers, but just write and upload code. Function calculation prepares computing resources for you, runs tasks flexibly and reliably, and provides log query, performance monitoring and alarm functions.

With function calculation, you can quickly build any type of application and service, and only pay for the resources actually consumed by the task.

Alibaba Cloud also provides free monthly quota for developers!

2、 Introduction of achievements

The statistical push of epidemic data is based on the calculation and development of Python and Alibaba Cloud Serverless functions. Realized the use of Python to crawl and collect epidemic data, and use function calculation and timing trigger to push the national epidemic data to WeChat every day.

3、 Background significance

Normalization of epidemic prevention and control. It is impossible to completely end the epidemic in a short time under the situation of continuous acceleration of the global epidemic. It is likely to be in the state of epidemic prevention and control for a long time. This requires us to be vigilant at all times and keep abreast of the epidemic situation. The epidemic data statistics push project conforms to this background. Enterprise employees can receive a simple push by opening their mobile phone WeChat every day to understand the epidemic situation on that day.

4、 Advantages and disadvantages

Advantages: Compared with the epidemic situation pushed by major media every day, the statistical push of epidemic data is more brief, and effective information can be obtained faster. It uses Alibaba Cloud FC function development, which is easy to maintain and does not need to pay attention to the infrastructure such as servers. It can automatically expand and shrink the capacity according to the demand of enterprise WeChat push, and the cost is extremely low. Use timed trigger, trigger program at regular time every day, and send data push without human intervention.

Inadequate: The text is monotonous, and the data visualization version will be launched later.

5、 Works display

Use Alibaba Cloud functions to calculate FC services:

Use timing trigger:

Final effect:

6、 Summary

Through Serverless, we no longer need to pay attention to infrastructure such as servers. We just need to write and upload code. As long as we pay for the resources actually consumed by the task, the monthly free quota can meet the basic use of developers. Now FC provides developers with one-stop serverless application management, from one-click application creation to fast experience.

Related Articles

Explore More Special Offers

  1. Short Message Service(SMS) & Mail Service

    50,000 email package starts as low as USD 1.99, 120 short messages start at only USD 1.00

phone Contact Us