Plone on RelStorage
Calvin Hendryx-Parker
PLONE CONFERENCE 2010
Saturday, October 30, 2010
PLONE CONFERENCE 2010Overview
• How does Zope store data
• Why RelStorage?
• How to implement RelStorage
• Some reasons no...
PLONE CONFERENCE 2010Zope Storage
Methods
Saturday, October 30, 2010
PLONE CONFERENCE 2010What is the ZODB?
• Object oriented database
• Used by Zope to hold everything from content
to script...
PLONE CONFERENCE 2010What is Filestorage?
• The default backend for Zope/ZEO
• var/filestorage/Data.fs
• Does an in-memory ...
PLONE CONFERENCE 2010What is RelStorage?
• Drop in replacement
• Replaces ZEO
• Eliminates Data.fs
• Stores pickles
• Is s...
PLONE CONFERENCE 2010Why Change?
Saturday, October 30, 2010
PLONE CONFERENCE 2010Advantages of
RelStorage
• Existing infrastructure
• Existing expertise
• Wide range of management to...
PLONE CONFERENCE 2010Real World
• Major Health System Site
• Java portion of site locked up
• Restarted Serivce with Littl...
PLONE CONFERENCE 2010Databases Supported
• MySQL 5.0.32 or better
• MySQLdb >= 1.2.2
• PostgreSQL 8.1 or
better
• psycopg2...
PLONE CONFERENCE 2010How Do I Install It?
• For MySQL add the
following to buildout.cfg:
eggs =
RelStorage
MySQL-Python
fa...
PLONE CONFERENCE 2010How Do I Install It?
• For PostgreSQL add the
following to buildout.cfg:
eggs =
RelStorage
fake-eggs ...
PLONE CONFERENCE 2010Options
• blob-dir
• shared-blob-dir
• keep-history
• replica-conf
• pack-gc
• pack-dry-run
• cache-s...
PLONE CONFERENCE 2010Available Tools
• zodbconvert
• Converts from filestorage to {mysql/pgsql/oracle}
• Convert from {mysq...
PLONE CONFERENCE 2010zodbconvert.conf
<filestorage source>
path /opt/default/zinstance/var/
filestorage/Data.fs
</filestor...
PLONE CONFERENCE 2010Running zodbconvert
$ sudo /opt/mysql/zinstance/bin/zodbconvert --clear
zodbconvert.conf
Storages ope...
PLONE CONFERENCE 2010What’s the Catch?
Saturday, October 30, 2010
PLONE CONFERENCE 2010There Are Pitfalls
• Added complexity
• Additional server load
• Additional memory utilization
• The ...
PLONE CONFERENCE 2010What We Talked
About
• Zope storage engines: ZEO and RelStorage
• Why you might choose RelStorage
• H...
PLONE CONFERENCE 2010Links
• http://pypi.python.org/pypi/RelStorage
• http://shane.willowrise.com/archives/relstorage-1-4-...
PLONE CONFERENCE 2010Credits:
• http://www.flickr.com/photos/kaplanbr/
2465380377/
• http://www.flickr.com/photos/
shutterca...
Check out
sixfeetup.com/demos
Saturday, October 30, 2010
Upcoming SlideShare
Loading in …5
×

Plone on RelStorage

2,282 views
2,092 views

Published on

In this presentation we will discuss what Relstroage is, and the effect it can have on your Plone site. We will compare different Relstorage backends (MySQL and PostgreSQL) and how they perform compared to the default filestorage. We will also discuss why you may or may not want to use Relstorage in your environment. We will also review any changes you will need to make to your environment to maintain Relstorage.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,282
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
22
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Plone on RelStorage

  1. Plone on RelStorage Calvin Hendryx-Parker PLONE CONFERENCE 2010 Saturday, October 30, 2010
  2. PLONE CONFERENCE 2010Overview • How does Zope store data • Why RelStorage? • How to implement RelStorage • Some reasons not to use RelStorage Saturday, October 30, 2010
  3. PLONE CONFERENCE 2010Zope Storage Methods Saturday, October 30, 2010
  4. PLONE CONFERENCE 2010What is the ZODB? • Object oriented database • Used by Zope to hold everything from content to scripts, to service configurations Saturday, October 30, 2010
  5. PLONE CONFERENCE 2010What is Filestorage? • The default backend for Zope/ZEO • var/filestorage/Data.fs • Does an in-memory index at startup • Data appends to the end • Back-up utility is Repozo Saturday, October 30, 2010
  6. PLONE CONFERENCE 2010What is RelStorage? • Drop in replacement • Replaces ZEO • Eliminates Data.fs • Stores pickles • Is still ZODB • Uses relational databases Saturday, October 30, 2010
  7. PLONE CONFERENCE 2010Why Change? Saturday, October 30, 2010
  8. PLONE CONFERENCE 2010Advantages of RelStorage • Existing infrastructure • Existing expertise • Wide range of management tools • High availability, high performance clusters • No in-memory index at startup • Scales well as your database grows • High Concurrency Saturday, October 30, 2010
  9. PLONE CONFERENCE 2010Real World • Major Health System Site • Java portion of site locked up • Restarted Serivce with Little Impact Saturday, October 30, 2010
  10. PLONE CONFERENCE 2010Databases Supported • MySQL 5.0.32 or better • MySQLdb >= 1.2.2 • PostgreSQL 8.1 or better • psycopg2 • Oracle 10g • cx_Oracle Saturday, October 30, 2010
  11. PLONE CONFERENCE 2010How Do I Install It? • For MySQL add the following to buildout.cfg: eggs = RelStorage MySQL-Python fake-eggs = ZODB3 = 3.7.1 [instance] type mysql db plone user plone host localhost password terriblepassword Saturday, October 30, 2010
  12. PLONE CONFERENCE 2010How Do I Install It? • For PostgreSQL add the following to buildout.cfg: eggs = RelStorage fake-eggs = ZODB3 = 3.7.1 psycopg2 [instance] type postgresql dbname plone user plone host localhost password terriblepassword Saturday, October 30, 2010
  13. PLONE CONFERENCE 2010Options • blob-dir • shared-blob-dir • keep-history • replica-conf • pack-gc • pack-dry-run • cache-servers Saturday, October 30, 2010
  14. PLONE CONFERENCE 2010Available Tools • zodbconvert • Converts from filestorage to {mysql/pgsql/oracle} • Convert from {mysql/pgsql/oracle} to filestorage • Convert from one Database to another (ie: mysql to oracle) • zodbpack • Allows concurrent connections • Use from cron Saturday, October 30, 2010
  15. PLONE CONFERENCE 2010zodbconvert.conf <filestorage source> path /opt/default/zinstance/var/ filestorage/Data.fs </filestorage> <relstorage destination> <mysql> db plone user plone passwd terriblepassword </mysql> </relstorage> Converting from filestorage to MySQL Saturday, October 30, 2010
  16. PLONE CONFERENCE 2010Running zodbconvert $ sudo /opt/mysql/zinstance/bin/zodbconvert --clear zodbconvert.conf Storages opened successfully. All transactions copied successfully. Saturday, October 30, 2010
  17. PLONE CONFERENCE 2010What’s the Catch? Saturday, October 30, 2010
  18. PLONE CONFERENCE 2010There Are Pitfalls • Added complexity • Additional server load • Additional memory utilization • The database is full of pickles, not plain text • Your database still needs to be packed Saturday, October 30, 2010
  19. PLONE CONFERENCE 2010What We Talked About • Zope storage engines: ZEO and RelStorage • Why you might choose RelStorage • How to install RelStorage • Tools for RelStorage • Why you might not use RelStorage Saturday, October 30, 2010
  20. PLONE CONFERENCE 2010Links • http://pypi.python.org/pypi/RelStorage • http://shane.willowrise.com/archives/relstorage-1-4-0b1-and-zodbshootout Saturday, October 30, 2010
  21. PLONE CONFERENCE 2010Credits: • http://www.flickr.com/photos/kaplanbr/ 2465380377/ • http://www.flickr.com/photos/ shuttercat7/416008944/ • http://www.flickr.com/photos/juniorvelo/ 3267647833/ • http://www.flickr.com/photos/ arthurjohnpicton/4383221264/ • http://www.flickr.com/photos/generated/ 3249283352/ Saturday, October 30, 2010
  22. Check out sixfeetup.com/demos Saturday, October 30, 2010

×