RelStorage
Plone
Relational
Database
Storage
Backend
Overview
●
Drop-in replacement for FileStorage or ZEO
●
For PostgreSQL, MySQL, Oracle, SQLite
●
settled: around for ~13 years
●
Active development driven by Jason Madden:
Version 3 released 2019
Latest release 3.4.0 in October 2020
PostgreSQL the Cloud DB
●
Kind of „Industry Standard“.
●
Well supported by all big cloud providers:
AWS, Google, Azure, IBM, Heroku, ...
●
Easy to install in private clouds (or local):
Docker, Kubernetes, ...
●
Very well maintained and thriving development
●
Scaling solutions available
Advantages
●
Fast, parallel commits, better
concurrency, shorter locks
●
Optimized per process caching
●
Blobs in database
●
Optional history free
Usage: Setup
●
„plone.recipe.zope2instance“ buildout support
minimal example
[instance]
eggs +=
RelStorage
psycopg2
sharedblobs = false
rel-storage =
type postgresql
dsn dbname='plone' host='localhost' user='plone' password='secret'
keep-history false
Usage: Caches
●
additional client side caches
●
shared between all threads of process
●
Optional compressed
●
Parameters to limit size, object count and
max-size of objects in this cache
Converting from FS or ZEO
●
„zodbconvert“ converts from any storage
to another, like from ZEO to RelStorage
●
Needs configuration file providing
connections to both storages
●
Also converts blobs if needed
Packing
●
ZODB keeps old transactions, so packing
is needed
●
In history free mode only deleted objects
need to be cleaned up (DB bloats less)
●
RelStorage provides a fast „zodbpack“
Versions and Blobs
●
RelStorage 3.x is Python 3 only and runs
with Plone 5.2+ - Blobs should be stored
in RelStorage
●
RelStorage 2.x is for Plone 5.0-5.1.x,
blobs should not be stored in DB, except
for Oracle backends.
Personal Note
●
I use RelStorage today for all my live
deployments
●
Use it since v.1.6 with Plone 4.3
●
Never had problems
●
Blazing fast
●
DevOps/Sysadmins love it

RelStorage Plone Zope RDB Storage Backend

  • 1.
  • 2.
    Overview ● Drop-in replacement forFileStorage or ZEO ● For PostgreSQL, MySQL, Oracle, SQLite ● settled: around for ~13 years ● Active development driven by Jason Madden: Version 3 released 2019 Latest release 3.4.0 in October 2020
  • 3.
    PostgreSQL the CloudDB ● Kind of „Industry Standard“. ● Well supported by all big cloud providers: AWS, Google, Azure, IBM, Heroku, ... ● Easy to install in private clouds (or local): Docker, Kubernetes, ... ● Very well maintained and thriving development ● Scaling solutions available
  • 4.
    Advantages ● Fast, parallel commits,better concurrency, shorter locks ● Optimized per process caching ● Blobs in database ● Optional history free
  • 5.
    Usage: Setup ● „plone.recipe.zope2instance“ buildoutsupport minimal example [instance] eggs += RelStorage psycopg2 sharedblobs = false rel-storage = type postgresql dsn dbname='plone' host='localhost' user='plone' password='secret' keep-history false
  • 6.
    Usage: Caches ● additional clientside caches ● shared between all threads of process ● Optional compressed ● Parameters to limit size, object count and max-size of objects in this cache
  • 7.
    Converting from FSor ZEO ● „zodbconvert“ converts from any storage to another, like from ZEO to RelStorage ● Needs configuration file providing connections to both storages ● Also converts blobs if needed
  • 8.
    Packing ● ZODB keeps oldtransactions, so packing is needed ● In history free mode only deleted objects need to be cleaned up (DB bloats less) ● RelStorage provides a fast „zodbpack“
  • 9.
    Versions and Blobs ● RelStorage3.x is Python 3 only and runs with Plone 5.2+ - Blobs should be stored in RelStorage ● RelStorage 2.x is for Plone 5.0-5.1.x, blobs should not be stored in DB, except for Oracle backends.
  • 10.
    Personal Note ● I useRelStorage today for all my live deployments ● Use it since v.1.6 with Plone 4.3 ● Never had problems ● Blazing fast ● DevOps/Sysadmins love it