Design and Implementation of Footprint Platform, Mock Server Platform, and Pre‑release Gray Release Solution for Virtual Products
This article presents the challenges of virtual product development and describes three engineering solutions—a Footprint tracking system, a Mock Server platform, and a pre‑release gray‑release strategy—detailing their backgrounds, architectures, implementations, and operational benefits for improving debugging, testing, and deployment efficiency.
Virtual products differ from physical ones, presenting unique technical challenges; this article shares three solutions—Footprint platform, Mock platform, and a pre‑release gray release approach—offered by a senior engineer from JD.com.
Footprint Platform
Background: Complex virtual product workflows generate long order traces (e.g., train tickets) requiring log retrieval from up to 30 days ago, imposing heavy operational pressure. Existing logbook tools collect logs but lack orchestration, making deep searches time‑consuming.
Solution: A system was built to track business processes and integrate with logbook for rapid issue location. The architecture (shown below) follows a client‑server model where business services embed a Footprint client that records events similarly to instrumentation points. Integration with the logging framework’s MDC feature enables correlation among Footprint, MDC, and logbook data.
The system allows engineers to query all business paths by business ID, quickly pinpoint problematic components, and, if needed, drill down to detailed logs via MDC in logbook. This greatly improves operational efficiency, enables business process analysis, and preserves critical data for future optimization.
After nearly a year of deployment in the domestic train‑ticket system, the Footprint platform has stored around 50 million records, enhancing both operations and business insight.
Future Plans: Optimize the Footprint system further and enhance data analysis and visualization to boost operational efficiency and aid business workflow optimization.
Mock Server Platform
Background: Virtual platform services depend on third‑party modules accessed via REST API or JSF. Unit testing requires stubs for undeveloped or hard‑to‑mock external services, which can become scattered and hard to manage.
Solution: Built on the open‑source Mock‑Server framework, a unified Mock Server platform was created that supports multiple protocols (socket, HTTP, HTTPS, JSF), provides visual configuration, persists interactions, and records request/response data for later analysis.
Adopting the Mock Server platform decouples parallel development and significantly improves team development and testing efficiency.
Future Plans: Add custom response capabilities, support workflow simulation, and provide an SDK.
Pre‑release Gray Release Solution
Many business scenarios are message‑driven, raising the challenge of correctly consuming messages in pre‑release versus production environments. Traditional approaches either allocate separate topics (often impractical for external systems) or hard‑code environment checks (risky).
The proposed solution isolates environments by embedding the user PIN in the message body. Two topics are created: one for pre‑release‑to‑production and another for production‑to‑pre‑release. Both pre‑release and production services subscribe to the same business topic. When the message routing engine receives a message, it examines the PIN and current environment: if in production and the message belongs to a test account, it forwards the message to the pre‑release topic; the reverse applies for pre‑release messages. This allows a single topic subscription while preventing accidental consumption of test messages in production.
In summary, the three solutions—Footprint tracking, Mock Server, and gray‑release messaging—address critical pain points in virtual product development, testing, and deployment, offering scalable, maintainable, and efficient practices.
Thanks to the speaker, leadership, and team; wishing everyone a happy new year.
JD Retail Technology
Official platform of JD Retail Technology, delivering insightful R&D news and a deep look into the lives and work of technologists.
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.