view mod_storage_multi/README.markdown @ 4260:c539334dd01a

mod_http_oauth2: Rescope oauth client config into users' storage This produces client_id of the form owner@host/random and prevents clients from being deleted by registering an account with the same name and then deleting the account, as well as having the client automatically be deleted when the owner account is removed. On one hand, this leaks the bare JID of the creator to users. On the other hand, it makes it obvious who made the oauth application. This module is experimental and only for developers, so this can be changed if a better method comes up.
author Kim Alvefur <zash@zash.se>
date Sat, 21 Nov 2020 23:55:10 +0100
parents a7fdab9c14e2
children
line wrap: on
line source

---
summary: Multi-backend storage module (WIP)
labels:
- NeedDocs
- Stage-Alpha
...

Introduction
============

This module attemtps to provide a storage driver that is really multiple
storage drivers. This could be used for storage error tolerance or
caching of data in a faster storage driver.

Configuration
=============

An example:

``` {.lua}
storage = "multi"
storage_multi_policy = "all"
storage_multi = {
    "memory",
    "internal",
    "sql"
}
```

Here data would be first read from or written to [mod\_storage\_memory],
then internal storage, then SQL storage. For reads, the first successful
read will be used. For writes, it depends on the `storage_multi_policy`
option. If set to `"all"`, then all storage backends must report success
for the write to be considered successful. Other options are `"one"` and
`"majority"`.