In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to use ASW workflow to create a function orchestration". In daily operation, I believe many people have doubts about how to use ASW workflow to create a function orchestration problem. Xiaobian consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubt of "how to use ASW workflow to create a function orchestration". Next, please follow the editor to study!
Application and Service orchestration Workflow (Application Services Workflow,ASW) is an orchestration product used to coordinate the execution of distributed tasks. Distributed tasks and services are choreographed according to the definition of Tencent Cloud status language. The workflow will be executed reliably in a set order, scheduling cloud functions with multiple Tencent Cloud services step by step, and configuring them through low code. It can complete the tedious work of task coordination, state management and error handling needed to develop and run the business process, so that the R & D team can build and update applications more simply and efficiently.
01. Comparison between ASW workflow and traditional workflow ASW workflow traditional workflow ease of use has completed the integration of cloud services to facilitate the call of cloud resources. Integration needs to be developed manually. Feature richness uses TCSL syntax to support business logic such as selection, parallelism, loop, error handling and so on. Need to carry out secondary transformation based on business. Security cloud native applications, data cloud transmission & backup, the whole process meets the security compliance management and control requirements. Because of the low security, users need to consider the data transmission between multiple VPC & storage security. Maintenance cost is maintenance-free. Need professional team maintenance, high cost. The capacity of flexible expansion has the ability of enterprise-level flexible expansion, and it can deal with the challenges of large traffic calmly. Manual expansion is needed to solve architectural problems. 02. ASW Workflow Application scene Audio and Video processing
Using ASW workflow can help you organize multiple tasks into a complete process, such as transcoding, screenshot, content identification, content review, etc. Through cloud function, transcoding tasks can be sliced and processed in parallel, which can greatly improve the throughput of task processing and meet the video and social application scenarios with high real-time and high concurrency.
ETL job processing
In some data processing systems, it is often necessary to deal with a large amount of data periodically / planned. Using ASW workflow can quickly build a highly available data processing pipeline. For example, securities companies count the trading situation of this period every 12 hours and sort out the top5 of trading volume during that period, and process the transaction flow log of the second-killing website once a day to obtain errors caused by selling out so as to analyze the popularity and trend of commodities. ASW workflow uses cloud functions to process transaction data in parallel, writes the results back to the database service, and generates a series of reports at different latitudes. By using the almost infinite capacity expansion of the function, we can easily calculate the large-capacity data and complete the data modeling and analysis.
Gene data processing
ASW workflow can arrange multiple batch computing distributed jobs in series or in parallel, and reliably support large-scale computing with long execution time and large concurrency. For example, the genetic data are analyzed by secondary analysis to identify the variation of biological samples compared with the standard genome reference, and finally produce correlation results. ASW workflow can improve execution reliability, improve resource utilization, and optimize costs.
Automatic operation and maintenance
Automatic operation and maintenance often have common challenges such as complicated steps, low reliability of stand-alone scripts, complex dependence and low labor efficiency. In addition, the progress can not be visualized. ASW combined with cloud functions can solve these problems very well. For example, automated software deployment starts with building a Docker container, uploading a container image, tracking the drop-down image of each node and starting a new version of the image container. The logs generated by each step of the function are saved to the log service for query and sharing. Compared with the stand-alone operation and maintenance script, the automatic operation and maintenance script based on ASW has the characteristics of high availability, built-in error handling mechanism and graphical schedule.
AI machine training
ASW workflow can arrange a series of AI capabilities to complete a complex AI job scene training. You can use ASW workflows to accelerate the delivery of secure, resilient machine learning applications while reducing the amount of code you have to write and maintain.
03. How do I use ASW workflows?
Let's take orchestrating a cloud function as an example to teach you how to use workflow quickly.
1. Create function
Log in to the SCF console and create a SCF with the name sum and running environment Python 3.6.Click to enter the console address
P_jesu 4-28 2:53 #-*-coding: utf8-*-import json def main_handler (event, context): sum = 0 for i in event ["values"]: sum + = i return sum
two。 Create a workflow
Log in to the Application and orchestration Service flow console, click "New" on the workflow page, go to the create workflow page, select "Code creation", edit the workflow definition code in the "Code" area, and enter the following workflow definition:
ASW Workflow console address: click to enter
{"Comment": "StartAt": "sum", "States": {"sum": {"Type": "Task", "Comment": "call summation function", "Resource": "qrn:qcs:asw:ap-guangzhou:123456789:sdk:json:qcloud:scf:Invoke/sum/$DEFAULT/default", "End": true}
Resource defines the sum function to be called in the following format:
"qrn:qcs:asw: {function region}: {Appid}: sdk:json:qcloud:scf:Invoke/ {function name} / {function version alias} / {function Namespace}"
Click next, on the configure basic Information page, enter a workflow name, select the running role and workflow type, and click finish to complete the workflow creation.
3. Run Workflow
In the workflow list, click the "name" of the workflow you created, you can see the basic information of the workflow in the interface, and click "start execution".
In the pop-up start execution window, enter the input required by the workflow in JSON format, for example:
{"values": [1,2,3,4,5]}
Click "OK". After completing the status execution, you can view the implementation result on the details page.
At the bottom of the current page, in "execution History", click the SCF link in "Resources" to jump directly to the SCF console to view the details of function execution.
At this point, the study on "how to use ASW workflow to create a function orchestration" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.