Use multiple stores in the same TiddlyWeb instance.
Project description
A TiddlyWeb store that makes it possible to store some content in
different stores, based on rules defined in tiddlywebconfig.py.
The rules are regular expressions which match the name of a bag. When a
tiddler or bag is accessed (for read or write) if the name of the bag
matches a regular expression in the store's "extras" dictionary, the
store named in the value is responsible for the entity being accessed.
Otherwise the store named in "main" is used.
This is an experimental store, but it is being reliably used in
production with the http://www.wiki-data.com/ website. In that service,
the main collection of tiddler data is kept in one highly optimized bag
using the mappingsql store, while users and other system data are stored
in a text store. Here's the relevant config:
'server_store': ['tiddlywebplugins.diststore', {
'main': ['text', {'store_root': 'store'}],
'extras': [
(r'^example$', ['mappingsql',
{'db_config':
'mysql://example@localhost/example?charset=utf8'}]),
],
}],
To use this plugin you must modify tiddlywebconfig.py to set the
'server_store' item. Do not add 'tiddlywebplugins.diststore' to
'system_plugins' or 'twanager_plugins'.
Copyright 2009, Chris Dent <cdent@peermore.com>
Licensed under the same terms as TiddlyWeb.
http://tiddlyweb.com/
different stores, based on rules defined in tiddlywebconfig.py.
The rules are regular expressions which match the name of a bag. When a
tiddler or bag is accessed (for read or write) if the name of the bag
matches a regular expression in the store's "extras" dictionary, the
store named in the value is responsible for the entity being accessed.
Otherwise the store named in "main" is used.
This is an experimental store, but it is being reliably used in
production with the http://www.wiki-data.com/ website. In that service,
the main collection of tiddler data is kept in one highly optimized bag
using the mappingsql store, while users and other system data are stored
in a text store. Here's the relevant config:
'server_store': ['tiddlywebplugins.diststore', {
'main': ['text', {'store_root': 'store'}],
'extras': [
(r'^example$', ['mappingsql',
{'db_config':
'mysql://example@localhost/example?charset=utf8'}]),
],
}],
To use this plugin you must modify tiddlywebconfig.py to set the
'server_store' item. Do not add 'tiddlywebplugins.diststore' to
'system_plugins' or 'twanager_plugins'.
Copyright 2009, Chris Dent <cdent@peermore.com>
Licensed under the same terms as TiddlyWeb.
http://tiddlyweb.com/
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file tiddlywebplugins.diststore-0.8.tar.gz
.
File metadata
- Download URL: tiddlywebplugins.diststore-0.8.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f215ac3fc91a1da86605e1c5eafb0db6c74eac93c6034ced43f781b3a36feca8 |
|
MD5 | dd7c24216d8c1ef1e5a5b8a1d90d1e8f |
|
BLAKE2b-256 | 4b5516c779c763e191542929e4318b419030f038d15110cd9226ca79f65c5565 |