Author: Yao Lantian (Ten Mirrors), technical expert of Ant Financial.

Summary: Traditional R&D mode has been unable to adapt to the requirements of rapid iteration and R&D collaboration in the digital transformation of enterprises. It is urgent to build R&D performance practices that meet the characteristics of business scenarios and effectively support the requirements of high concurrency and continuous iterative integration. This paper will focus on how Alipay, with the rapid development of the mobile market, gradually precipitates and optimizes the research and development efficiency practices suitable for business development needs.

Live video) : t.cn/Ai9HuCNT

Hello everyone, I am Shijing from alipay terminal engineering and technical team. This paper will lead you to understand how Alipay mobile terminal develops with the development of the mobile market, and gradually precipitation and optimize the research and development efficiency practices suitable for business development needs.

Background of 0.

  • How to solve the rapid build of millions of code?
  • How to make hundreds of developers collaborate efficiently on the same App?
  • How to ensure the quality of delivery under frequent code changes?

Obviously, the traditional R&D mode has been unable to adapt to the requirements of rapid iteration and R&D collaboration in the digital transformation of enterprises, and it is urgent to build r&d performance practices that meet the characteristics of business scenarios and effectively support the requirements of high concurrency and continuous iterative integration.

1. Current situation of R&D collaboration platform

As for the construction process of Alipay’s mobile TERMINAL RESEARCH and development platform, we will first take a look at the current status of the platform, and describe how to refer to the “three-step work method” of DevOps to forward model our delivery value stream, as well as the core branch model, construction and continuous integration in these activities.

The development collaboration platform was started in 2014, and now supports more than 300W lines of iOS and Android client code, and the number of bundles split is more than 300. Our weekly construction times are 1.4W, the installation package will be gray scale 2~3 times a day on average, and the development and testing of nearly 1,000 students.

We have supported the delivery of Ant Group alipay, MyBank, Fortune, Koubei and other products. The technology stack supported has evolved from Android and iOS at the beginning to SDK, small programs, IoT and desktop applications of manufacturers. Underneath the output of these capabilities is a set of collaborative r&d processes that we have developed, from requirements through development, testing, delivery, and post-release feedback loops.

With the rapid development of Alipay business, from tools to super App, the number of codes has soared to 300W+. In terms of technical architecture, modular dynamic loading technology was adopted, which presented us with a problem: how to push 300+ bundles, developed and integrated in different teams, into a high-quality App to users’ mobile phones.

2. DevOps 3 steps

In the first step of the DevOps three-step approach, we modeled the forward value stream, divided R&D into five phases (requirements, Development, test, integration, and release), and defined the entry criteria for each phase. For example, the results of requirement analysis need to be broken down to the level of User Story, through the review of everyone’s requirements, to reach a consensus. Then, we extracted the most important activities in each stage. For example, in the development stage, the most common activities of the developers were code writing, code Review, and automated assembly lines triggered by code MR/Push, such as compilation, scanning, and automated testing. These phases and the activities and collaboration between people in each phase form the context of our delivery of the big picture, which we call the value stream.

By modeling the forward value stream and combining with the development practice of the team, an information architecture diagram of the r&d collaboration platform products can be obtained.

As shown in the figure above, over time, we precipitated a set of product infographics: From the very beginning just to install package to build an online tool, to product management, version management, after the splitting of architecture module, module build management information, according to the build of the product and the different scenarios, abstracts the build configuration, channel configuration, configuration of continuous integration, there are certainly other metadata, such as certificate information configuration.

We refer to Agile and Scrum practices, abstracting the concept of iteration to organize the resources involved in each module such as code repository, requirements, defects, tasks, continuous integration pipeline, and most importantly, teams and people. Releases define what we deliver and are also a large container into which the teams’ work is integrated.

This is the front page of the portal of our R&D collaboration platform. Developers can intuitively see the daily release and iteration information of their concerned projects, as well as the to-do list to be solved every day. Each category corresponds to the information architecture extracted on the previous page.

  • Unpacking the Dependency Configuration

As mentioned earlier, we responded to the surge in business requirements through architectural separation and modular team collaboration. The purpose of this screenshot is to give you a sense of our dependency configuration. The product of each module can be thought of as a Zip package that manages a dependency list of over 300 bundles in an installation package release. Our requirements integration is in a sense an upgrade of the module version in this dependency list. Module splitting also allows us to practice fast delivery in small batches, with the ability to release a large version in 2 weeks.

  • Branch model

For demand management, we can make use of Jira, Redmine and other tools, or connect with internal project management platform. Here I’ll start directly with the development phase activities.

First, MR, here’s our branching model: “Branch based, trunk based”. In the development stage, iteration branches are created based on Master, Feature branches are created based on iteration branches, and Code Review points are made before merging into iteration branches by MR method. In the integration phase, the Bugfix branch can be created directly from the Master branch and then back to the Master branch at MR. The release phase creates tags based on the client version.

1. Definition and technical architecture of the build

Let’s talk about building. I define build as the production of code and configuration executed in the environment by build tools and scripts. So we focus on these four elements: code, build script, execution environment, and product management. The code and build scripts are provided by the developers, and we help manage the environment and artifacts. IoT, for example, comes up with a requirement to support their build, which is to prepare a Docker image for them, define the input and output, and publish their product to a Maven repository or cloud storage.

  • Build: Technical architecture

The above is the type of construction business we support, scheduling is the core capability of execution, Docker and MacOS are the environment we are involved in, with Jenkins to connect these execution machines. The environment management part is mainly Docker, And Windows has good support for Docker. Our IDE construction uses Windows Docker. We have more than 30 Mac Pros and use Ansible to do some preset and software upgrades for better management.

  • Construction: the Demo

This is our Android installation package construction, which takes 3 minutes. Through Jenkins’ interface, we can see the steps and time that we have gone through directly. If there are any mistakes, we can locate them quickly.

2. Automatic assembly line architecture design

From the single capacity building of construction, gradually expanded to static scan, automated testing, package size check, security scan and other verification requirements. We first thought of continuous integration assembly line. We investigated Jenkins, Gitlab, Drone, CircleCI, TravisCI and other mainstream CI tools, and finally decided to develop a CI platform to connect the verification services of various teams within the company. From this architecture diagram, we can see that the core of CI is the definition and parsing of Pipeline Pipeline, validation execution, and access protocol connecting various services. The upper layer is the type of business supported and the mechanism setting that triggers the pipeline.

Pipelining also keeps us thinking about how to visualize better, and the reverse feedback Settings that DevOps practices in the “three-step process.” For example, how to quickly verify the assembly line layout, hierarchical verification and effective feedback. Quick fixes based on feedback.

  • Automated pipelining: List Demo

This is our continuous integration list page, select IOT new business quick trial and error, show both scan and smoke test to development test students, so that they have a global understanding of a validation after code Push, and then they can better optimize local nodes, such as what reports smoke test gets.

  • Automated pipelining: Sample Demo

This is a detailed page of the pipeline. Click on each node to see the execution status and product information, dependency information, etc. Each node can be skipped or restarted from the failed node to meet the application scenarios of different phases of the service access pipeline.

1. 3. Smart trashes

Next we will introduce some of our internal grayscale release of some quality indicators design. This is the interface that we go through with in-gray, out-gray, and release after integration, and at each stage we aggregate quality and feedback to help us move forward with each stage.

  • Release quality score

This is a summary of the quality of the release, as well as the grayscale. The curve of quality points can well match the rhythm of our work. Although quality points are very difficult to design in the beginning and not easy to measure comprehensively and accurately, quality points must be created and then iterated. You can start with Sonar’s Quality Gates and its Quality dimension.

  • Release: Quality dimension

This is our design of quality dimension for your reference.

3. Summary

Finally, a brief summary is made. The above content firstly introduces the status quo of alipay client research and development. The first step of DevOps “three-step working method” is forward modeling workflow, sorting out the five stages of demand, development, test, integration and release and the important activities in each stage, forming the context diagram of value flow. And organize our product information architecture with reference to agile development practices. Then it focuses on the design and implementation of our construction and continuous integration pipeline, and practices the reverse feedback mechanism of “three-step work method” through the design of pipeline layout and quality points in the release stage. Three steps. The third step of continuous learning and improvement can be achieved based on the previous two steps.

The practice of DevOps of Alipay mobile r&d introduced above has been partially exported through the mobile development platform mPaaS.

Through mPaaS, our research and development management of mobile terminal products can fully save management costs and improve research and development efficiency from product requirement preparation, research and development, construction, verification and integration.

As the software research and development mode gradually evolves from traditional waterfall development to agile development and DevOps, and becomes more and more automated and intelligent, the unified online and process completion of R&D, testing and release will comprehensively improve the collaborative efficiency of R&D and bring more business value to enterprises.

Due to space limitations, many technical points we can’t one by one, to welcome you all through the technical documentation or click on the “reading” further understand mPaaS: tech.antfin.com/docs/2/4954…

Recommendation: | activity MTSC test development conference 2019

MTSC2019 5th China Mobile Internet Test and Development Conference will be held in Beijing International Convention Center on June 28-29, 50+ from Google, BAT, TMD and other first-line Internet enterprises test big names to share exciting topics, Covers mobile automation testing, server-side testing, quality assurance QA, high-tech testing technology (AI+, big data testing, IoT testing) and other topics.

Several technical experts of Ant Financial will share exciting topics at the conference, including the evolution of mobile testing 2.0+ in Ant Financial and how the real-time code dyeing system completes code coverage detection. We are looking forward to communicating with you.

Past reading

The opening | ant gold clothes mPaaS core components of a service system overview”

Core Components of Ant Financial mPaaS Server: Analysis of Mobile End-to-end Network Access Architecture under Hundred-million-level Concurrency

MPaaS Core Components: How does Alipay build public Opinion Analysis System for Mobile Terminal Products?

“MPaaS Server Core Components: Mobile Analysis Service MAS Architecture Analysis”

Component System Design of Ant Financial facing Hundred-million-level Concurrency Scenario

Evolution of Automated Log Collection and Analysis in Alipay App

Follow our official account for first-hand mPaaS technology practices

Nail Group: Search group number “23124039” by nail group

Looking forward to your joining us