API Routing DSL for Microservices Message Matching
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing API routing systems require rigidly defined routing rules, leading to inefficiencies and increased complexity due to the need for manual planning to cover all possible API messages, resulting in duplication of efforts and code, especially in large-scale microservices architectures.
Innovation Solution
A domain-specific programming language (DSL) is implemented for efficient definition and interpretation of routing rules, allowing for flexible and versatile routing of API messages by evaluating attributes and applying policies dynamically, thereby reducing the number of individually defined routes and improving runtime performance.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Device complexity
If rigidly defined routing rules are used, then routing functionality is achieved, but device complexity and manual planning requirements increase
Solution Approach 1:
The patent transforms routing rules from rigid static definitions to dynamic parameter-based matching. By introducing a domain-specific language that evaluates attributes dynamically, the system can adapt routing decisions based on runtime conditions without requiring exhaustive pre-definition of all possible scenarios, thus reducing complexity while maintaining reliable routing coverage.
Solution Approach 2:
The patent introduces a routing engine as an intermediary component that sits between the routing rule definition layer and the API message routing layer. This intermediary automatically interprets and executes routing decisions based on evaluated attributes, eliminating the need for manual planning of every possible routing scenario and reducing overall system complexity.
2Productivity
If manually planned routing rules are used, then routing coverage is achieved, but productivity decreases due to duplication of efforts
Solution Approach 1:
The patent creates a universal routing framework that can handle multiple routing scenarios through a single domain-specific language syntax. By defining routing rules in terms of attribute evaluation and pattern matching, the system achieves multi-functionality where a single routing definition can cover multiple API messages and scenarios, eliminating duplication of efforts and improving productivity.
Solution Approach 2:
The patent merges multiple individually defined routing rules into a unified domain-specific language framework. By combining common routing patterns and attributes into a single standardized syntax, the system reduces the number of separately defined routes and consolidates routing logic, thereby improving productivity and reducing complexity.
3Loss of time
If multiple individually defined routes are used, then routing coverage is achieved, but loss of time increases due to manual planning requirements
Solution Approach 1:
The patent enables preliminary definition of routing patterns and attribute evaluation rules in a domain-specific language, which are then automatically applied to route API messages. This preliminary action of defining the routing framework once allows for rapid routing decisions without manual planning for each individual message, reducing time loss while maintaining high adaptability.
Solution Approach 2:
The patent introduces dynamic routing capabilities where routing decisions are made at runtime based on evaluated attributes rather than static pre-planned paths. This dynamic approach allows the system to adapt to varying API messages and conditions automatically, reducing the time needed for manual planning while maintaining or enhancing routing flexibility and versatility.
Data Source
AI summary
Disclosed embodiments relate to implementation and interpretation of an application programming interface (API) routing domain-specific programming language (DSL). The API routing DSL improves storage efficiency of routing definitions and rules, reduces errors for API messages unmatched to routes, and improves runtime performance for API message routing. In example embodiments, a routing data object configured according to the API routing DSL includes a match expression. The match expression is a logical combination of one or more attribute condition statements that each describe a relational comparison between an API message attribute and a specified value. Evaluation of the match expression as logically true using attributes of a given API message indicates that the given API messages matches the routing data object. The given API message is then routed according to an endpoint and/or policies associated with the routing data object.


