C O R E C O N V E R S A T I O N S
REVISIONS EVERYWHERE
@ D I C K O L S S O N – D I X O N _
★ What’s the problem?
★ How other systems solve the problem
★ A bit of Drupal history
★ What can we do?
★ Demo
★ Discussion
AGENDA
★ Discuss improvements to Entity API
★ Discuss inclusion in core
★ Feedback, thoughts and questions during this session
GOALS
Long time contributor to core
and contrib.
Working for a pharma
company, making Drupal work
for hundreds of sites (and
thousands of environments).
ABOUT ME
Me smiling
Dick Olsson – @dickolsson
WHAT’S THE PROBLEM?
We’ve all been here…
This is not the answer…
Neither is this…
…and yet, we don’t care about our users’ data
DRUPAL IS A CMS
Not possible to undo a delete
Content is blindly overwritten when updated
Concurrent editing is not supported
Entity Revision API in D8 is good,
but not enabled by default anywhere
Local development
Editorial content staging
Editing in production
User generated content
Integrated systems
API clients
…and yet, we haven’t realized our content is too
DRUPAL IS DISTRIBUTED
Be careful about our users’ data
Concurrent editing
Content workflow
Content staging
Conflict handling
…which are difficult/impossible at the moment
USE CASES
Manage content and workflow
Move and share content
Compliance and audit
Letting our users trust Drupal,
knowing that the system care about your content
RELAX! :-)
…for our end-users
WHAT REALLY MATTERS
SYSTEMS THAT CARE
Distributed Version Control Systems
Databases capable of (true) multi-master replication
SYSTEMS THAT CARE
Assumes its content is distributed
Every change is a new revision (even delete)
Every revision has a universally unique hash
Every revision has a universally identifiable parent
GIT...a great distributed version control system
Apache CouchDB
Cloudant
MySQL
PostgreSQL BDR
Oracle
Microsoft SQL
MULTI-MASTER DATABASES...l ist from Wikipedia
Apache CouchDB
Cloudant
MySQL
PostgreSQL BDR
Oracle
Microsoft SQL
MULTI-MASTER DATABASES...l ist from Wikipedia
Assumes its content is distributed
Every change is a new revision (even delete)
Every revision has a universally unique hash
Every revision has a universally identifiable parent
Defines a reusable HTTP replication protocol
APACHE COUCHDB...a true multi-master database
SOME DRUPAL HISTORY
★ Notes from early Drupal 8 BoF: https://groups.drupal.org/node/133579
★ Feature in Watchdog: https://drupalwatchdog.com/node/502
★ “I just want to edit a node”:http://denver2012.drupal.org/content/i-just-want-edit-node
★ “Content Staging in Core”:http://denver2012.drupal.org/content/content-staging-core
PAST DISCUSSIONS
CRAP!
“ IN DRUPAL 8 […] THERE ARE TWO COMPETING APPROACHES: CRUD AND CRAP (CREATE, READ, ARCHIVE, PRUNE) . […] THE
LATTER WOULD SOLVE OUR ISSUES WITH REVISIONS AND THUS IS MY PREFERENCE. ”
– CHX
We want to manage content and workflow well
Complex topic with too many use cases
to consider for core
Need for revisions are the lowest common denominator
across all use cases
Other systems have solved parts of the problem already
CRAP vs CRUD
(Create, Read, Archive, Prune)
TO SUMMARIZE
WHAT CAN WE DO?
Multiversion
(content revisions)
+
RELAXed Web Services
(API)
+
Deploy
(UI for content staging)
DRUPAL 8 CONTRIB...iterate and mature the ideas
MULTIVERSION DEMOA N D R E L A X E D W E B S E R V I C E S
Done a lot of coding on
Multiversion and Relaxed WS
modules.
Multiple core patches within
the last couple of months.
CREDIT
Awesome guy
Andrei Jechiu – @jeqq
Enable revisions for node types by default
BABY STEPS...things we can do in core today
Assume content is distributed
Enforce revisions
Every change is a new revision (even delete)
Give revisions a universally unique hash
Revisions should have a universally identifiable parent
Expose revisions over a RESTful API (RELAXed WS)
LONG TERM
We just need to use existing APIs differently
Additional “rev” field
Additional “deleted” field
Change logic in save and delete methods
for base storage handler
DRUPAL 8.X?...can we backport from Multiversion module?
DRUPAL 9?
WHAT DID YOU THINK?EVAULATE THIS SESSION - LOSANGELES2015.DRUPAL.ORG/SCHEDULE
THANK YOU!
Does this belong in core?
Drupal 8.x or 9.x?
Are there other use cases?
Performance and scaling issues?
Discuss!
QUESTIONS?@dickolsson – dixon_