This topic describes how to use Function Compute to resolve issues such as tight coupling of Research and development (R&D) and complicated operations and maintenance (O&M) in Xianyu.

Customer introduction

Xianyu relies on the Alibaba e-commerce system to provide frontend business. The unique business features and user demands require a more rapid and flexible R&D system in their presentation and business layers.

The head of the Xianyu architecture has lead the Xianyu technical team to deploy the serverless architecture since 2018. Revolutionary innovation often emerges when you resolve minor technical issues. The upgrade to a cloud-native or serverless architecture is a new path for Xianyu that other e-commerce companies can reference.

Customer pain points

  • The boundaries of the client interaction layer, glue layer of server business, and domain layer were not clearly defined. This resulted in high collaboration costs and long development and debugging cycles even for modest business requirements.
  • System stability was threatened by huge applications that exist on the server as well as the coupling of R&D, launching, and O&M. A single business issue could affect the entire application.
  • O&M costs were high. To ensure service stability and availability, Alibaba Cloud stipulates rules to launch each application, even for small internal applications that might have only one or two page views per day. This inevitably consumes some fixed resources. Resources consumed by a single application may be trivial, but the resources can add up when all applications are taken into account. A huge and high-impact application must go through stricter procedures that take at least 6 hours to complete before the application can be launched. This results in high O&M costs.


The serverless architecture enables cloud-end integration R&D, and greatly reduces the collaboration costs of small business. In addition, the serverless architecture provides a better method to split huge applications in the business glue layer compared with microservices.

The emergence of cloud-native technologies and the serverless architecture lowers the threshold of application O&M. The costs, stability, and quality of traditional huge applications are no longer mutually restrictive. Xianyu surmounted difficulties with Flutter in the process of implementing new technologies in the system for hybrid engineering and the high-performance component library. Regarding the serverless architecture, Xianyu established a cloud-end integration R&D system and the architecture of the business assembly layer on the server side.

The Xianyu client architecture is evolving based on Flutter. After Flutter unifies Android and iOS ends to improve R&D efficiency, Xianyu hopes to resolve collaboration issues between roles by using a combination of Flutter and the serverless architecture. These collaboration issues result in low R&D efficiency, and mobiles are losing connections with the business. The server does not have time to accumulate data in the underlying fields. The serverless architecture will greatly improve the R&D efficiency of Xianyu.

Benefits of the serverless architecture

  • An integrated framework with a cloud-end programming model is built by using Nexus APIs.

    This framework aims to unify the user interface, interaction, data, and logic of Flutter and function as a service (FaaS) programming models. Head of the Xianyu architecture mentioned that when the team first considered integrating Flutter and FaaS, their understanding of the meaning of "integration" was limited to the dictionary definition. All they knew was that end developers could use Dart to write FaaS functions. They thought FaaS was used only in the Backend for Frontend (BFF) layer, which had long been implemented in the frontend.

  • Command line interface (CLI) development tools are standardized.

    During cloud-end integration development, CLI tools are used to shield details of FaaS development. This helps standardize the FaaS development process on clients, and fits the development practices of client developers.

  • Backend-as-a-Service (BaaS) is implemented for basic services.

    Over the past two years, Xianyu has simplified basic service capabilities such as object storage, messaging, and search. At the same time, Xianyu has also built a metadata center for business domain layer services. The simplified basic service capabilities together with the existing business domain layer services enable client developers to efficiently assemble business.

  • The cloud and ends are integrated.

    Since Xianyu adopted Flutter into its business, a cross-end R&D system where Flutter is supplemented by HTML5 integrates the development of Android and iOS ends. When productivity is unleashed on the ends, the end developers are able to complete simple data assembly logic in the server development procedure and benefit small-scale business in particular.

  • Serverless transformation is implemented for traditional huge applications.

    The serverless architecture matches the features of the business glue layer and can be used to split traditional huge applications in the glue layer. This is also the next challenge that Xianyu is tackling.

At first, Xianyu was considered a dead-end company. Now it has tens of millions of daily active users and has revitalized a market that involves trillions of transactions. The emergence of Xianyu has had a major impact on both the e-commerce ecology at the frontend and the Internet lifestyle of users.

To support trillions of transactions, the technical team are working intensively to improve the serverless architecture for traditional huge applications.