Components Overview

Last updated: 2020-04-29 14:12:38

    Serverless Components is a scenario-based solution that supports orchestration and organization of multiple Tencent Cloud resources for different use cases such as Express framework integration and website deployment. It can greatly simplify the configuration and management of Tencent Cloud resources while interconnecting Tencent Cloud products such as gateways, COS, and CAM, so that you can focus more on your business development.

    Differences Between Components and Framework CLI

    Item Feature Configuration Supported Languages
    Serverless Components A workflow framework that covers testing and deployment Mainly involves configurations of SCF and its triggers All SCF-compatible programming languages except Java, such as Node.js, Python, PHP, and Go
    Serverless Components Customer-oriented implementation scenario that supports the deployment and orchestration of multiple resources on the cloud (COS, API gateway, CAM, DB, etc.) Support customers to customize the configuration of corresponding resources Component itself is developed by Node.js, but supports multiple languages and development frameworks when used.

    Benefits and Features

    • Ease of use
      Serverless Components is built around your scenarios (e.g., websites, blogs, payment systems, and image services). It abstracts underlying infrastructure configuration and enables you to implement your business scenarios with simple configurations.
    • Reusability
      A serverless component can be easily created and deployed through a very simple serverless.yml File. Plus, its JavaScript library serverless.js Supports extension and reuse with simple syntax.
    • Fast deployment
      The deployment of most serverless components is about 20 times faster than traditional configuration tools. They allow rapid deployment and remote verification which help effectively reduce the workload of local emulation and debugging.

    Best Practices

    The following are commonly used use case templates:

    • Deploy Hexo static blog
      Quickly build a Serverless Hexo site through Serverless Website components:
    serverless create --template-url
    • Rapid construction of REST API
      Through Serverless SCF components to quickly build a REST API application to achieve GET/PUT operation.
    serverless create --template-url
    • Deploy Serverless full-stack Web applications (React.js)
      This example uses React as the front end and Express framework as the back end to deploy Serverless full-stack applications through multiple Serverless Components.
    serverless create --template-url
    • Quick Deployment of a Full-stack Application (vue.js + express.js)
      This example uses Vue as the front end and Express framework as the back end to deploy Serverless full-stack applications through multiple Serverless Components.
    serverless create --template-url

    Serverless Components support Matrix

    Currently, Serverless Components supports rich multilingual development frameworks and applications, as follows:

    Basic components:

    High-level components:

    • @ serverless/tencent-express -rapid deployment of components from Express.js-based back-end services to Tencent Cloud functions
    • @ serverless/tencent-website -quickly deploy components of static websites to Tencent Cloud

    Third party contribution:

    • @ twn39/tencent-fastify -Rapid deployment of components from fastify.js-based back-end services to Tencent Cloud functions
    • @ twn39/tencent-php-slim -quickly deploy the components of the back-end service based on the Slim PHP micro-framework to the Tencent Cloud function

    In addition, all Serverless Components can be found in the Github warehouse to view details.

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback