Overview of Meituan-Dianping Open-Source Development Tools: mpvue, Walle, SQLAdvisor, Leaf, and Robust
This article introduces several Meituan‑Dianping open‑source tools—including the mpvue front‑end framework, Walle channel‑packaging plugin, SQLAdvisor index‑optimization utility, Leaf distributed ID service, and Robust hot‑update system—detailing their main features, configuration steps, and source repositories.
The article presents a collection of open‑source tools released by Meituan‑Dianping that aid developers in building mobile and backend applications.
mpvue
mpvue is a Vue.js‑based framework for developing mini‑programs on platforms such as WeChat, Baidu, Toutiao, and Alipay. It modifies the runtime and compiler to run Vue.js code in mini‑program environments, providing a full Vue.js development experience.
Main Features:
Component‑based development for high code reuse.
Complete Vue.js development experience.
Integrated Vuex for complex state management.
Customizable webpack build with hot‑reload support.
Support for npm external dependencies.
CLI initialization via vue-cli .
H5 code conversion to mini‑program targets.
Project address: https://github.com/Meituan-Dianping/mpvue
Walle (Channel Packaging Tool)
Walle is a new‑generation channel‑packaging tool for Android APKs using the APK Signature V2 scheme. It adds custom channel information into the APK Signature Block to generate channel packages efficiently.
Gradle Configuration (Root build.gradle):
buildscript {
dependencies {
classpath 'com.meituan.android.walle:plugin:1.1.7'
}
}Gradle Configuration (App module build.gradle):
apply plugin: 'walle'
dependencies {
compile 'com.meituan.android.walle:library:1.1.7'
}Walle plugin settings:
walle {
// Output directory for channel APKs
apkOutputFolder = new File("${project.buildDir}/outputs/channels")
// APK file name format
apkFileNameFormat = '${appName}-${packageName}-${channel}-${buildType}-v${versionName}-${versionCode}-${buildTime}.apk'
// Channel configuration file
channelFile = new File("${project.getProjectDir()}/channel")
}Project address: https://github.com/Meituan-Dianping/walle
SQLAdvisor
SQLAdvisor, developed by Meituan‑Dianping's DBA team, analyzes MySQL SQL statements and provides index‑optimization suggestions based on lexical parsing, WHERE clauses, aggregation, and join relationships.
Project address: https://github.com/Meituan-Dianping/SQLAdvisor
Leaf (Distributed ID Generation Service)
Leaf offers two ID generation modes—segment and Snowflake—to replace traditional DB auto‑increment, Redis, or UUID approaches. It serves many Meituan‑Dianping business lines with high QPS and low latency.
Configuration file: leaf-server/src/main/resources/leaf.properties
Key configuration items (selected):
leaf.segment.enable : enable segment mode (default false)
leaf.jdbc.url : MySQL connection URL
leaf.jdbc.username : MySQL username
leaf.jdbc.password : MySQL password
leaf.snowflake.enable : enable Snowflake mode (default false)
leaf.snowflake.zk.address : Zookeeper address for Snowflake
leaf.snowflake.port : service port for Snowflake
Project address: https://github.com/Meituan-Dianping/Leaf
Robust (Hot‑Update System)
Robust is a next‑generation hot‑update system compatible with Android 2.3‑10, allowing patches to take effect without restarting the app, with a success rate of 99.9%.
Usage Steps:
Add dependencies in the app module build.gradle : apply plugin: 'com.android.application' // apply plugin: 'auto-patch-plugin' (enable when creating patches) apply plugin: 'robust' compile 'com.meituan.robust:robust:0.4.99'
Add classpath in the project‑level build.gradle : buildscript { repositories { jcenter() } dependencies { classpath 'com.meituan.robust:gradle-plugin:0.4.99' classpath 'com.meituan.robust:auto-patch-plugin:0.4.99' } }
Create app/robust.xml in the project root (refer to demo for details).
Advantages include support for Android 2.3‑10, high compatibility, real‑time patch application, method‑level fixes (including static methods), addition of methods/classes, and compatibility with ProGuard.
Project address: https://github.com/Meituan-Dianping/Robust
Java Architect Essentials
Committed to sharing quality articles and tutorials to help Java programmers progress from junior to mid-level to senior architect. We curate high-quality learning resources, interview questions, videos, and projects from across the internet to help you systematically improve your Java architecture skills. Follow and reply '1024' to get Java programming resources. Learn together, grow together.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.