
Yandex Go Develops Custom DSL to Handle Complex Dynamic Ride Pricing Logic
Yandex Go has moved its ride pricing algorithm out of the main service code into a dedicated domain-specific language to avoid frequent deployments and tangled conditional logic. The pricing system accounts for geozones, demand surges, discounts, toll roads, extra stops, and special requirements such as transporting pets or sports equipment. Parameters are collected in parallel, dependencies are modeled as a graph, and requests run asynchronously on userver so that a single slow source does not break the entire calculation. Because rules change on average twice a week, keeping the logic in C++ would require rebuilding and redeploying 50 pods for roughly 40 minutes each time. The new DSL supports conditions, functions, immutable values, and fold operations instead of loops; rules are chained so each step receives the current price and metadata and returns an updated result. ANTLR 4 defines the grammar while the Z3 verifier ensures programs cannot produce invalid prices. The platform is already used by Yandex Taxi, Delivery, and the electric-vehicle charging service.
AntiMalwareAug 5, 2026Translated from Russian