Overview
This article discusses Uber's evolution of its ticket routing system, emphasizing the transition to a workflow-based architecture using Cadence. It highlights the challenges faced with the previous system and the improvements made to enhance flexibility, code clarity, and overall user experience.
What You'll Learn
1
How to implement a workflow-based ticket routing system using Cadence
2
Why modularizing routing logic improves code clarity and flexibility
3
When to use local activities for low-latency workflows
Prerequisites & Requirements
- Understanding of workflow orchestration concepts(optional)
- Familiarity with Cadence as a workflow engine
Key Questions Answered
How does Uber's new ticket routing system improve user experience?
Uber's new ticket routing system enhances user experience by ensuring tickets are matched with agents who have the appropriate skills and language capabilities. This is achieved through a modular workflow that allows for flexible routing rules, thus improving response times and support quality.
What challenges did Uber face with its previous ticket routing system?
Uber's previous ticket routing system became overly complex and fragmented over time, making it difficult to maintain and update. The system's logic was scattered across multiple classes, leading to challenges in testing and monitoring, which ultimately affected the reliability of customer support.
What is the role of Cadence in Uber's ticket routing workflow?
Cadence serves as the orchestration engine for Uber's ticket routing workflow, allowing the separation of control logic from business logic. This modular approach enhances flexibility and clarity, enabling developers to implement and modify routing rules more effectively.
How does the new routing workflow handle low-latency requirements?
The new routing workflow uses Cadence's local activity functionality to minimize latency. By executing short-lived tasks within the workflow's worker process, Uber achieves performance comparable to the original routing code while improving response times for real-time user requests.
Key Statistics & Figures
p99 performance improvement
more than 33 percent
This improvement is observed in the routing workflow's performance compared to the original routing code.
Average latency for triggering workflows
about 20 milliseconds
This latency is incurred when initiating a workflow via Cadence.
Technologies & Tools
Workflow Orchestration
Cadence
Used as the orchestration engine to manage the ticket routing workflow.
Key Actionable Insights
1Implementing a modular workflow architecture can significantly enhance the maintainability of complex systems.By breaking down routing logic into discrete tasks, developers can easily update and extend functionality without impacting the overall system.
2Utilizing local activities in workflows can help achieve low-latency performance for real-time applications.This approach allows critical tasks to be executed quickly, ensuring that user requests are handled promptly, which is essential for customer satisfaction.
3Adopting a clear separation between control logic and business logic is crucial for code clarity.This separation helps developers understand the workflow better and facilitates easier onboarding for new team members.
Common Pitfalls
1
Over-simplifying control logic can lead to hidden complexities in the routing process.
This can obscure important steps and make the workflow difficult to understand, ultimately complicating maintenance and updates.
2
Conversely, over-complicating workflows by including too much logic can lead to readability issues.
Finding the right balance between workflow and activity logic is essential to maintain clarity and ease of use.
Related Concepts
Workflow Orchestration
Modular Programming
Real-time Processing
Scalability In Software Architecture