5 minutes to build a no-service picture Yellow Web application (based on functiongraph)

Source: Internet
Author: User

Function Workflow (FUNCTIONGRAPH,FGS) is an event-driven, function-managed computing service with managed functions that operate in a millisecond-scalable, operation-free, high-reliability manner. Even in some complex web scenarios, function workflows can be incredibly powerful.

With a function workflow, developers do not need to configure and manage servers, simply focus on business logic, write function code, build applications in a server-less way, and then develop a resilient, highly available backend system that is billed for the resources consumed by the actual run. It greatly improves the efficiency of development and operation, and reduces the operating cost.

In this paper, we will show how to quickly build a non-service image yellow Web application through the function workflow, for example, the application receives the user's uploaded pictures, and analyzes the images to determine whether they are pornographic images.

Imagine, if we develop this application through traditional patterns, how do we need to develop it?

Even based on the current cloud platform, we still need to buy cloud server, focus on its specifications, mirroring, network and other indicators of the selection and operation, and then in the development process may also need to consider the integration with other cloud services issues, so that the code is coupled with a large number of non-business code, and the server and other resources are not on demand, May result in a lot of extra expenses.

Now we can quickly build this system with a function workflow service, without having to focus on the server and running on demand,

Create a function, call the Huawei Cloud Content detection service in the function to provide the image of the yellow interface, the implementation of the image yellow function, and to configure a Apig trigger for the function, to provide the image yellow API, so as to build a complete picture yellow no service system. The static resources of the Web pages are then deployed in the Object Storage Service (OBS), where the user can access the front-end pages directly from the OBS. When the user uploads the picture, the page calls the image Yellow API that was built, and he automatically triggers the function execution, and the developer's function simply implements the logic of how to handle the picture after receiving the image (invoking the Content detection service), and finally returning the result to the front page. At this point, we have built a complete no-service image yellow Web application.

Now, we'll show you how to build this service-free application end-to-end, in a detailed tutorial: http://functiongraph-tutorial.obs-website.cn-north-1.myhwclouds.com/#/ Porn-image-analyse.

back-end System setup :

Enter the function service page of the image of the yellow template, the template has provided the code of the function in this application, after the code comments in the instructions to create a function, the application of the successful construction of the back-end system, the function created by the Apig trigger will provide a call to the backend function of the HTTP (s) API, Called by an external system, such as a front-end page.

Front-end Page Setup :

The front-end display has many, here we provide a demo for everyone to learn the reference, you can use the above detailed tutorial to deploy the front-end code package to OBS, quickly build a single-page Web application (SPA). Then call the previous step back-end to provide the interface, connected back-end system, complete the entire service-free image Yellow Web application construction.

Summary :

With the comparison of the non-service architecture and the traditional architecture based on the function workflow, we can see that it has the following advantages:

1. No need to focus on any server, just focus on core business logic;

2. function operation with business volume elasticity, pay on demand, execution is only billed, low cost;

3. With simple configuration of connected function workflows and other cloud services, even cloud services and cloud services, such as simply creating a apig trigger in this example, you can complete the connection of the API gateway and the function workflow, and then invoke the authentication yellow interface of the content detection service in the function. Then the function connects two cloud services together like a binder.

Function Workflow Address: http://t.cn/RDSM82v

5 minutes to build a no-service picture Yellow Web application (based on functiongraph)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.