70 releases (34 breaking)

0.43.2 Mar 20, 2024
0.42.3 Jan 10, 2024
0.41.4 Nov 10, 2023
0.35.4 Jul 30, 2023
0.9.0 Jul 31, 2022

#46 in Database implementations

Download history 14/week @ 2023-12-29 21/week @ 2024-01-05 1/week @ 2024-01-12 9/week @ 2024-02-23 8/week @ 2024-03-01 1/week @ 2024-03-08 412/week @ 2024-03-15 48/week @ 2024-03-22 73/week @ 2024-03-29

534 downloads per month

AGPL-3.0-or-later

250KB
6.5K SLoC

Wörterbuch

Wörterbuch is an in-memory key/value store that solves a use case somewhere between a database and a message broker. It's specifically designed to serve as a batteries included web server and backend data store for smaller web applications or home automation systems. You can think of it as an alternative to MQTT where you can simply look up messages without having to make a subscription or an alternative to Redis where any SET operation automatically produces a pub/sub message with the key as channel and value as message.

Keys are hierarchical paths in Wörterbuch, similarly to topics in MQTT. The default separator is a /, so a key looks something like some/worterbuch/key. Values can be retrieved by looking up the key or subscribing to it. In both cases wildcards are supported. The default single level wildcard is ?, the default multi level wildcard is # (all of these can be configured).

Getting my/key/# would return a map of all key/value pairs where the key starts with my/key/, subscribing to my/key/# will produce events for each key/value pair already in store where the key starts with my/key/ and subsequently an additional event for each SET operation for a key that starts with my/key/.

Comparison with similar solutions

Wörterbuch Redis MQTT Kafka SQL CouchDB
Publish/Subscribe Yes Optional Yes Yes No ?
Query Yes Yes No No Yes Yes
JOINed Queries* Yes No No No Yes Yes
GraphQL-like queries** Yes No No No No No
Delete Yes Yes Yes No Yes Yes
In-memory store Yes Yes Yes No No No
Persistent store Optional Optional Optional Yes Yes Yes
TCP API Yes Yes Yes Yes Yes Yes
WebSocket API Yes No Optional No No ?
HTTP API Yes No No No No Yes
Built in user management No Yes Yes Yes Yes Yes
Token based authorization Yes ? No No No ?
Accessible from web frontend Yes No No No No Yes

* Queries across different data sources (e.g. tables, topics, keys, etc.) that produce a single result containing data from those data sources

** Queries where the expected result data structure is encoded in the request

Dependencies

~36–52MB
~849K SLoC