Plone on RelStorage
         Lars R. Noldan
      Plone Symposium East 2010




           nowhere to go but
           op...
Overview

•   How does Zope store data
•   Why RelStorage?
•   How to implement RelStorage
•   Some reasons not to use Rel...
Zope Storage Methods




                   sixfeetup.com/deploy2010
What is the ZODB?

•   Object oriented database
•   Used by Zope to hold everything from content
    to scripts, to servic...
What is Filestorage?
•   The default backend for Zope/ZEO
•   var/filestorage/Data.fs
•   Does an in-memory index at startu...
What is RelStorage?
•   Drop in replacement
•   Replaces ZEO
•   Eliminates Data.fs
•   Stores pickles
•   Is still ZODB
•...
Why Change?




              sixfeetup.com/deploy2010
Advantages of RelStorage
•   Existing infrastructure
•   Existing expertise
•   Wide range of management tools
•   High av...
Databases Supported
•   MySQL 5.0.32 or better
    •   MySQLdb >= 1.2.2
•   PostgreSQL 8.1 or better
    •   psycopg2
•   ...
How Do I Install It?
•   For MySQL add the following to buildout.cfg:
      eggs =
          RelStorage
          MySQL-Py...
How Do I Install It? Cont.
•   For PostgreSQL add the following to buildout.cfg:
      eggs =
          RelStorage

      ...
Available Tools

•   zodbconvert
    •   Converts from filestorage to {mysql/pgsql/oracle}
    •   Convert from {mysql/pgsq...
zodbconvert.conf
Converting from filestorage to MySQL
   <filestorage source>
    path /opt/default/zinstance/var/
   files...
Running zodbconvert
lnoldan$ sudo /opt/mysql/zinstance/bin/zodbconvert --clear
zodbconvert.conf

Storages opened successfu...
What’s the Catch?




                    sixfeetup.com/deploy2010
There Are Pitfalls
•   Added complexity
•   Additional server load
•   Additional memory utilization
•   The database is f...
What We Talked About
•   Zope storage engines: ZEO and RelStorage
•   Why you might choose RelStorage
•   How to install R...
Links

•   http://pypi.python.org/pypi/RelStorage/1.4.0b3
•   http://shane.willowrise.com/archives/relstorage-
    1-4-0b1...
Credits:
 •   http://www.flickr.com/photos/kaplanbr/
     2465380377/
 •   http://www.flickr.com/photos/
     shuttercat7/41...
More info at:
sixfeetup.com/deploy2010




            sixfeetup.com/deploy2010
Upcoming SlideShare
Loading in …5
×

Pse2010 rel storage

2,177 views
1,984 views

Published on

Published in: Technology
1 Comment
3 Likes
Statistics
Notes
No Downloads
Views
Total views
2,177
On SlideShare
0
From Embeds
0
Number of Embeds
34
Actions
Shares
0
Downloads
23
Comments
1
Likes
3
Embeds 0
No embeds

No notes for slide

Pse2010 rel storage

  1. 1. Plone on RelStorage Lars R. Noldan Plone Symposium East 2010 nowhere to go but open source sixfeetup.com/deploy2010
  2. 2. Overview • How does Zope store data • Why RelStorage? • How to implement RelStorage • Some reasons not to use RelStorage sixfeetup.com/deploy2010
  3. 3. Zope Storage Methods sixfeetup.com/deploy2010
  4. 4. What is the ZODB? • Object oriented database • Used by Zope to hold everything from content to scripts, to service configurations sixfeetup.com/deploy2010
  5. 5. What 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 sixfeetup.com/deploy2010
  6. 6. What is RelStorage? • Drop in replacement • Replaces ZEO • Eliminates Data.fs • Stores pickles • Is still ZODB • Uses relational databases sixfeetup.com/deploy2010
  7. 7. Why Change? sixfeetup.com/deploy2010
  8. 8. Advantages 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 sixfeetup.com/deploy2010
  9. 9. Databases Supported • MySQL 5.0.32 or better • MySQLdb >= 1.2.2 • PostgreSQL 8.1 or better • psycopg2 • Oracle 10g • cx_Oracle sixfeetup.com/deploy2010
  10. 10. How 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 sixfeetup.com/deploy2010
  11. 11. How Do I Install It? Cont. • 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 sixfeetup.com/deploy2010
  12. 12. Available 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) sixfeetup.com/deploy2010
  13. 13. zodbconvert.conf Converting from filestorage to MySQL <filestorage source> path /opt/default/zinstance/var/ filestorage/Data.fs </filestorage> <relstorage destination> <mysql> db plone user plone passwd terriblepassword </mysql> </relstorage> sixfeetup.com/deploy2010
  14. 14. Running zodbconvert lnoldan$ sudo /opt/mysql/zinstance/bin/zodbconvert --clear zodbconvert.conf Storages opened successfully. All transactions copied successfully. sixfeetup.com/deploy2010
  15. 15. What’s the Catch? sixfeetup.com/deploy2010
  16. 16. There 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 sixfeetup.com/deploy2010
  17. 17. What 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 sixfeetup.com/deploy2010
  18. 18. Links • http://pypi.python.org/pypi/RelStorage/1.4.0b3 • http://shane.willowrise.com/archives/relstorage- 1-4-0b1-and-zodbshootout sixfeetup.com/deploy2010
  19. 19. Credits: • 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/ sixfeetup.com/deploy2010
  20. 20. More info at: sixfeetup.com/deploy2010 sixfeetup.com/deploy2010

×