Skip to content
Snodra, a raven

Snodra

One messaging stack for services that speak events and gRPC.

Commands, queries, events and sagas — routed by a stateless server, carried by Kafka or RabbitMQ Streams, and stored in the databases you already run. No commercial messaging platform and no broker in the request path.

Documentation Server Kotlin Rust Go Python License

Documentation · Getting started · Core concepts · Conformance


What is Snodra?

Snodra is a CQRS-style messaging stack for service fleets. A service sends a command or a query and Snodra Server forwards it to a live handler of the type it targets; a service publishes an event through its transactional outbox and every interested processor receives it. Services can be written in different languages and still talk to each other: the wire protocol is the contract, not the library.

flowchart LR
  S[sender] -->|command or query| HUB[Snodra Server]
  HUB -->|one live handler| H[handler]
  H -->|reply| S
  H -->|state + outbox| DB[(message store)]
  DB -->|relay| ES[(event store)]
  ES -->|event| P[event processors]
  P -->|commands| HUB
Loading

The server routes and holds nothing; events never pass through it. State and the outbox live in your message store (MongoDB or SQL), events live in your event store (Kafka or RabbitMQ Streams), and the libraries give every service the same delivery, retry and saga semantics.

Why Snodra?

  • The broker is not in the request path. Commands and queries are matched to a live handler and answered directly. Deadlines, retries, streaming queries and flow control are enforced by the router, once, instead of by every client.
  • Events without dual writes. Every publish goes through the outbox of the message store in the same transaction as the state change. A relay publishes it; processors are idempotent by construction with processed-event markers in the same store.
  • Sagas built in. Long-running processes with associations, deadlines and a relay that retries commands — no separate workflow engine to operate.
  • Your infrastructure, your choice. Kafka or RabbitMQ Streams for events; MongoDB, PostgreSQL or MySQL for the outbox, markers, dead letters and saga state. One event store and one message store per service, selected by an add-on.
  • One protocol, many languages. The Kotlin, Rust, Go and Python clients are interchangeable in front of the server and on the event store. The conformance suite proves it, check by check, against a real server and fake hubs.
  • Production pieces included. Static token, OAuth2/OIDC JWT and mTLS authentication with per-service ACLs, multi-server routing without server-to-server traffic, OTLP metrics, health probes and a dashboard served from the same binary, with a live schema catalogue of the message contracts services declare.

The suite

Project What it is Stack Get it
Snodra Server The stateless gRPC router, dashboard and control plane Rust, tonic docker run -p 7000:7000 -p 7001:7001 snodra/snodra-server:0.8.0
snodra-messaging Spring Boot starter: buses, handlers, outbox, sagas, testing kits Kotlin, Spring Boot 4 com.damoreira.snodra:snodra-messaging
snodra-messaging-rs One builder for the hub client, event store, outbox and handlers, declaring message contracts to the server's schema catalogue Rust snodra-messaging
snodra-messaging-python asyncio client with processors, control, dead letters, sagas and external calls, at feature level 4, declaring message contracts to the server's schema catalogue Python latest release
snodra-messaging-go Go client with processors, control, dead letters, sagas and external calls, at feature level 4, declaring message contracts to the server's schema catalogue Go latest release
snodra-event-browser Read-only event browser add-on for the dashboard Rust docker run snodra/snodra-event-browser:0.3.4
snodra-conformance The protocol conformance runner and reference service Rust cargo run -p snodra-conformance
snodra-site The documentation portal behind snodra.damoreira.com Astro Starlight snodra.damoreira.com

Quick start

Run the server. It keeps no state, so this is safe to start on any machine:

docker run --rm -p 7000:7000 -p 7001:7001 snodra/snodra-server:0.8.0

gRPC is on 7000 and the dashboard on http://localhost:7001/ui/. The server keeps a schema catalogue by default and refuses a service that declares no contracts; every official library declares them (Kotlin from 0.8.0, Rust and Python from 0.10.0, Go from 0.9.0; use the latest release of each), so there is nothing to switch off. A service on an earlier release needs -e SNODRA_SERVER_CATALOG=off until you upgrade it. Services in different languages that serve one type must declare the same checked-in schema for it (Message contracts). With no configuration the server accepts anonymous clients; production settings, TLS and ACLs are in the server reference.

Add the client that matches your service.

Kotlin / Spring Boot

dependencies {
    implementation("com.damoreira.snodra:snodra-messaging:0.10.+")
    implementation("com.damoreira.snodra:snodra-messaging-kafka:0.10.+")   // or -rabbitmq
    implementation("com.damoreira.snodra:snodra-messaging-mongo:0.10.+")   // or -jdbc
    testImplementation("com.damoreira.snodra:snodra-messaging-test:0.10.+")
}

Rust

cargo add snodra-messaging@0.12
cargo add snodra-messaging-kafka@0.12       # or snodra-messaging-rabbitmq
cargo add snodra-messaging-mongo@0.12       # or snodra-messaging-sqlx with a database feature

Go

go get github.com/snodra/snodra-messaging-go@v0.12
go get github.com/snodra/snodra-messaging-go/kafka@v0.12      # or /rabbitmq
go get github.com/snodra/snodra-messaging-go/mongo@v0.12      # or /sql

Python

pip install 'snodra-messaging~=0.12.0'
pip install 'snodra-messaging-kafka~=0.12.0'      # or snodra-messaging-rabbitmq
pip install 'snodra-messaging-mongo~=0.12.0'      # or snodra-messaging-sql

Then take the shortest path from a running server to a registered handler: Your first service. The installation guide has every artifact, crate and database feature.

One protocol, many languages

A Snodra service registers the command and query types it handles and opens one long-lived stream. Any language can implement that protocol — the Kotlin, Rust, Go and Python libraries already do, all four at feature level 4. The conformance runner proves level 1 against a real server and fake hubs, with PASS, FAIL, SKIPPED and NOT IMPLEMENTED per check id; the libraries' own event-store and message-store kits prove levels 2 to 4, from the outbox and processed-event markers through processors, control, reset/replay and dead letters to sagas, deadlines and idempotent external calls, and the cross-language interop harness continues one saga across languages on shared stores. A client that passes the feature levels it claims is a first-class member of the suite, whichever language it is written in.

Documentation

Section What you will find
Getting started Install the server and a client, then send a first command
Core concepts CQRS, commands, queries, events, sagas, processors and consistency
Server Routing, authentication, settings, dashboard, schema catalogue, topology, processor control, protocol
Kotlin library Quick start, configuration, API, testing and modules
Rust library Quick start, configuration, API, testing and add-ons
Go library Quick start, configuration, API, testing and add-ons at feature level 4
Python library Quick start, configuration, API, testing and add-ons at feature level 4
Add-ons Kafka, RabbitMQ Streams, MongoDB and SQL stores
Operations Upgrades, deployment and observability
Examples A working multi-service system with the sandbox
Integrations Partner systems and external sources

Contributing

Issues and pull requests are welcome in every repository.

  • Documentation lives in snodra-site; read its contribution guide before opening a pull request.
  • Code follows the repository it belongs to: branch from main, use conventional commits, and let the CI (format, clippy, tests, proto sync) pass before review.
  • Licence. Everything here is Apache-2.0; by contributing you agree that your contribution is licensed under the same terms.

Snodra — commands, queries, events and sagas, without the platform in the middle.

Pinned Loading

  1. snodra-examples snodra-examples Public

    Python

Repositories

Showing 10 of 10 repositories

Top languages

Loading…

Most used topics

Loading…