How Alibaba’s TAC Platform Enables Dynamic Java Services and Hot Deployment
The article details the evolution of the Tmall client homepage from a static slot system to a personalized platform, analyzes the inefficiencies of the 2016 architecture, and introduces the 2017 TAC (Tangram App Container) solution that uses Java dynamic compilation, loading, and hot‑deployment to streamline backend development and improve stability.
2016 Old Version Cat Client Homepage Issues
The 2015 homepage operated by slot management transitioned in 2016 to a fully personalized system with over 50 personalization points, mainly via Aladdin (Tmall recommendation) connecting to TPP (Group personalization platform), while also integrating many third‑party services such as Alibaba Mama ads and newcomer gifts, leading to stability problems.
Problems Identified
Long issue‑localization cycles involving many teams (frontend, backend, Aladdin, algorithm) reduced efficiency.
Personalization support required coordination among the same groups, slowing business response.
Frequent third‑party integrations forced backend releases, degrading homepage stability.
Analysis and Proposed Solution
Backend developers spent excessive effort on service integration, field conversion, and logging, providing low value. The recommendation was to adopt a server‑side dynamic solution that removes low‑value links, allowing frontend developers to directly access business logic and algorithms, thereby shortening issue localization and improving support efficiency.
2017 New Architecture – TAC (Tangram App Container)
TAC is a dynamic service platform designed to support the new 2017 business architecture. Its goals are low‑cost development and publishing, low‑cost environment setup and maintenance, and high stability.
Dynamic Script Language Selection
Given the high‑concurrency, low‑latency mobile environment, Java was chosen for containerization because many developers are already proficient with it, ensuring performance and stability.
Java Dynamic Publishing: Dynamic Compilation, Loading, Hot Deployment
1. Dynamic Compilation Technique
The platform uses the Java Compiler API to compile code strings at runtime.
String nr = "
"; // line break
String source = "package temp.com; " + nr + "public class Hello{" + nr + "public static void main(String[] args){" + nr + "System.out.println(\"HelloWorld! 1\");" + nr + "}" + nr + "}";
File dir = new File(System.getProperty("user.dir") + "/temp");
if (!dir.exists()) { dir.mkdir(); }
FileWriter writer = new FileWriter(new File(dir, "Hello.java"));
writer.write(source);
writer.flush();
writer.close();
JavaCompiler javaCompiler = ToolProvider.getSystemJavaCompiler();
StandardJavaFileManager javaFileManager = javaCompiler.getStandardFileManager(null, null, null);
Iterable<? extends JavaFileObject> it = javaFileManager.getJavaFileObjects(new File(dir, "Hello.java"));
CompilationTask task = javaCompiler.getTask(null, javaFileManager, null, Arrays.asList("-d", "./temp"), null, it);
task.call();
javaFileManager.close();2. Dynamic Loading Technique
Leveraging Tomcat's class‑loader hierarchy and the parent‑delegation model, multiple classloaders are used to load compiled classes dynamically.
3. Class Hot‑Deployment Technique
Java hot‑deployment is challenging; method‑level hot‑swap (e.g., ASM) cannot replace whole class files.
By redefining the classloader and allowing the old one to be reclaimed by the JVM, full class hot‑deployment is achieved.
TAC Architecture 1.0
TAC consists of a console and an engine.
The console handles dynamic service development, testing, and publishing; class compilation occurs in the pre‑publish stage.
The engine includes a protocol layer (supporting HSF RMI and Hessian), a core responsible for dynamic service loading, execution, security, and monitoring, and a data pool for data services.
TAC Process and Core Technologies
Apply phase (console)
Development phase (console)
Pre‑publish phase – dynamic compilation
Debug phase (console)
Release phase – triggers engine core for dynamic loading and hot‑deployment
Core execution – dynamic loading and hot‑deployment
Online regression (console)
Release result (console)
Supported Services
TAC currently supports over 50 dynamic services, including Tmall wireless business, Cat client homepage selections, brand+, My page, full‑link recommendation, product information consistency, product manuals, etc.
TAC 2.0 Planning
Independent microservice deployment
Microservice inter‑calls
Hybrid cloud deployment
Fully independent engine core
Comprehensive monitoring dashboard
Overall, TAC provides a low‑cost, high‑stability solution for dynamic service development, enabling rapid iteration and robust backend operations.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Alibaba Cloud Developer
Alibaba's official tech channel, featuring all of its technology innovations.
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.
