annotate mod_storage_multi/README.markdown @ 1886:e502c05c0608

mod_storage_multi: Add README
author Kim Alvefur <zash@zash.se>
date Thu, 01 Oct 2015 17:27:23 +0200
parents
children a7fdab9c14e2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1886
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
1 ---
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
2 summary: Multi-backend storage module (WIP)
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
3 labels:
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
4 - NeedDocs
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
5 ...
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
6
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
7 Introduction
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
8 ============
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
9
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
10 This module attemtps to provide a storage driver that is really multiple
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
11 storage drivers. This could be used for storage error tolerance or
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
12 caching of data in a faster storage driver.
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
13
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
14 Configuration
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
15 =============
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
16
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
17 An example:
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
18
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
19 ``` {.lua}
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
20 storage = "multi"
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
21 storage_multi_policy = "all"
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
22 storage_multi = {
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
23 "memory",
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
24 "internal",
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
25 "sql"
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
26 }
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
27 ```
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
28
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
29 Here data would be first read from or written to [mod\_storage\_memory],
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
30 then internal storage, then SQL storage. For reads, the first successful
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
31 read will be used. For writes, it depends on the `storage_multi_policy`
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
32 option. If set to `"all"`, then all storage backends must report success
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
33 for the write to be considered successful. Other options are `"one"` and
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
34 `"majority"`.