2. Overview Review modes of content delivery Why and what purpose Existing solutions for Plone Strengths and Weakness ContentMirror in detail Conclusion
3. What is it Two modes in-band & out-of-band Plone Default is “in band” Req to Plone; Plone computes Resp e.g. XDV, mod_wsgi, mod_proxy, varnish Atypical usage of Plone, “out of band” Plone emits content into intermediary storage Plone is not involved in responding to Req No other FOSS CMS has such feature
4. How Others Do It Render pages to filesystem + sync Custom programming to iterate over repository rendering views to disk Provide an API into repository for web-tier application to source content Promote the database schema as API
5. Out of Band Static Delivery Generates static assets from Plone Assets transferred to web server Statically rendered content served Dynamic Delivery Plone pushes content into 3rd party data store Separate web application to display content
6. Why? Static Delivery Constraints in delivery mode of website Security requires no moving parts e.g. Kiosk, updated every X hours Dynamic Delivery Web application is vastly different than CMS Different organizational / skill-sets being used e.g. existing website is .NET; want new section to be driven by Plone
8. Plone Approach Render pages to filesystem + sync CMFDeployment, enpraxis.staticsite Promote the database schema as API Entransit, contentmirror Provide API into the Repository wsapi4plone.parfait
9. CMFDeployment Static delivery Strengths Various large projects have used it Very flexible configuration modes Supports transport Weakness Flexibility brings complexity / lacks testing Last release 2006
11. enpraxis.staticsite Static delivery Strengths Very simple and approachable Serializes Plone to file system Weakness Requires programming & deployment Lack of documentation and testing
13. Entransit Dynamic Delivery Strengths Supports staging of entire changesets Conceptually simple Weakness Requires too much programming Documentation and testing is lacking Too many moving parts Does not have connection to CMS during load into data store. Significantly complicates state mgmt
15. ContentMirror Dynamic delivery Strengths Simple, Extensible, and Fast Tight coupling with Plone event model Weakness Evolving data store & Plone models requires discipline Data model currently exposes impl details
17. Wrap Up Alt delivery is atypical use case for Plone Systems with multiple ORG actors Static Delivery vs. Dynamic Delivery Building up is more approachable Documentation / Testing critical Dynamic delivery: CM is best bet. Entransit 2 plans on layering staging on CM Now lets go into details of ContentMirror
18. ContentMirror Pitch Sync Serialize content from Plone RDBMS Just Works™ Small code base < 1k LOC; 99% coverage Let SQLAlchemy do heavy lifting RDBMS query-ability of content attributes Well tested, 99% coverage + mocked
19. Evaluate Today Buildout: Plone, ContentMirror, and SOLREstimate: 30 minutes Configuration of Relational DatabaseEstimate: 20 minutes Bootstrap database with ddl.pyEstimate: 5 minutes Have real time Plone Content (RDBMS) and Search (SOLR); Now pick frontend.
20. Usages Business reports based on content repository (i.e. Crystal Reports, iReport) Provide richer queries (using SQL) Store data in multiple back ends RDBMS Google App Engine
21. You already know If you do not customize Plone heavily; it migrates really well. Plone lots of neat features: WebDAV (Enfold Desktop;), LDAP, Content Types, Cache Fu (Enfold Proxy;), etc. So the authoring experience is flexible, configurable, and enjoyable You can have multiple “sub-sites”
22. Observations Presentation tiers have different requirements than content repository Simplicity is key. Maintaining presentation tiers have to be simple; few abstractions PHP or Django have few abstractions to display dynamic data on web page Isolate complexity; never will go away Plone seen as self-licking ice cream cone
23. The Story Big university has 200 IT staff; all busy managing HR, ERP, printers, etc. Individual departments are independent and have transient staff who manage web Departments need way to use transient staff to maintain web presence; if CMS exists. Transient staff can use PHP. PHP, Django, .NET developers are cheap
24. More Story There is no way IT can: Manage all department changes centrally Maintain system that has software changing daily or hourly Allow people to make a change that impacts campus wide system Noam in Linguistics should not be able write code which DoS the campus CMS IT does best with focus: keep systems up.
25. Even More Story? IT offer primitives: LDAP (users), RDBMS (content), SOLR (search). Commodity services Departments implement however they like ContentMirror is a lightweight step towards decoupling the CMS from presentation Make presentation as flexible as possible
26. Installation Buildout the recipe.cfg Put SQLAlchemy URI in .zcml or ENV bin/instance run ddl.py $DB > out.ddl Execute out.ddl Start Zope Create Plone site and add content Query your RDBMS
27. Features Auto-generate DDL for registered types All default Plone content types work Currently focused on Archetypes; z3 easy Bulk import of Plone content into RDBMS Re-entrant (run multiple times) Schema available in JSON (vocabularies) Fast. Serialized 100k content + references in < 20m
28. Your content type Create new zcml that is included <configure xmlns="http://namespaces.zope.org/zope" xmlns:ore="http://namespaces.objectrealms.net/mirror"> <ore:engineurl="mysql://user:passwd@host/database" name="mirror-db" encoding='utf8' echo="False"/> <ore:mirror content="Products.AudioholicsContent.AHHomePage.AHHomePage"/> </ore:engine> </configure> Re-run ddl.py; execute ddl.py in RDBMS All default Plone content types work OOTB
29. Field not available? ore.contentmirror/transform.zcmlcontains adapters for how AT Fields are mapped to SQLAlchemy ore.contentmirror/transform.pycontains the adapter source code <adapter for=".interfaces.ITextField .interfaces.ISchemaTransformer" provides=".interfaces.IFieldTransformer" factory=".transform.TextTransform" />
30. Escape Hatch If you don’t want field level serialization Write custom transformer for your class You take full responsibility for Copying state from instance to RDBMS May also have to do some extra work
31. Of Interest ore.contentmirror/operation.py Provide buffer to filter out duplicate operations Simple pattern for transaction integration ore.contentmirror/jsonschema.py Serializes AT schemas into RDBMS via a JSON structure Presentation can easily find out what the original schema (including vocabularies) Not used by default
32. Dynamism What about PloneFormGen or interaction? ContentMirror would serialize the Form elements as database rows; FE has to draw and validate forms Collage would generate data representing rows, columns pointing to content UID Presentation tier does re-implement common functionality (RSS, Login, etc)
33. Conclusion Significant experience in community Starting simple is more approachable Static vs. Dynamic CM has a great experience OOTB rc2 has minor OOTB issue; all fixed in trunk Staging not implemented across multiplecontent types. DEV, STAGE, PROD Alt delivery is a minority use case.
34. Conclusion You would never know that Plone fits these use cases Little visibility in broader community Hard to separate the add-on pile collective simply has too much activity Costly to maintain; advocate Without formal support in Plone support expensive KapilThangavelu wrote ContentMirror & CMFDeployment – awesome software designer!
35. Fin Content Mirror (ore.contentmirror) http://code.google.com/p/contentmirror/ SOLR (collective.solr)http://lucene.apache.org/solr/ Enfold Systemshttp://www.enfoldsystems.com/ My email addressalan@enfoldsystems.com