Help Center> FunctionGraph> Getting Started> Getting Started with Common Practices
Updated on 2023-07-11 GMT+08:00

Getting Started with Common Practices

After understanding basic operations such as creating a function, you can follow FunctionGraph's common practices to implement your services.

This section describes the common practices that can help you better use FunctionGraph.

Table 1 Common practices

Practice

Description

Compressing Images

Use FunctionGraph to compress images.

Watermarking Images

Use FunctionGraph to watermark images.

Integrating with LTS to Analyze Logs in Real Time

  • Use Log Tank Service (LTS) to collect, process, and convert task logs of servers, such as Elastic Cloud Servers (ECSs).
  • Obtain log data with an LTS trigger, analyze and process key information in logs using a custom function, and filter alarm logs.
  • Use Simple Message Notification (SMN) to push alarm messages to service personnel by SMS or email.
  • Store processed log data in a specified OBS bucket for processing.

Integrating with CTS to Analyze Login/Logout Security

  • Use Cloud Trace Service (CTS) to collect real-time records of cloud resource operations.
  • Obtain operation records of subscribed cloud resources with a CTS trigger, analyze and process the records using a custom function, and report alarms.
  • Use SMN to push alarm messages to service personnel by SMS or email.

Periodically Starting or Stopping Huawei Cloud ECSs

To start or stop your ECSs at specified time, use FunctionGraph to call the corresponding ECS APIs.

  • Nodes to start: VMs that need to be started periodically.
  • Nodes to stop: VMs that need to be stopped periodically.

Processing IoT Data

  • Use FunctionGraph and IoT Device Access (IoTDA) to process status data reported by IoT devices. IoT devices are managed on the IoTDA platform. Their data is transferred from IoTDA to trigger the FunctionGraph functions you have compiled for processing.
  • This combination is suitable for processing device data and storing them in OBS, structuring and cleansing data and storing them in a database, and sending event notifications for device status changes.

Workflow + Function: Automatically Processing Data in OBS

Use FunctionGraph to process OBS data.