SlideShare une entreprise Scribd logo
1  sur  39
CONTENT STAGING 
IN DRUPAL 8 
DICK OLSSON TWITTER: @dickolsson 
ADVANCED SITE BUILDING
AGENDA 
What is content staging? 
What we want from the solution 
How it's (being) built for Drupal 8 
Reusable protocols 
Headless Drupal
WHO AM I? 
Dick Olsson 
Digital Engineering Manager 
at Pfizer 
dixon_ on drupal.org 
@dickolsson on Twitter 
Web technologist 
Drupal contributor
WHAT IS 
CONTENT STAGING?
SIMPLE WORKFLOW 
Stage Prod
SECURE PUBLISHING 
Stage Prod 
Corporate firewall
MERGE WORKFLOW 
Stage 
Edit 1 
Edit 2 
Edit 3 
Prod
HUB/SPOKE WORKFLOW 
A 
D Editorial B 
C
RING MODEL 
A 
D B 
C
IT'S SORT OF... 
Content staging 
Content sharing 
Replication 
Syndication
WHAT WE WANT
WHAT WE WANT 
We don't want to build just a “content staging” 
system. 
We need a generic and loosely coupled 
“content replication” framework capable of 
arbitrarily moving content between system.
WHAT WE WANT 
Learning from the Drupal 7 implementations of 
UUID, Deploy and WF Tools modules.
WHAT WE WANT 
Revisions everywhere 
Conflict detection 
Easier dependency management 
Ad-hoc / Continuous replication 
Bi-directional replication 
REST API
HOW IT'S BUILT
HOW IT'S BUILT 
Contrib: 
Multiversion 
Relaxed Web Services 
Deploy 
Core: 
Serialization 
Restful Web Services 
Entity API
multiversion.module 
Tracks update sequences in order to make 
dependency management a lot easier. 
Provides revision support for all content 
entities. 
Tracks revision trees in a way similar to Git to 
support conflict detection.
multiversion.module 
Revisions are not tracked with a UUID. A hash 
calculated from the actual changes is better. 
This way it's easier for each server to detect 
conflicts without deep inspection or asking the 
network. 
<?php 
md5($this->serialize(array( 
$deleted, 
$sequence_id, 
$old_rev, 
$normalized_entity 
), 'json'));
{ 
id: [{value: 1}], 
uuid: [{value: aabbcc}] 
_revs_info: [ 
{rev: 2-gghhii}, 
{rev: 1-ddeeff} 
], 
_local_seq: 1, 
_deleted: 0, 
} 
multiversion.module
multiversion.module 
CRAP instead of CRUD. 
Entities are never deleted. This is needed in 
order to replicate deletions while also being 
able to handle conflicts. Much like Git. 
A “compaction” job can be run on cron to purge 
old revisions if needed.
<?php 
namespace DrupalmultiversionEntity; 
class SqlContentEntityStorage extends [...] { 
use SqlContentEntityTrait; 
//... 
} 
multiversion.module
<?php 
namespace DrupalmultiversionEntity; 
class SequenceIndex implements SequenceIndexInterface { 
function _construct(KeyValueFactoryInterface $kv) {} 
// ... 
} 
multiversion.module
<?php 
namespace DrupalmultiversionEntity; 
class ConflictManager implements ConflictManagerIf { 
// ... 
} 
class CompactionManager implements CompactionManagerIf { 
// ... 
} 
multiversion.module
relaxed.module 
Provides a Restful/Relaxed JSON API. 
Endpoints for all content entities and file 
attachments. 
Endpoints for comparing revisions, 
starting/stopping replications and other 
administrative tasks. 
Drush plugin for running replications.
<?php 
namespace DrupalrelaxedPluginrestresource; 
/** 
* @RestResource( 
* id = “relaxed:doc” 
* ) 
*/ 
class DocResource extends ResourceBase { 
//... 
} 
relaxed.module
<?php 
namespace DrupalrelaxedPluginrestresource; 
/** 
* @RestResource( 
* id = “relaxed:_bulk_docs” 
* ) 
*/ 
class BulkDocsResource extends ResourceBase { 
//... 
} 
relaxed.module
<?php 
namespace DrupalrelaxedPluginrestresource; 
/** 
* @RestResource( 
* id = “relaxed:_changes” 
* ) 
*/ 
class ChangesResource extends ResourceBase { 
//... 
} 
relaxed.module
<?php 
namespace DrupalrelaxedPluginrestresource; 
/** 
* @RestResource( 
* id = “relaxed:_revs_diff” 
* ) 
*/ 
class RevsDiffResource extends ResourceBase { 
//... 
} 
relaxed.module
deploy.module 
A simple UI to manage replications and 
conflicts
HOW REPLICATION WORKS 
1. Identify source and target by UUID 
2. Get the current checkpoint from target site 
3. GET /_changes?since=N from source site 
4. Pass result to /_revs_diff on target site 
5. Collect all missing revisions from source site 
6. POST /_bulk_docs on target 
7. Save new checkpoint on target site
DEMO
DEMO 
:-(
REUSABLE PROTOCOLS 
The revision and conflict detection model 
is taken from both Git and CouchDB. 
The replication protocol along with the API 
spec is taken from CouchDB.
REUSABLE PROTOCOLS 
Reusing API specifications lends the 
framework to unexpected use cases and 
that otherwise would not be possible 
(CouchDB, PouchDB, TouchDB etc).
HEADLESS DRUPAL 
AngularJS 
PouchDB Replication
CONCLUSIONS 
Not straight port of the Drupal 7 modules. 
Loosely coupled system will cover more 
use cases and lend itself to unexpected 
ones as well. 
Implementing battle tested protocols.
SPECIAL THANKS 
Andrei Jechiu (jeqq on drupal.org 
for working to these modules.
FRIDAY CODE SPRINT 
Follow @drupalmentoring 
https://amsterdam2014.drupal.org/sprints 
Help improve Drupal: Sprint with the community on Friday. 
- We have tasks for every skill set. 
- Mentors are available for new contributors. 
- An optional Friday morning workshop will help you set up 
community tools.
WHAT DID YOU THINK? 
EVAULATE THIS SESSION - AMSTERDAM2014.DRUPAL.ORG/SCHEDULE 
THANK YOU! 
DRUPAL: dixon_ TWITTER: @dickolsson

Contenu connexe

Tendances

Drupal and diversity of Single sign-on systems
Drupal and diversity of Single sign-on systemsDrupal and diversity of Single sign-on systems
Drupal and diversity of Single sign-on systemsAlex S
 
Javascript Frameworks Comparison
Javascript Frameworks ComparisonJavascript Frameworks Comparison
Javascript Frameworks ComparisonDeepu S Nath
 
WordPress 2017 with VueJS and GraphQL
WordPress 2017 with VueJS and GraphQLWordPress 2017 with VueJS and GraphQL
WordPress 2017 with VueJS and GraphQLhouzman
 
Backbone & React Together Forever
Backbone & React Together ForeverBackbone & React Together Forever
Backbone & React Together ForeverSamuel Breed
 
Understanding Microservices
Understanding Microservices Understanding Microservices
Understanding Microservices M A Hossain Tonu
 
Developing advanced universal apps using html & js
Developing advanced universal apps using html & jsDeveloping advanced universal apps using html & js
Developing advanced universal apps using html & jsSenthamil Selvan
 
Put a little Backbone in your WordPress vs. 3
Put a little Backbone in your WordPress vs. 3Put a little Backbone in your WordPress vs. 3
Put a little Backbone in your WordPress vs. 3adamsilverstein
 
Backbone.js with React Views - Server Rendering, Virtual DOM, and More!
Backbone.js with React Views - Server Rendering, Virtual DOM, and More!Backbone.js with React Views - Server Rendering, Virtual DOM, and More!
Backbone.js with React Views - Server Rendering, Virtual DOM, and More!Ryan Roemer
 
Introduction to Meteor - Worldwide Meteor Day
Introduction to Meteor - Worldwide Meteor DayIntroduction to Meteor - Worldwide Meteor Day
Introduction to Meteor - Worldwide Meteor DayM A Hossain Tonu
 
Effective Web Application Development with Apache Sling
Effective Web Application Development with Apache SlingEffective Web Application Development with Apache Sling
Effective Web Application Development with Apache SlingRobert Munteanu
 
Introduction to JS frameworks
Introduction to JS frameworksIntroduction to JS frameworks
Introduction to JS frameworksDeepu S Nath
 
New Perspectives on Performance
New Perspectives on PerformanceNew Perspectives on Performance
New Perspectives on Performancemennovanslooten
 
Put a little Backbone in your WordPress
Put a little Backbone in your WordPressPut a little Backbone in your WordPress
Put a little Backbone in your WordPressadamsilverstein
 
Organized web app development using backbone.js
Organized web app development using backbone.jsOrganized web app development using backbone.js
Organized web app development using backbone.jsShakti Shrestha
 
WordPress as the Backbone(.js)
WordPress as the Backbone(.js)WordPress as the Backbone(.js)
WordPress as the Backbone(.js)Beau Lebens
 
The Javascript Toolkit 2.0
The Javascript Toolkit 2.0The Javascript Toolkit 2.0
The Javascript Toolkit 2.0Marcos Vinícius
 
SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...
SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...
SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...Sencha
 
With Drupal Your Website is an API
With Drupal Your Website is an APIWith Drupal Your Website is an API
With Drupal Your Website is an APICharlie Morris
 

Tendances (20)

Drupal and diversity of Single sign-on systems
Drupal and diversity of Single sign-on systemsDrupal and diversity of Single sign-on systems
Drupal and diversity of Single sign-on systems
 
Javascript Frameworks Comparison
Javascript Frameworks ComparisonJavascript Frameworks Comparison
Javascript Frameworks Comparison
 
Sfk13
Sfk13Sfk13
Sfk13
 
WordPress 2017 with VueJS and GraphQL
WordPress 2017 with VueJS and GraphQLWordPress 2017 with VueJS and GraphQL
WordPress 2017 with VueJS and GraphQL
 
Backbone & React Together Forever
Backbone & React Together ForeverBackbone & React Together Forever
Backbone & React Together Forever
 
Understanding Microservices
Understanding Microservices Understanding Microservices
Understanding Microservices
 
Developing advanced universal apps using html & js
Developing advanced universal apps using html & jsDeveloping advanced universal apps using html & js
Developing advanced universal apps using html & js
 
Put a little Backbone in your WordPress vs. 3
Put a little Backbone in your WordPress vs. 3Put a little Backbone in your WordPress vs. 3
Put a little Backbone in your WordPress vs. 3
 
Backbone.js with React Views - Server Rendering, Virtual DOM, and More!
Backbone.js with React Views - Server Rendering, Virtual DOM, and More!Backbone.js with React Views - Server Rendering, Virtual DOM, and More!
Backbone.js with React Views - Server Rendering, Virtual DOM, and More!
 
Introduction to Meteor - Worldwide Meteor Day
Introduction to Meteor - Worldwide Meteor DayIntroduction to Meteor - Worldwide Meteor Day
Introduction to Meteor - Worldwide Meteor Day
 
Effective Web Application Development with Apache Sling
Effective Web Application Development with Apache SlingEffective Web Application Development with Apache Sling
Effective Web Application Development with Apache Sling
 
Introduction to JS frameworks
Introduction to JS frameworksIntroduction to JS frameworks
Introduction to JS frameworks
 
New Perspectives on Performance
New Perspectives on PerformanceNew Perspectives on Performance
New Perspectives on Performance
 
Put a little Backbone in your WordPress
Put a little Backbone in your WordPressPut a little Backbone in your WordPress
Put a little Backbone in your WordPress
 
Organized web app development using backbone.js
Organized web app development using backbone.jsOrganized web app development using backbone.js
Organized web app development using backbone.js
 
Static website generators
Static website generatorsStatic website generators
Static website generators
 
WordPress as the Backbone(.js)
WordPress as the Backbone(.js)WordPress as the Backbone(.js)
WordPress as the Backbone(.js)
 
The Javascript Toolkit 2.0
The Javascript Toolkit 2.0The Javascript Toolkit 2.0
The Javascript Toolkit 2.0
 
SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...
SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...
SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...
 
With Drupal Your Website is an API
With Drupal Your Website is an APIWith Drupal Your Website is an API
With Drupal Your Website is an API
 

En vedette

[HKDUG] #20160626 - HKOSCon 2015 - Website DIY with Drupal 8
[HKDUG] #20160626 - HKOSCon 2015 - Website DIY with Drupal 8[HKDUG] #20160626 - HKOSCon 2015 - Website DIY with Drupal 8
[HKDUG] #20160626 - HKOSCon 2015 - Website DIY with Drupal 8Wong Hoi Sing Edison
 
What is Drupal? And Why is it Useful? Webinar
What is Drupal? And Why is it Useful? WebinarWhat is Drupal? And Why is it Useful? Webinar
What is Drupal? And Why is it Useful? WebinarSuzanne Dergacheva
 
CMS web publishing solution for a travel related website using Drupal
CMS web publishing solution for a travel related website using DrupalCMS web publishing solution for a travel related website using Drupal
CMS web publishing solution for a travel related website using DrupalInfoBeans Technologies Ltd.
 
Developing a Communication & Knowledge management Strategy - my experience at...
Developing a Communication & Knowledge management Strategy - my experience at...Developing a Communication & Knowledge management Strategy - my experience at...
Developing a Communication & Knowledge management Strategy - my experience at...Jacqueline Nyagahima
 
Building Archivable Websites
Building Archivable WebsitesBuilding Archivable Websites
Building Archivable Websitesnullhandle
 
Drupal Migration
Drupal MigrationDrupal Migration
Drupal Migration永对 陈
 
Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3Drupalcon Paris
 
Drush 5.0 (DrupalCamp LA 2012) - Chris Charlton
Drush 5.0 (DrupalCamp LA 2012) - Chris CharltonDrush 5.0 (DrupalCamp LA 2012) - Chris Charlton
Drush 5.0 (DrupalCamp LA 2012) - Chris CharltonChris Charlton
 
Moving In: how to port your content from * to Drupal
Moving In: how to port your content from * to DrupalMoving In: how to port your content from * to Drupal
Moving In: how to port your content from * to DrupalEmma Jane Hogbin Westby
 
Create Website In Indian Languages using drupal
Create Website In Indian Languages using drupalCreate Website In Indian Languages using drupal
Create Website In Indian Languages using drupaldrupalindia
 
8 Web Practices for Drupal
8  Web Practices for Drupal8  Web Practices for Drupal
8 Web Practices for DrupalWingston
 
GeorgiaGov's move to Drupal - presentation by Nikhil Deshpande @nikofthehill
GeorgiaGov's move to Drupal - presentation by Nikhil Deshpande @nikofthehillGeorgiaGov's move to Drupal - presentation by Nikhil Deshpande @nikofthehill
GeorgiaGov's move to Drupal - presentation by Nikhil Deshpande @nikofthehillNikhil Deshpande
 
Using Drupal Features in B-Translator
Using Drupal Features in B-TranslatorUsing Drupal Features in B-Translator
Using Drupal Features in B-TranslatorDashamir Hoxha
 
Moving Drupal to the Cloud
Moving Drupal to the CloudMoving Drupal to the Cloud
Moving Drupal to the CloudAri Davidow
 
Drupal in the Cloud with Windows Azure
Drupal in the Cloud with Windows AzureDrupal in the Cloud with Windows Azure
Drupal in the Cloud with Windows AzureFord AntiTrust
 
The Wonderful World of Drupal 8 Multilingual
The Wonderful World of Drupal 8 MultilingualThe Wonderful World of Drupal 8 Multilingual
The Wonderful World of Drupal 8 MultilingualSuzanne Dergacheva
 
Drupal: My Search for a CMS
Drupal: My Search for a CMSDrupal: My Search for a CMS
Drupal: My Search for a CMSJim Heil
 
Data migration to Drupal using the migrate module
Data migration to Drupal using the migrate moduleData migration to Drupal using the migrate module
Data migration to Drupal using the migrate moduleLuc Bézier
 

En vedette (20)

[HKDUG] #20160626 - HKOSCon 2015 - Website DIY with Drupal 8
[HKDUG] #20160626 - HKOSCon 2015 - Website DIY with Drupal 8[HKDUG] #20160626 - HKOSCon 2015 - Website DIY with Drupal 8
[HKDUG] #20160626 - HKOSCon 2015 - Website DIY with Drupal 8
 
What is Drupal? And Why is it Useful? Webinar
What is Drupal? And Why is it Useful? WebinarWhat is Drupal? And Why is it Useful? Webinar
What is Drupal? And Why is it Useful? Webinar
 
CMS web publishing solution for a travel related website using Drupal
CMS web publishing solution for a travel related website using DrupalCMS web publishing solution for a travel related website using Drupal
CMS web publishing solution for a travel related website using Drupal
 
Developing a Communication & Knowledge management Strategy - my experience at...
Developing a Communication & Knowledge management Strategy - my experience at...Developing a Communication & Knowledge management Strategy - my experience at...
Developing a Communication & Knowledge management Strategy - my experience at...
 
Building Archivable Websites
Building Archivable WebsitesBuilding Archivable Websites
Building Archivable Websites
 
Drupal Migration
Drupal MigrationDrupal Migration
Drupal Migration
 
Migrate
MigrateMigrate
Migrate
 
Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3
 
Drush 5.0 (DrupalCamp LA 2012) - Chris Charlton
Drush 5.0 (DrupalCamp LA 2012) - Chris CharltonDrush 5.0 (DrupalCamp LA 2012) - Chris Charlton
Drush 5.0 (DrupalCamp LA 2012) - Chris Charlton
 
Moving In: how to port your content from * to Drupal
Moving In: how to port your content from * to DrupalMoving In: how to port your content from * to Drupal
Moving In: how to port your content from * to Drupal
 
Create Website In Indian Languages using drupal
Create Website In Indian Languages using drupalCreate Website In Indian Languages using drupal
Create Website In Indian Languages using drupal
 
Recipes for Drupal distributions
Recipes for Drupal distributionsRecipes for Drupal distributions
Recipes for Drupal distributions
 
8 Web Practices for Drupal
8  Web Practices for Drupal8  Web Practices for Drupal
8 Web Practices for Drupal
 
GeorgiaGov's move to Drupal - presentation by Nikhil Deshpande @nikofthehill
GeorgiaGov's move to Drupal - presentation by Nikhil Deshpande @nikofthehillGeorgiaGov's move to Drupal - presentation by Nikhil Deshpande @nikofthehill
GeorgiaGov's move to Drupal - presentation by Nikhil Deshpande @nikofthehill
 
Using Drupal Features in B-Translator
Using Drupal Features in B-TranslatorUsing Drupal Features in B-Translator
Using Drupal Features in B-Translator
 
Moving Drupal to the Cloud
Moving Drupal to the CloudMoving Drupal to the Cloud
Moving Drupal to the Cloud
 
Drupal in the Cloud with Windows Azure
Drupal in the Cloud with Windows AzureDrupal in the Cloud with Windows Azure
Drupal in the Cloud with Windows Azure
 
The Wonderful World of Drupal 8 Multilingual
The Wonderful World of Drupal 8 MultilingualThe Wonderful World of Drupal 8 Multilingual
The Wonderful World of Drupal 8 Multilingual
 
Drupal: My Search for a CMS
Drupal: My Search for a CMSDrupal: My Search for a CMS
Drupal: My Search for a CMS
 
Data migration to Drupal using the migrate module
Data migration to Drupal using the migrate moduleData migration to Drupal using the migrate module
Data migration to Drupal using the migrate module
 

Similaire à Content Staging in Drupal 8

Do you know what your drupal is doing? Observe it!
Do you know what your drupal is doing? Observe it!Do you know what your drupal is doing? Observe it!
Do you know what your drupal is doing? Observe it!Luca Lusso
 
Lean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushLean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushPantheon
 
Dependency injection Drupal Camp Wrocław 2014
Dependency injection Drupal Camp Wrocław 2014Dependency injection Drupal Camp Wrocław 2014
Dependency injection Drupal Camp Wrocław 2014Greg Szczotka
 
Development Setup of B-Translator
Development Setup of B-TranslatorDevelopment Setup of B-Translator
Development Setup of B-TranslatorDashamir Hoxha
 
Multi-tenancy with Rails
Multi-tenancy with RailsMulti-tenancy with Rails
Multi-tenancy with RailsPaul Gallagher
 
Drupal 8 - Core and API Changes
Drupal 8 - Core and API ChangesDrupal 8 - Core and API Changes
Drupal 8 - Core and API ChangesShabir Ahmad
 
Workflow Initiative
Workflow InitiativeWorkflow Initiative
Workflow Initiativetimmillwood
 
DevOps: Cooking Drupal Deployment
DevOps: Cooking Drupal DeploymentDevOps: Cooking Drupal Deployment
DevOps: Cooking Drupal DeploymentGerald Villorente
 
distage: Purely Functional Staged Dependency Injection; bonus: Faking Kind Po...
distage: Purely Functional Staged Dependency Injection; bonus: Faking Kind Po...distage: Purely Functional Staged Dependency Injection; bonus: Faking Kind Po...
distage: Purely Functional Staged Dependency Injection; bonus: Faking Kind Po...7mind
 
Drupal 8 DevOps . Profile and SQL flows.
Drupal 8 DevOps . Profile and SQL flows.Drupal 8 DevOps . Profile and SQL flows.
Drupal 8 DevOps . Profile and SQL flows.Andrii Podanenko
 
Building and Maintaining a Distribution in Drupal 7 with Features
Building and Maintaining a  Distribution in Drupal 7 with FeaturesBuilding and Maintaining a  Distribution in Drupal 7 with Features
Building and Maintaining a Distribution in Drupal 7 with FeaturesNuvole
 
Controller design-pattern-drupal-north-toronto-2018-final
Controller design-pattern-drupal-north-toronto-2018-finalController design-pattern-drupal-north-toronto-2018-final
Controller design-pattern-drupal-north-toronto-2018-finalVic Tarchenko
 
Drupal 8 and iOS - an Open Source App
Drupal 8 and iOS - an Open Source AppDrupal 8 and iOS - an Open Source App
Drupal 8 and iOS - an Open Source ApplittleMAS
 
A Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy SystemA Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy Systemadrian_nye
 
High Performance NodeJS
High Performance NodeJSHigh Performance NodeJS
High Performance NodeJSDicoding
 
When Docker ends, Chef begins ~ #idi2015 Incontro DevOps Italia
When Docker ends, Chef begins ~ #idi2015 Incontro DevOps ItaliaWhen Docker ends, Chef begins ~ #idi2015 Incontro DevOps Italia
When Docker ends, Chef begins ~ #idi2015 Incontro DevOps ItaliaGiovanni Toraldo
 

Similaire à Content Staging in Drupal 8 (20)

Do you know what your drupal is doing? Observe it!
Do you know what your drupal is doing? Observe it!Do you know what your drupal is doing? Observe it!
Do you know what your drupal is doing? Observe it!
 
Lean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushLean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and Drush
 
Dependency injection Drupal Camp Wrocław 2014
Dependency injection Drupal Camp Wrocław 2014Dependency injection Drupal Camp Wrocław 2014
Dependency injection Drupal Camp Wrocław 2014
 
Docker dDessi november 2015
Docker dDessi november 2015Docker dDessi november 2015
Docker dDessi november 2015
 
Development Setup of B-Translator
Development Setup of B-TranslatorDevelopment Setup of B-Translator
Development Setup of B-Translator
 
Multi-tenancy with Rails
Multi-tenancy with RailsMulti-tenancy with Rails
Multi-tenancy with Rails
 
Dockers zero to hero
Dockers zero to heroDockers zero to hero
Dockers zero to hero
 
Drupal 8 - Core and API Changes
Drupal 8 - Core and API ChangesDrupal 8 - Core and API Changes
Drupal 8 - Core and API Changes
 
Workflow Initiative
Workflow InitiativeWorkflow Initiative
Workflow Initiative
 
DevOps: Cooking Drupal Deployment
DevOps: Cooking Drupal DeploymentDevOps: Cooking Drupal Deployment
DevOps: Cooking Drupal Deployment
 
distage: Purely Functional Staged Dependency Injection; bonus: Faking Kind Po...
distage: Purely Functional Staged Dependency Injection; bonus: Faking Kind Po...distage: Purely Functional Staged Dependency Injection; bonus: Faking Kind Po...
distage: Purely Functional Staged Dependency Injection; bonus: Faking Kind Po...
 
Drupal 8 DevOps . Profile and SQL flows.
Drupal 8 DevOps . Profile and SQL flows.Drupal 8 DevOps . Profile and SQL flows.
Drupal 8 DevOps . Profile and SQL flows.
 
Building and Maintaining a Distribution in Drupal 7 with Features
Building and Maintaining a  Distribution in Drupal 7 with FeaturesBuilding and Maintaining a  Distribution in Drupal 7 with Features
Building and Maintaining a Distribution in Drupal 7 with Features
 
Spring boot
Spring bootSpring boot
Spring boot
 
Controller design-pattern-drupal-north-toronto-2018-final
Controller design-pattern-drupal-north-toronto-2018-finalController design-pattern-drupal-north-toronto-2018-final
Controller design-pattern-drupal-north-toronto-2018-final
 
Migrating data to drupal 8
Migrating data to drupal 8Migrating data to drupal 8
Migrating data to drupal 8
 
Drupal 8 and iOS - an Open Source App
Drupal 8 and iOS - an Open Source AppDrupal 8 and iOS - an Open Source App
Drupal 8 and iOS - an Open Source App
 
A Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy SystemA Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy System
 
High Performance NodeJS
High Performance NodeJSHigh Performance NodeJS
High Performance NodeJS
 
When Docker ends, Chef begins ~ #idi2015 Incontro DevOps Italia
When Docker ends, Chef begins ~ #idi2015 Incontro DevOps ItaliaWhen Docker ends, Chef begins ~ #idi2015 Incontro DevOps Italia
When Docker ends, Chef begins ~ #idi2015 Incontro DevOps Italia
 

Plus de Dick Olsson

Workflow Initiative Update
Workflow Initiative UpdateWorkflow Initiative Update
Workflow Initiative UpdateDick Olsson
 
What Really Changed with Drupal 8
What Really Changed with Drupal 8What Really Changed with Drupal 8
What Really Changed with Drupal 8Dick Olsson
 
Multisite Content Deployments for Media Organizations
Multisite Content Deployments for Media OrganizationsMultisite Content Deployments for Media Organizations
Multisite Content Deployments for Media OrganizationsDick Olsson
 
We need revisions and CRAP everywhere in Drupal core
We need revisions and CRAP everywhere in Drupal coreWe need revisions and CRAP everywhere in Drupal core
We need revisions and CRAP everywhere in Drupal coreDick Olsson
 
Content Staging in Drupal Core
Content Staging in Drupal CoreContent Staging in Drupal Core
Content Staging in Drupal CoreDick Olsson
 
How to Build a Scalable Platform for Today's Publishers
How to Build a Scalable Platform for Today's PublishersHow to Build a Scalable Platform for Today's Publishers
How to Build a Scalable Platform for Today's PublishersDick Olsson
 
Drupal distributions - how to build them
Drupal distributions - how to build themDrupal distributions - how to build them
Drupal distributions - how to build themDick Olsson
 

Plus de Dick Olsson (7)

Workflow Initiative Update
Workflow Initiative UpdateWorkflow Initiative Update
Workflow Initiative Update
 
What Really Changed with Drupal 8
What Really Changed with Drupal 8What Really Changed with Drupal 8
What Really Changed with Drupal 8
 
Multisite Content Deployments for Media Organizations
Multisite Content Deployments for Media OrganizationsMultisite Content Deployments for Media Organizations
Multisite Content Deployments for Media Organizations
 
We need revisions and CRAP everywhere in Drupal core
We need revisions and CRAP everywhere in Drupal coreWe need revisions and CRAP everywhere in Drupal core
We need revisions and CRAP everywhere in Drupal core
 
Content Staging in Drupal Core
Content Staging in Drupal CoreContent Staging in Drupal Core
Content Staging in Drupal Core
 
How to Build a Scalable Platform for Today's Publishers
How to Build a Scalable Platform for Today's PublishersHow to Build a Scalable Platform for Today's Publishers
How to Build a Scalable Platform for Today's Publishers
 
Drupal distributions - how to build them
Drupal distributions - how to build themDrupal distributions - how to build them
Drupal distributions - how to build them
 

Dernier

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 

Dernier (20)

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 

Content Staging in Drupal 8

  • 1. CONTENT STAGING IN DRUPAL 8 DICK OLSSON TWITTER: @dickolsson ADVANCED SITE BUILDING
  • 2. AGENDA What is content staging? What we want from the solution How it's (being) built for Drupal 8 Reusable protocols Headless Drupal
  • 3. WHO AM I? Dick Olsson Digital Engineering Manager at Pfizer dixon_ on drupal.org @dickolsson on Twitter Web technologist Drupal contributor
  • 4. WHAT IS CONTENT STAGING?
  • 6. SECURE PUBLISHING Stage Prod Corporate firewall
  • 7. MERGE WORKFLOW Stage Edit 1 Edit 2 Edit 3 Prod
  • 8. HUB/SPOKE WORKFLOW A D Editorial B C
  • 9. RING MODEL A D B C
  • 10. IT'S SORT OF... Content staging Content sharing Replication Syndication
  • 12. WHAT WE WANT We don't want to build just a “content staging” system. We need a generic and loosely coupled “content replication” framework capable of arbitrarily moving content between system.
  • 13. WHAT WE WANT Learning from the Drupal 7 implementations of UUID, Deploy and WF Tools modules.
  • 14. WHAT WE WANT Revisions everywhere Conflict detection Easier dependency management Ad-hoc / Continuous replication Bi-directional replication REST API
  • 16. HOW IT'S BUILT Contrib: Multiversion Relaxed Web Services Deploy Core: Serialization Restful Web Services Entity API
  • 17. multiversion.module Tracks update sequences in order to make dependency management a lot easier. Provides revision support for all content entities. Tracks revision trees in a way similar to Git to support conflict detection.
  • 18. multiversion.module Revisions are not tracked with a UUID. A hash calculated from the actual changes is better. This way it's easier for each server to detect conflicts without deep inspection or asking the network. <?php md5($this->serialize(array( $deleted, $sequence_id, $old_rev, $normalized_entity ), 'json'));
  • 19. { id: [{value: 1}], uuid: [{value: aabbcc}] _revs_info: [ {rev: 2-gghhii}, {rev: 1-ddeeff} ], _local_seq: 1, _deleted: 0, } multiversion.module
  • 20. multiversion.module CRAP instead of CRUD. Entities are never deleted. This is needed in order to replicate deletions while also being able to handle conflicts. Much like Git. A “compaction” job can be run on cron to purge old revisions if needed.
  • 21. <?php namespace DrupalmultiversionEntity; class SqlContentEntityStorage extends [...] { use SqlContentEntityTrait; //... } multiversion.module
  • 22. <?php namespace DrupalmultiversionEntity; class SequenceIndex implements SequenceIndexInterface { function _construct(KeyValueFactoryInterface $kv) {} // ... } multiversion.module
  • 23. <?php namespace DrupalmultiversionEntity; class ConflictManager implements ConflictManagerIf { // ... } class CompactionManager implements CompactionManagerIf { // ... } multiversion.module
  • 24. relaxed.module Provides a Restful/Relaxed JSON API. Endpoints for all content entities and file attachments. Endpoints for comparing revisions, starting/stopping replications and other administrative tasks. Drush plugin for running replications.
  • 25. <?php namespace DrupalrelaxedPluginrestresource; /** * @RestResource( * id = “relaxed:doc” * ) */ class DocResource extends ResourceBase { //... } relaxed.module
  • 26. <?php namespace DrupalrelaxedPluginrestresource; /** * @RestResource( * id = “relaxed:_bulk_docs” * ) */ class BulkDocsResource extends ResourceBase { //... } relaxed.module
  • 27. <?php namespace DrupalrelaxedPluginrestresource; /** * @RestResource( * id = “relaxed:_changes” * ) */ class ChangesResource extends ResourceBase { //... } relaxed.module
  • 28. <?php namespace DrupalrelaxedPluginrestresource; /** * @RestResource( * id = “relaxed:_revs_diff” * ) */ class RevsDiffResource extends ResourceBase { //... } relaxed.module
  • 29. deploy.module A simple UI to manage replications and conflicts
  • 30. HOW REPLICATION WORKS 1. Identify source and target by UUID 2. Get the current checkpoint from target site 3. GET /_changes?since=N from source site 4. Pass result to /_revs_diff on target site 5. Collect all missing revisions from source site 6. POST /_bulk_docs on target 7. Save new checkpoint on target site
  • 31. DEMO
  • 33. REUSABLE PROTOCOLS The revision and conflict detection model is taken from both Git and CouchDB. The replication protocol along with the API spec is taken from CouchDB.
  • 34. REUSABLE PROTOCOLS Reusing API specifications lends the framework to unexpected use cases and that otherwise would not be possible (CouchDB, PouchDB, TouchDB etc).
  • 35. HEADLESS DRUPAL AngularJS PouchDB Replication
  • 36. CONCLUSIONS Not straight port of the Drupal 7 modules. Loosely coupled system will cover more use cases and lend itself to unexpected ones as well. Implementing battle tested protocols.
  • 37. SPECIAL THANKS Andrei Jechiu (jeqq on drupal.org for working to these modules.
  • 38. FRIDAY CODE SPRINT Follow @drupalmentoring https://amsterdam2014.drupal.org/sprints Help improve Drupal: Sprint with the community on Friday. - We have tasks for every skill set. - Mentors are available for new contributors. - An optional Friday morning workshop will help you set up community tools.
  • 39. WHAT DID YOU THINK? EVAULATE THIS SESSION - AMSTERDAM2014.DRUPAL.ORG/SCHEDULE THANK YOU! DRUPAL: dixon_ TWITTER: @dickolsson