Order Index Service (OI) 2.0: Architecture Redesign and Platformization at Ctrip
This article details Ctrip's Order Index (OI) service evolution from version 1.0 to 2.0, describing the original architecture, its limitations, the redesign of data synchronization, job scheduling, and query engines, and the resulting platformization that enables faster, more flexible order aggregation across dozens of business lines.
1. What is OI?
OI (OrderIndex) is the data source for the "My Ctrip" order list in the Ctrip app, aggregating order information from multiple business lines and providing a unified query interface.
2. OI 1.0
Launched in 2013, OI 1.0 relied on the company's SOA governance platform for query services and a job scheduling system (JosWS) for order synchronization. It aggregated over 50 data sources, 160 business lines, and more than 5 billion orders, serving over 200 downstream systems with millisecond‑level latency.
Key problems included complex DB access requirements, inconsistent data schemas, high coupling with business‑line databases, limited extensibility for custom fields, and cumbersome job deployment.
3. OI 2.0
The service was redefined as a standardized platform for order data ingestion, aggregation, retrieval, and management. A new architecture was introduced, featuring configurable meta‑data, a custom job host, and a unified order‑detail façade.
Three change‑detection approaches were added:
Push change messages from business‑line services (lowest latency, high development cost).
Binlog capture via Canal (acceptable latency <500 ms, low cost, MySQL‑only).
SQL‑based detection using only DB connection info (latency <200 ms, higher coupling).
4. Specific Work in OI 2.0 Platformization
4.1 Unified Ingestion Template – A standardized meta‑data template replaces ad‑hoc documentation, reducing onboarding time to a few meetings.
4.2 Custom Job Scheduler (JobHost) – Replaced the legacy scheduler with a bespoke system that dynamically generates sync tasks from meta‑data, offers fine‑grained monitoring, heartbeat health checks, and manual intervention capabilities.
4.3 Data Query Engine – Developed a lightweight engine that compiles OrderQuery objects into SQL or in‑memory filters based on configurable strategies, improving performance across heterogeneous storage backends.
5. Achievements after Refactoring
The platform now supports plug‑and‑play order source integration without code changes, enables hot‑swap of data sources, and allows business lines to update order‑detail logic independently. Most new integrations achieve T+0 deployment, and unified monitoring points have been added for greater observability.
Overall, OI 2.0 reduces complexity from O(n) per business line to O(1), supports hot‑plug data sources, and provides a scalable foundation for future order‑related services at Ctrip.
Ctrip Technology
Official Ctrip Technology account, sharing and discussing growth.
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.