Bidirectional data syncing

Artem Miroshnyk

Web Developer in FFW

Agenda

  • Common tasks/problems overview
  • Contrib modules
    • Default Services + Services Client
    • RESTful Web Services
    • Web Service Client
  • Guzzle, custom code
  • Real world cases

Examples from real life

Environments relationships

Entities structure

Node Title

Node body

Text field

Checkboxes

Radios

Location field

Metatags

Scheduler

Url Alias

Field Collection

File

Image

Term

Reference

Workers

Cron

Drupal Queues

Run Time

Manual Batch

Out-of-the-box solution

https://www.drupal.org/project/services

+

https://www.drupal.org/project/services_client

Services

  • Configuration UI
  • XMLRCP, REST servers
  • OAuth, Basic HTTP, cookies based authorization
  • Core entities support out of the box and contrib for any other contrib entity

Services Client

  • Configuration UI
  • Support CRUD event listener for any entity
  • Manual but that's why extremely flexible field mapping and condition settings
  • Requires UUID
  • Support run time, queue and prioritized queue workers
  • Nice OOP structure to write own implementation

Guzzle and custom solutions

  • Install Guzzle via https://www.drupal.org/project/composer_manager
  • Nice OOP code
  • Integration with Master site's services via https://drupal.org/project/services_client
  • Requires UUID
  • Support run time, queue and prioritized queue workers
  • Nice OOP structure to write own implementation

Bidirectional data sync between Drupal instances

By Artyom Miroshnik

Bidirectional data sync between Drupal instances

  • 668