Rule Cascade
LearnUse it in your language

Use it in your language

The same seven steps in every runtime, from install to caching, with real code and the output it printed.

This track takes one ruleset through seven steps in every runtime: install, load, evaluate, handle errors, enforce, custom operators, and caching. Every step page has the same tabs in the same order, so you can read one language from start to end, or compare two languages side by side.

How to read a step

  1. Pick your language in the switcher at the top of a step. The choice is remembered on every step page.
  2. Each tab has the same four parts: what to do, the code, run it (the exact command), and the output that command printed.
  3. Read the output. It is never typed by hand: it was captured by running the code when this site was built.

Every tab uses the same payments ruleset and the same transfer, so the decisions and findings match from tab to tab. That is the point of Rule Cascade: one contract, one answer, in every runtime.

Where the code and the output come from

  • Code is an excerpt of a real file, read when the site is built. When the file changes, the page changes.
  • Libraries (TypeScript, Java, Go, Python) and the rule server each have a short tour program that does all seven steps. CI runs every tour and fails when its output differs from what these pages show.
  • Spring Boot, React and the other languages use the example applications that CI builds and tests. The other languages print exactly the output that CI checks for each of them.
  • Where code can run in your browser (the TypeScript engine), a Try it Yourself button opens it in the playground.

Which runtime does what

RuntimeInstallLoadEvaluateErrorsEnforceCustom operatorsCaching
TypeScript (browser)sourceclient manifestuseRuleEvaluationyesUI gatingyescreateManifestClient
TypeScript (Node.js)sourcebundle or YAMLyesyesAPI endpointyescreateManifestClient
Javasourcebundle or sourcesyesyesAPI endpointyesRuleSetHolder
Spring Bootsourcebundle or YAMLyesyesAPI endpointyesETag on the manifest
Gosourcebundle or sourcesyesyesAPI endpointyesHolder
Pythonsourcebundle or sourcesyesyesAPI endpointyesRuleSetHolder
Commandsigned downloadbundle or YAMLyesyesbatchtest operators onlya long-lived engine
WebAssemblysigned downloadbundle or YAMLyesyesbatchnoa long-lived engine
Rule serversourcesources and bundlesover HTTPyesAPI endpointwhen embeddedETag, scheduled reload
C#, Ruby, PHP, Rust, PowerShell, shell, and Java, Node.js or Python over the enginesigned downloadbundleyesyesbatchnothe engine keeps what it loaded

"Source" means a checkout of the Rule Cascade source: the libraries are not published to a package registry yet. The command and the WebAssembly module are signed downloads.

The steps

Course overview

On this page