Menu

The redb.Route expression language, part 2: from a string to IL, registry calls, and a gate that checks routes before they run
📰

The redb.Route expression language, part 2: from a string to IL, registry calls, and a gate that checks routes before they run

DEV Community: dotnet·rinat kozin·5 days ago
#UemTQAzH
#devtodotnet#devto#dev#name#loyalty
Reading 0:00
15s threshold

The first part made the general case for the redb.Route expression language. It covered one grammar for conditions, values and templates, compilation into a delegate instead of interpretation per message, one truthiness rule, and the places where expressions live: patterns and endpoint addresses. This part goes underneath. It shows what exactly happens to a string such as header.a > 10 , how a template decides where a placeholder ends, how a route reaches your own services and the environment, what the language refuses to do when the text comes from data rather than from a developer, and what the package gate tells you about a route file before it is ever deployed.

A note on where the results come from. The public guide to the language, EXPRESSIONS.md , marks its example tables for execution, and a test ( ExpressionsGuideExamplesTests ) reads the guide itself and runs every marked example, more than 130 of them, against the engine on every test run.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.