SlideShare a Scribd company logo
By @Florent_Torre - Paris Open Source Summit 2019
Deploy your content with Entity Share
1. Why sharing content?
▪ The 2 main use cases of sharing content
2. Why the Entity Share module?
▪ Differences with the Webfactory module
▪ Differences with the Deploy ecosystem
3. Entity Share’s architecture
▪ JSON:API usage
▪ Architecture
▪ Ecosystem
▪ Known problems
▪ Limitations
▪ Feature requests
▪ Roadmap
▪ Perspectives
4. Demo
WHY SHARING CONTENT ?
IN CONTEXT
THE 2MAIN USE CASES OF SHARING CONTENT
4
DEPLOY CONTENT ON MULTIPLE WEBSITES IN INDUSTRIALIZATION PROCESS
THE 2MAIN USE CASES OF SHARING CONTENT
5
DEPLOY CONTENT ON MULTIPLE WEBSITES IN INDUSTRIALIZATION PROCESS
▪Either architecture with content hub
▪Or cross-communications between different sites
THE 2MAIN USE CASES OF SHARING CONTENT
6
DEPLOY CONTENT ON MULTIPLE WEBSITES IN INDUSTRIALIZATION PROCESS
▪Deploy content from preproduction to production
(content staging), same as the content hub case
▪Retrieve content from production to development
environments
WHY
ENTITY SHARE?
ALTERNATIVES
DISCOVERY
7
CHALLENGES
FORCES
IN SHORT
▪ Created in 2001
▪ PHP
▪ 100% developed by the
community (3000)
Very big ecosystem,
composed from a wide
range of actors in size and
type
Contrib modules
▪ Webfactory
▪ Deploy
Acquia has a turnkey
solution for
▪ Websites creation
▪ Websites cloning
▪ Sharing content
The product Acquia
Content Hub is binding
▪ Content storage outside
of Drupal
▪ High costs
8
WEBFACTORY MODULE LIMITATIONS
Allows multi-site management from a central website
Facilitates the deployment of new sites
▪ Deploy a new “profile" directly from the backoffice
Sharing content from the central website
▪ Share entities: node
▪ A "channel" mechanism allows only certain entities
to be shared at certain websites
Usage of Core webservices
9
THE DEPLOY ECOSYSTEM
Pushed by the community
Quite unstable
▪ At least at the beginning of 2017
Binding at the workflow level
More for content staging
10
ENTITY SHARE’S
ARCHITECTURE
And how to help us!
JSON:API USAGE
▪To provide entities listings
▪More stable and documented than GraphQL (At the
beginning of 2017)
▪At the beginning of 2017, already an initiative for
JSON:API to become a Core module
▪Easy to use
12
JSON:API USAGE
ENTITY SHARE
PROVIDES A UI
ON TOP OF THE
JSON:API
public function extractEntity(array $data) {
// Format JSON as in
// JsonApiDocumentTopLevelNormalizerTest::testDenormalize().
$prepared_json = [
'data' => [
'type' => $data['type'],
'attributes' => $data['attributes'],
],
];
$parsed_type = explode('--', $data['type']);
return
$this->jsonapiDocumentTopLevelNormalizer->denormalize($prepared_json,
NULL, 'api_json', [
'resource_type' => $this->resourceTypeRepository->get(
$parsed_type[0],
$parsed_type[1]
),
]);
}
13
ARCHITECTURE: 2 SUB-MODULES
Entity share server
▪ Activate on the website that will provide the
contents
▪ Provides the channel system
▪ Prepare a JSON:API endpoint URL to call by the
client website: entity type, bundle, language,
filters, sorts
▪ Plus listing of channels according to the
authorized user
Entity share client
▪ Activate on the website that will pull (or push)
content
▪ Allow to set the websites on which to connect to
▪ Provides a pull form (and push form but on an
experimental branch)
THE 2 SUB-MODULES MAY BE ENABLED ON
THE SAME SITE.
14
ARCHITECTURE: GLOBAL VIEW OF THE PROCESS
Check if an entity exists with this UUID
▪ If no entity is found, create a new one
▪ If an entity exists, create or update the translation
regarding the language in the JSON data.
Store the UUID in the processed entities list
to avoid infinite loop
Manage entity reference fields
▪ For each “relationship” (JSON;API) field, request the
endpoint showing the list of entities referenced by
the field
▪ For each of these entities, do the initial process
▪ Put the ids of the processed entities in the entity
reference field value
Manage physical files
▪ If the entity is a file, use its properties (URI) to get
the content of the file
WHEN PULLING, FOR EACH SELECTED ENTITY
15
ENTITY SHARE’S ECOSYSTEM
Entity Share async (sub-module)
▪ To mark content to be synced later by a
queue during cron execution
Entity Share cron (separated project)
▪ https://www.drupal.org/project/entity_sh
are_cron
▪ Provides an UI to configure frequency of
automated pull of channels
▪ For more complex usage, there is an
example module in Entity Share:
entity_share_client_test
16
KNOWN PROBLEMS
Workaround for Core limitation on link fields
with internal link values: Use JSON:API Extras
Metatag field breaks the import (#3060702)
Not working when server website is behind
HTTP authentication (#2856713)
Implementation relies on some JSON:API
internal classes (#2939827)
Support of Dynamic Entity reference field is
broken since JSON:API 2.x (#3056102) ALL THE DETAILS ON THE PROJECT PAGE
AND IN THE MODULE ISSUES QUEUE
17
LIMITATIONS
To avoid side effects, config entities and users
are not handled
Impossible to import non-translatable entities
(#2996220)
Impossible to import content in a language not
enabled (#3064328)
Push form (#2856715):
▪ Impossible to PATCH translations (JSON:API)
▪ Impossible to PATCH file field (JSON:API)
18
FEATURE REQUESTS
Better Pull form (#3077808, #3077810, #3077815,
#2891653, #2856719, #3064252)
Avoid to synchronize already synced entities
(#3080629, #3077976, #3009258)
Parse RTE to get referenced entities (#3056911) :
▪ Entity embed
▪ Linkit
Parse Link fields to get referenced entities (#3064276)
Allow an entity to be updated locally after being
synchronized once (#2975806)
Compatibility with Block field (#3064331)
Manage Pathauto behavior (#3064320)
Better channel form (#2856717)
19
ROADMAP
Priority 1:
▪ Automated tests!!! (#2909022)
▪ bug reports
Priority 2:
▪ Rework services and tests for better architecture
and DX (#3060694)
▪ No more depend on JSON:API internal classes
(#2939827)
Priority 3:
▪ Feature requests depending on client needs and
sponsored collaborations.
▪ Now a feature request must have automated tests
before being merged!!!
ALL THE DETAILS ON THE PROJECT PAGE
AND IN THE MODULE ISSUES QUEUE
20
PERSPECTIVES
Entity Share V2?:
▪ Availability to have multiple bundles per channel
(JSON:API Cross Bundles)
▪ System of configurable plugins to control behavior:
▪ Depth of handled relationships
▪ Sync all translations at once
▪ Parse RTE
▪ Parse Link field
▪ …
See this issue to give and discuss the ideas.
21
Thanks for your attention!
And thanks to all the contributors!
Deploy your contents with entity share

More Related Content

PDF
Fiche de voeux
PPT
умножение и деление с 6 вал.
PPT
Делфините - проект "Успех"
PDF
Headless Drupal en pratique
PPTX
Plone FSR
PDF
Max Voloshin - "Organization of frontend development for products with micros...
PDF
Google Devfest Singapore - OpenSocial
Fiche de voeux
умножение и деление с 6 вал.
Делфините - проект "Успех"
Headless Drupal en pratique
Plone FSR
Max Voloshin - "Organization of frontend development for products with micros...
Google Devfest Singapore - OpenSocial

Similar to Deploy your contents with entity share (20)

PDF
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
DOC
PDF
Refactor Large applications with Backbone
PDF
Refactor Large apps with Backbone
PDF
Refactoring Large Web Applications with Backbone.js
PPTX
ZZ BC#7.5 asp.net mvc practice and guideline refresh!
PPTX
SharePoint 2014: Where to save my data, for devs!
PPTX
O365 Saturday - Deepdive SharePoint Client Side Rendering
PDF
Jaoo - Open Social A Standard For The Social Web
PDF
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
PPTX
SharePoint Saturday Lisbon 2017 - SharePoint Framework, Angular & Azure Funct...
PPTX
How and why we evolved a legacy Java web application to Scala... and we are s...
PPTX
Crafting Evolvable Api Responses
ODP
Moving from Web 1.0 to Web 2.0
DOCX
Uma SunilKumar Resume
PDF
C# .NET Developer Portfolio
PPT
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
PDF
Salesforce meetup | Lightning Web Component
PPTX
Creating a SPA blog withAngular and Cloud Firestore
PDF
IBM Connect 2014 - AD205: Creating State-of-the-Art Web Applications with Dom...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
Refactor Large applications with Backbone
Refactor Large apps with Backbone
Refactoring Large Web Applications with Backbone.js
ZZ BC#7.5 asp.net mvc practice and guideline refresh!
SharePoint 2014: Where to save my data, for devs!
O365 Saturday - Deepdive SharePoint Client Side Rendering
Jaoo - Open Social A Standard For The Social Web
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
SharePoint Saturday Lisbon 2017 - SharePoint Framework, Angular & Azure Funct...
How and why we evolved a legacy Java web application to Scala... and we are s...
Crafting Evolvable Api Responses
Moving from Web 1.0 to Web 2.0
Uma SunilKumar Resume
C# .NET Developer Portfolio
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
Salesforce meetup | Lightning Web Component
Creating a SPA blog withAngular and Cloud Firestore
IBM Connect 2014 - AD205: Creating State-of-the-Art Web Applications with Dom...
Ad

More from Smile I.T is open (20)

PDF
Streamlined CMS - DrupalCon Session
PDF
ROM Android Customs
PDF
[Smile] atelier spark - salon big data 13032018
PDF
Séminaire E-commerce "J'ai mal à mon catalogue" by Smile & Akeneo
PDF
Meet'up "Linux et Android dans les systèmes embarqués et les objets connectés"
PPTX
Séminaire Smile - Réussir son application Métier
PPTX
Blend Web Mix - Hackathon, Quand on ne sait pas où on va, autant y aller le ...
PPTX
eZ conference - Symfony Bundle enabling webfactory features
PDF
Les quick wins de l'UX
PDF
Séminaire Smile & Akeneo : e-commerce - J'ai mal à mon catalogue
PDF
Webinar SMILE : "Découvrez Alfresco 5.1, la solution pour une gestion documen...
PDF
Webinar SMILE : "L'Open Source, un accélérateur d'innovation pour les objets ...
PPTX
Meet Magento : Connected store with magento 2
PDF
Séminaire IoT EISTI du 14 avril 2016 avec Open Wide / Smile
PDF
Présentation sur l'accessibilité numérique / Evènement université de Lille 3
PDF
Webinar Smile : Comment industrialiser votre SI avec Ansible ?
PDF
A high profile project with Symfony and API Platform: beIN SPORTS
PPTX
Seminaire Drupal 8 à Nantes
PDF
Webinar Smile et WSO2
PPTX
Seminaire drupal8 Lille
Streamlined CMS - DrupalCon Session
ROM Android Customs
[Smile] atelier spark - salon big data 13032018
Séminaire E-commerce "J'ai mal à mon catalogue" by Smile & Akeneo
Meet'up "Linux et Android dans les systèmes embarqués et les objets connectés"
Séminaire Smile - Réussir son application Métier
Blend Web Mix - Hackathon, Quand on ne sait pas où on va, autant y aller le ...
eZ conference - Symfony Bundle enabling webfactory features
Les quick wins de l'UX
Séminaire Smile & Akeneo : e-commerce - J'ai mal à mon catalogue
Webinar SMILE : "Découvrez Alfresco 5.1, la solution pour une gestion documen...
Webinar SMILE : "L'Open Source, un accélérateur d'innovation pour les objets ...
Meet Magento : Connected store with magento 2
Séminaire IoT EISTI du 14 avril 2016 avec Open Wide / Smile
Présentation sur l'accessibilité numérique / Evènement université de Lille 3
Webinar Smile : Comment industrialiser votre SI avec Ansible ?
A high profile project with Symfony and API Platform: beIN SPORTS
Seminaire Drupal 8 à Nantes
Webinar Smile et WSO2
Seminaire drupal8 Lille
Ad

Recently uploaded (20)

PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
Introduction to Artificial Intelligence
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
System and Network Administraation Chapter 3
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
System and Network Administration Chapter 2
PPTX
Online Work Permit System for Fast Permit Processing
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Nekopoi APK 2025 free lastest update
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Digital Strategies for Manufacturing Companies
PPTX
L1 - Introduction to python Backend.pptx
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Introduction to Artificial Intelligence
Design an Analysis of Algorithms I-SECS-1021-03
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
How to Migrate SBCGlobal Email to Yahoo Easily
System and Network Administraation Chapter 3
ISO 45001 Occupational Health and Safety Management System
System and Network Administration Chapter 2
Online Work Permit System for Fast Permit Processing
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Upgrade and Innovation Strategies for SAP ERP Customers
PTS Company Brochure 2025 (1).pdf.......
Nekopoi APK 2025 free lastest update
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
CHAPTER 2 - PM Management and IT Context
Digital Strategies for Manufacturing Companies
L1 - Introduction to python Backend.pptx
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
ManageIQ - Sprint 268 Review - Slide Deck

Deploy your contents with entity share

  • 1. By @Florent_Torre - Paris Open Source Summit 2019 Deploy your content with Entity Share
  • 2. 1. Why sharing content? ▪ The 2 main use cases of sharing content 2. Why the Entity Share module? ▪ Differences with the Webfactory module ▪ Differences with the Deploy ecosystem 3. Entity Share’s architecture ▪ JSON:API usage ▪ Architecture ▪ Ecosystem ▪ Known problems ▪ Limitations ▪ Feature requests ▪ Roadmap ▪ Perspectives 4. Demo
  • 3. WHY SHARING CONTENT ? IN CONTEXT
  • 4. THE 2MAIN USE CASES OF SHARING CONTENT 4 DEPLOY CONTENT ON MULTIPLE WEBSITES IN INDUSTRIALIZATION PROCESS
  • 5. THE 2MAIN USE CASES OF SHARING CONTENT 5 DEPLOY CONTENT ON MULTIPLE WEBSITES IN INDUSTRIALIZATION PROCESS ▪Either architecture with content hub ▪Or cross-communications between different sites
  • 6. THE 2MAIN USE CASES OF SHARING CONTENT 6 DEPLOY CONTENT ON MULTIPLE WEBSITES IN INDUSTRIALIZATION PROCESS ▪Deploy content from preproduction to production (content staging), same as the content hub case ▪Retrieve content from production to development environments
  • 8. CHALLENGES FORCES IN SHORT ▪ Created in 2001 ▪ PHP ▪ 100% developed by the community (3000) Very big ecosystem, composed from a wide range of actors in size and type Contrib modules ▪ Webfactory ▪ Deploy Acquia has a turnkey solution for ▪ Websites creation ▪ Websites cloning ▪ Sharing content The product Acquia Content Hub is binding ▪ Content storage outside of Drupal ▪ High costs 8
  • 9. WEBFACTORY MODULE LIMITATIONS Allows multi-site management from a central website Facilitates the deployment of new sites ▪ Deploy a new “profile" directly from the backoffice Sharing content from the central website ▪ Share entities: node ▪ A "channel" mechanism allows only certain entities to be shared at certain websites Usage of Core webservices 9
  • 10. THE DEPLOY ECOSYSTEM Pushed by the community Quite unstable ▪ At least at the beginning of 2017 Binding at the workflow level More for content staging 10
  • 12. JSON:API USAGE ▪To provide entities listings ▪More stable and documented than GraphQL (At the beginning of 2017) ▪At the beginning of 2017, already an initiative for JSON:API to become a Core module ▪Easy to use 12
  • 13. JSON:API USAGE ENTITY SHARE PROVIDES A UI ON TOP OF THE JSON:API public function extractEntity(array $data) { // Format JSON as in // JsonApiDocumentTopLevelNormalizerTest::testDenormalize(). $prepared_json = [ 'data' => [ 'type' => $data['type'], 'attributes' => $data['attributes'], ], ]; $parsed_type = explode('--', $data['type']); return $this->jsonapiDocumentTopLevelNormalizer->denormalize($prepared_json, NULL, 'api_json', [ 'resource_type' => $this->resourceTypeRepository->get( $parsed_type[0], $parsed_type[1] ), ]); } 13
  • 14. ARCHITECTURE: 2 SUB-MODULES Entity share server ▪ Activate on the website that will provide the contents ▪ Provides the channel system ▪ Prepare a JSON:API endpoint URL to call by the client website: entity type, bundle, language, filters, sorts ▪ Plus listing of channels according to the authorized user Entity share client ▪ Activate on the website that will pull (or push) content ▪ Allow to set the websites on which to connect to ▪ Provides a pull form (and push form but on an experimental branch) THE 2 SUB-MODULES MAY BE ENABLED ON THE SAME SITE. 14
  • 15. ARCHITECTURE: GLOBAL VIEW OF THE PROCESS Check if an entity exists with this UUID ▪ If no entity is found, create a new one ▪ If an entity exists, create or update the translation regarding the language in the JSON data. Store the UUID in the processed entities list to avoid infinite loop Manage entity reference fields ▪ For each “relationship” (JSON;API) field, request the endpoint showing the list of entities referenced by the field ▪ For each of these entities, do the initial process ▪ Put the ids of the processed entities in the entity reference field value Manage physical files ▪ If the entity is a file, use its properties (URI) to get the content of the file WHEN PULLING, FOR EACH SELECTED ENTITY 15
  • 16. ENTITY SHARE’S ECOSYSTEM Entity Share async (sub-module) ▪ To mark content to be synced later by a queue during cron execution Entity Share cron (separated project) ▪ https://www.drupal.org/project/entity_sh are_cron ▪ Provides an UI to configure frequency of automated pull of channels ▪ For more complex usage, there is an example module in Entity Share: entity_share_client_test 16
  • 17. KNOWN PROBLEMS Workaround for Core limitation on link fields with internal link values: Use JSON:API Extras Metatag field breaks the import (#3060702) Not working when server website is behind HTTP authentication (#2856713) Implementation relies on some JSON:API internal classes (#2939827) Support of Dynamic Entity reference field is broken since JSON:API 2.x (#3056102) ALL THE DETAILS ON THE PROJECT PAGE AND IN THE MODULE ISSUES QUEUE 17
  • 18. LIMITATIONS To avoid side effects, config entities and users are not handled Impossible to import non-translatable entities (#2996220) Impossible to import content in a language not enabled (#3064328) Push form (#2856715): ▪ Impossible to PATCH translations (JSON:API) ▪ Impossible to PATCH file field (JSON:API) 18
  • 19. FEATURE REQUESTS Better Pull form (#3077808, #3077810, #3077815, #2891653, #2856719, #3064252) Avoid to synchronize already synced entities (#3080629, #3077976, #3009258) Parse RTE to get referenced entities (#3056911) : ▪ Entity embed ▪ Linkit Parse Link fields to get referenced entities (#3064276) Allow an entity to be updated locally after being synchronized once (#2975806) Compatibility with Block field (#3064331) Manage Pathauto behavior (#3064320) Better channel form (#2856717) 19
  • 20. ROADMAP Priority 1: ▪ Automated tests!!! (#2909022) ▪ bug reports Priority 2: ▪ Rework services and tests for better architecture and DX (#3060694) ▪ No more depend on JSON:API internal classes (#2939827) Priority 3: ▪ Feature requests depending on client needs and sponsored collaborations. ▪ Now a feature request must have automated tests before being merged!!! ALL THE DETAILS ON THE PROJECT PAGE AND IN THE MODULE ISSUES QUEUE 20
  • 21. PERSPECTIVES Entity Share V2?: ▪ Availability to have multiple bundles per channel (JSON:API Cross Bundles) ▪ System of configurable plugins to control behavior: ▪ Depth of handled relationships ▪ Sync all translations at once ▪ Parse RTE ▪ Parse Link field ▪ … See this issue to give and discuss the ideas. 21
  • 22. Thanks for your attention! And thanks to all the contributors!