Help Center > > User Guide> Overview> How FunctionGraph Works?

How FunctionGraph Works?

Updated at: Aug 16, 2019 GMT+08:00

FunctionGraph Function

Perform the following procedure to build and execute a function on the FunctionGraph console, as shown in Figure 1:

  1. Build and deploy an application.
    1. Create a function on the FunctionGraph console.
    2. Write service code, package it, and upload it to the function.
    3. Add event sources to the function, such as Simple Message Notification (SMN), Distributed Message Service (DMS), Data Ingestion Service (DIS), and Object Storage Service (OBS).

      When the function is triggered by a specified RESTful API or HUAWEI CLOUD service event, function instances are generated to implement service functions. FunctionGraph schedules resources during the function execution.

  2. View the logs and metrics of the function.

    You pay only for the code execution duration, and there is no charge when your code is not running.

Figure 1 Function service process

The process is explained as follows:

  1. Write code in Node.js, Python, Java, Go, C#, or PHP. For details, see the FunctionGraph Developer Guide.
  2. Alternatively, edit code inline, directly upload a ZIP file or JAR file, or upload a ZIP file from OBS. For details, see Table 3.
  3. Set an API or cloud service event source to trigger your function. For details, see Using an SMN Trigger, Using a DMS Trigger, Using an APIG Trigger, Using an OBS Trigger, Using a DIS Trigger, and Using a Timer Trigger.
  4. During function execution, FunctionGraph scales automatically based on the number of requests without the need for configurations. For details about the maximum number of function instances that can be run concurrently, see Usage Restrictions.
  5. FunctionGraph works with Log Tank Service (LTS), allowing you to query run logs of your function without the need for configurations. For details, see Querying Logs.
  6. FunctionGraph works with Cloud Eye, allowing you to view graphical monitoring information about your function without the need for configurations. For details, see Viewing Function Metrics.
  7. After function execution, FunctionGraph bills based on the compute time you consume. The billing is down to the 100 ms range.

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?

Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel