Software / code / prosody-modules
Annotate
mod_storage_multi/README.markdown @ 4579:b305814bd930
mod_muc_dicebot: A thing to roll dice
Do you see what happens, Jitsi? Do you see what happens when you
make it hard for me to use a proper bot? This is what happens,
Jitsi. This is what happens when you meet a stranger in the alps!
Ahem. In all seriousness, this is more of a quick hack than
anything else. It will look for `.r` in MUC messages and if it
finds it, it'll interpret it as an instruction to roll a few
dice. Injects the results in the body of the message. Eats the
message alive if it is malformed.
| author | Jonas Schäfer <jonas@wielicki.name> |
|---|---|
| date | Sat, 29 May 2021 15:17:05 +0200 |
| parent | 1887:a7fdab9c14e2 |
| rev | line source |
|---|---|
| 1886 | 1 --- |
| 2 summary: Multi-backend storage module (WIP) | |
| 3 labels: | |
| 4 - NeedDocs | |
|
1887
a7fdab9c14e2
mod_storage_multi: Put in Alpha stage
Kim Alvefur <zash@zash.se>
parents:
1886
diff
changeset
|
5 - Stage-Alpha |
| 1886 | 6 ... |
| 7 | |
| 8 Introduction | |
| 9 ============ | |
| 10 | |
| 11 This module attemtps to provide a storage driver that is really multiple | |
| 12 storage drivers. This could be used for storage error tolerance or | |
| 13 caching of data in a faster storage driver. | |
| 14 | |
| 15 Configuration | |
| 16 ============= | |
| 17 | |
| 18 An example: | |
| 19 | |
| 20 ``` {.lua} | |
| 21 storage = "multi" | |
| 22 storage_multi_policy = "all" | |
| 23 storage_multi = { | |
| 24 "memory", | |
| 25 "internal", | |
| 26 "sql" | |
| 27 } | |
| 28 ``` | |
| 29 | |
| 30 Here data would be first read from or written to [mod\_storage\_memory], | |
| 31 then internal storage, then SQL storage. For reads, the first successful | |
| 32 read will be used. For writes, it depends on the `storage_multi_policy` | |
| 33 option. If set to `"all"`, then all storage backends must report success | |
| 34 for the write to be considered successful. Other options are `"one"` and | |
| 35 `"majority"`. |