35

We need revisions and CRAP everywhere in Drupal core

Embed Size (px)

Citation preview

Page 1: We need revisions and CRAP everywhere in Drupal core
Page 2: We need revisions and CRAP everywhere in Drupal core

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 _

Page 3: We need revisions and CRAP everywhere in Drupal core

★ What’s the problem?

★ How other systems solve the problem

★ A bit of Drupal history

★ What can we do?

★ Demo

★ Discussion

AGENDA

Page 4: We need revisions and CRAP everywhere in Drupal core

★ Discuss improvements to Entity API

★ Discuss inclusion in core

★ Feedback, thoughts and questions during this session

GOALS

Page 5: We need revisions and CRAP everywhere in Drupal core

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

Page 6: We need revisions and CRAP everywhere in Drupal core

WHAT’S THE PROBLEM?

Page 7: We need revisions and CRAP everywhere in Drupal core

We’ve all been here…

Page 8: We need revisions and CRAP everywhere in Drupal core

This is not the answer…

Page 9: We need revisions and CRAP everywhere in Drupal core

Neither is this…

Page 10: We need revisions and CRAP everywhere in Drupal core

…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

Page 11: We need revisions and CRAP everywhere in Drupal core

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

Page 12: We need revisions and CRAP everywhere in Drupal core

Be careful about our users’ data

Concurrent editing

Content workflow

Content staging

Conflict handling

…which are difficult/impossible at the moment

USE CASES

Page 13: We need revisions and CRAP everywhere in Drupal core

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

Page 14: We need revisions and CRAP everywhere in Drupal core
Page 15: We need revisions and CRAP everywhere in Drupal core

SYSTEMS THAT CARE

Page 16: We need revisions and CRAP everywhere in Drupal core

Distributed Version Control Systems

Databases capable of (true) multi-master replication

SYSTEMS THAT CARE

Page 17: We need revisions and CRAP everywhere in Drupal core

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

Page 18: We need revisions and CRAP everywhere in Drupal core

Apache CouchDB

Cloudant

MySQL

PostgreSQL BDR

Oracle

Microsoft SQL

MULTI-MASTER DATABASES...l ist from Wikipedia

Page 19: We need revisions and CRAP everywhere in Drupal core

Apache CouchDB

Cloudant

MySQL

PostgreSQL BDR

Oracle

Microsoft SQL

MULTI-MASTER DATABASES...l ist from Wikipedia

Page 20: We need revisions and CRAP everywhere in Drupal core

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

Page 21: We need revisions and CRAP everywhere in Drupal core

SOME DRUPAL HISTORY

Page 22: We need revisions and CRAP everywhere in Drupal core

★ 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

Page 23: We need revisions and CRAP everywhere in Drupal core

CRAP!

Page 24: We need revisions and CRAP everywhere in Drupal core

“ 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

Page 25: We need revisions and CRAP everywhere in Drupal core

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

Page 26: We need revisions and CRAP everywhere in Drupal core

WHAT CAN WE DO?

Page 27: We need revisions and CRAP everywhere in Drupal core

Multiversion

(content revisions)

+

RELAXed Web Services

(API)

+

Deploy

(UI for content staging)

DRUPAL 8 CONTRIB...iterate and mature the ideas

Page 28: We need revisions and CRAP everywhere in Drupal core

MULTIVERSION DEMOA N D R E L A X E D W E B S E R V I C E S

Page 29: We need revisions and CRAP everywhere in Drupal core

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

Page 30: We need revisions and CRAP everywhere in Drupal core

Enable revisions for node types by default

BABY STEPS...things we can do in core today

Page 31: We need revisions and CRAP everywhere in Drupal core

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

Page 32: We need revisions and CRAP everywhere in Drupal core

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?

Page 33: We need revisions and CRAP everywhere in Drupal core

DRUPAL 9?

Page 34: We need revisions and CRAP everywhere in Drupal core

WHAT DID YOU THINK?EVAULATE THIS SESSION - LOSANGELES2015.DRUPAL.ORG/SCHEDULE

THANK YOU!

Page 35: We need revisions and CRAP everywhere in Drupal core

Does this belong in core?

Drupal 8.x or 9.x?

Are there other use cases?

Performance and scaling issues?

Discuss!

QUESTIONS?@dickolsson – dixon_