Best Practices for Service Frameworks Based on Flutter and FaaS

Integrate Flutter and FaaS with Xianyu

Figure 1–1
  • What capabilities should the Flutter + FaaS technical system provide as an infrastructure that supports integrated development?
  • Based on the new integrated infrastructure, what form will business development take?
Figure 2–1

Business Development Based on the Flutter + FaaS Integrated Technical System

Figure 2–1
  • Data Processing: This refers to traditional server-side REST APIs. In the integrated scenario, data processing is performed by FaaS functions. In fact, the responsibilities and positioning of this component have remained the same. Instead, only the format of organizational communication has changed. In traditional development, page development is completed by the server and client teams. In the future, integrated backend and frontend development can be done by a single developer. Conway’s Law points out that software designs tend to mirror the communication structure of an organization, so we may see major changes in this respect. However, we will first see changes in the method of interaction with the client, that is, the network communication method.
  • Network Communication: In the integrated scenario, frontend and backend development are done by one person, so the same languages can be used throughout a project. As a result, network communication will be lightweight, secure, and more intuitive. It will come to resemble common function calls. For this component, one possible change is that the communication model may break out of the client-server model. In a communication “session”, the client and server will be able to call each other more naturally in a “peer-to-peer conversation”. This will replace the traditional model where the client sends requests and the server responds to these requests. As network hardware improves, network connectivity is improving and communication costs are decreasing. This opens up a great deal of room for innovation.
  • State Management: Application states are a piece of special data cached on the client. Due to the isolation of technical systems, development communication costs, and network communication costs, it was previously necessary to cache state information on the client. However, in the integrated scenario, the influence of these factors is decreasing or eliminated. Therefore, we want to further remove states, minimize state management efforts, and move as much management work as possible to the underlying layer.
  • UI Rendering: This is an area that may be influenced by Flutter. The proposed reactive style and data-driven UIs are in line with our ideas. This is also the trend for UI development frameworks in the industry.
Figure 2–2

Integrated Framework Design Practices

Figure 3–1
Figure 3–2

Difficulties and Insights in Practice

  • Development and Deployment Toolchain: The Xianyu integration project relies on the support of the underlying development and deployment toolchain, which is part of the infrastructure. Deployment is also a key factor of the serverless system and we can observe the relevant tools, plug-ins, and platforms in the practices of frontend developers. Xianyu provides both a direct platform and in-house plug-ins. Over the long term, it will gradually standardize its system.
  • End-to-End Tracking and Monitoring: This component is mandatory for engineering. Xianyu directly benefits from the Alibaba Group’s platform, but also plans to build its own tools for special scenarios, such as learning from the hot update capabilities of Flutter functions and integrated local debugging.
  • Network Communication: Many of our ideas impose demanding requirements on network communication. Unquestionably, we expect the network quality to keep improving and costs to continue to drop. However, there will always be scenarios that involve poor network connectivity. Therefore, ensuring service stability and availability remains a challenge. Integration will weaken the development team’s perception of the network and provide new ways to use the network.
  • Component Splitting: In Xianyu businesses, we must always consider complex pages. In the previous design, we set aside the Converter part for this purpose. However, we are still exploring how to abstract the components used in frontend-backend integration and how to combine and reuse them.

Original Source:



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website: