Path: redb-route/demo/XmlDemo/README.md Snapshot: redb-route, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages. License: Apache-2.0. Repository: https://github.com/redbase-app/redb-route Page: https://redbase.app/src/dev-2026-12-06/redb-route/demo/XmlDemo/README.md ---- # XmlDemo — the redb storage bridge in XML markup A minimal, self-limiting demo of the redb bridge elements (``, ``, ``) as a deployable XML route package for the Tsak worker. Every 5 seconds the route upserts ONE row (`SaveByUniqueAsync` by the object's `value_unique`), queries it back server-side and logs `REDBDEMO total=1` — the count stays flat no matter how long the worker runs. That flatness is the point. The first cut of this demo saved a new `${uuid()}` row per tick: the table grew forever, the query slowed with it, and on SQLite the 5s cycle degraded to ~50s with `database is locked` storms. A demo that runs unattended must be bounded by construction, not by somebody remembering to clean up. The layout is the packaging convention: | Path | What | |---|---| | `routes/*.route.xml` | the route artifacts (explicit manifest order) | | `context.xml` | the `` contribution: scheme sync at context start | | `config/XmlDemo.config.json` | L4: module identity ONLY (`ContextName: xmldemo`) | | `config/context.sample.json` | L3 sample for deployment | | `schema/` | generated XSD — OPTIONAL, see below | The `schema/` folder is **not required** — neither the worker nor the pack gate reads it (both validate against their own registry). It exists only so the editor works when the `redb Route XML` VS Code extension is NOT around: open this folder as its own workspace root and the plain RedHat XML extension picks the schema up through `.vscode/settings.json`. With our extension installed the namespace catalog already validates every `*.route.xml` and `context.xml`, and this local copy is ignored. Delete it if you never open the project standalone; regenerate it (with the package contributions) via: redb-route-xml xsd /Libs/shared --out schema Build the package — `--bin` points at the worker's shared assemblies so the pack gate sees the same markup contributions (`redbSave`, `redbQuery`, …) the worker's own discovery will load; without it the redb elements fail the XSD check: redb-route-xml pack . --name xmldemo --version 3.0.1 --bin /Libs/shared The same gate runs on `dotnet build -p:PackRouteOnBuild=true -p:Version=`: the project copies its NuGet assemblies to `bin/` (`CopyLocalLockFileAssemblies`), and the target points `--bin` at that output. The installed `redb-route-xml` must be built against the same `redb.Route.Xml` version as the packages: an older tool cannot read the newer runtime's contributions and stops with a version error instead of guessing. Deploy: drop `pkg/xmldemo-.tpkg` into the worker's `modules/` — it hot-reloads in a few seconds and the log shows the `REDBDEMO total=1` ticks. Regenerate C# or a diagram from the route: redb-route-xml csharp routes/main.route.xml --namespace XmlDemo.Routes redb-route-xml mermaid routes/main.route.xml --bin bin/Debug/net10.0 `--bin` is there because the route uses package elements (``, ``): the diagram needs the same build output the pack gate reads.