Slide 1

Slide 1 text

PHPUG München / 2015-11-25 Max Kleucker (@maxlmator) Building a Content Management System for IoT Environments

Slide 2

Slide 2 text

(code) lessons learnt

Slide 3

Slide 3 text

1. Intro 2. Developing 3. Operations

Slide 4

Slide 4 text

Internet of Things

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

Content Management System

Slide 7

Slide 7 text

Content Delivery Repository

Slide 8

Slide 8 text

Intro Project History • Started in October 2014 • 5-day Prototype • Team grew from 2 to 12 members • Support for 28 locales (and growing)

Slide 9

Slide 9 text

CDR • Recipes • Manuals, Tips for Devices • Localization for App • Assets for App • ... { Intro Content for IoT

Slide 10

Slide 10 text

Intro Technology • Drupal 7 • Custom modules for • communication with 
 3rd-party-components • workflow & permissions

Slide 11

Slide 11 text

CDR 3rd party systems Apps import data push data create, enrich, translate Translation System automatic translation

Slide 12

Slide 12 text

CDR 3rd party systems Apps import data push data create, enrich, translate Translation System automatic translation

Slide 13

Slide 13 text

Automatic Translation CDR Translation System content, rendered in XML files translated content, rendered in XML files content import

Slide 14

Slide 14 text

CDR 3rd party systems Apps import data push data create, enrich, translate Translation System automatic translation

Slide 15

Slide 15 text

Content Deployment CDR App Server content, rendered as single JSON files (using Twig) + referencing meta-file media assets, saved in a S3 bucket references

Slide 16

Slide 16 text

Content Deployment CDR App Server provides app localisation fetches media assets fetches relevant content

Slide 17

Slide 17 text

Content Deployment CDR App Server provides app localisation fetches media assets fetches relevant content

Slide 18

Slide 18 text

Intro Recap • Asynchronous communication w/ 3rd parties • No direct interaction with end-users • Difficult to accommodate various workflow-requirements

Slide 19

Slide 19 text

1. Intro 2. Developing 3. Operations

Slide 20

Slide 20 text

Develop Dev Environment { { using looking into

Slide 21

Slide 21 text

Develop Automated Testing

Slide 22

Slide 22 text

Develop Get to know your framework

Slide 23

Slide 23 text

Slide 24

Slide 24 text

Develop Ask a colleague +(| )=

Slide 25

Slide 25 text

Develop Recap • Demand for communication increases with team size • Let your tools help you, keep an eye on new tools • Dig deep into the systems you're using

Slide 26

Slide 26 text

1. Intro 2. Developing 3. Operations

Slide 27

Slide 27 text

Operations PHP in the cloud Elastic Beanstalk
 (Application) S3
 (File Storage) RDS (Database)

Slide 28

Slide 28 text

Operations Elastic Beanstalk • Challenges: • No persistent file system • Multiple instances that don't know about each other

Slide 29

Slide 29 text

• Requirement: • WYSIWYG with File Picker • Two options: • Use S3 library • Mount the S3 Bucket on the filesystem (s3fs) • But: • Is it feasible for users to search in gigabytes of files? Operations Using S3

Slide 30

Slide 30 text

• Requirement: • Keep the down time at a minimum during production releases • Our attempts: • Try to decouple any long running jobs from the application • Move imports / exports to a different machine Operations Long running jobs

Slide 31

Slide 31 text

• Sending E-Mails • Using a centralized relay instead of dealing with Host configurations • Logging • Gather logs in a central place • Evaluate with 3rd party tools (e.g. ELK-Stack) Operations Decouple functionality

Slide 32

Slide 32 text

Operations Recap • Try to continually improve your system and workflow • Technical limitations and bottlenecks might also hint at different usability issues

Slide 33

Slide 33 text

Current Status • Organisational • More Device-Types, more countries, more content • Technical • Re-Evaluating Drupal as basis system • Improving the UI based on user feedback • Business requirements =/= Real world usage

Slide 34

Slide 34 text

thank you. questions?