SlideShare a Scribd company logo
1 of 38
Turbocharging Drupal 
syndication with Node.JS 
Kalle Varisvirta 
Technology Director
Pre-requisites 
Moderate understanding of PHP and Javascript 
Moderate understanding of Drupal’s internals 
Some idea of how MySQL, NoSQL, SOLR and Varnish 
work
What you’ll learn 
How to speed up Drupal content delivery with Node.JS 
in real life 
Why to speed up Drupal content delivery with Node.JS 
How does Node.JS scale compared to Drupal/PHP
About me 
Kalle Varisvirta 
Technology Director at Exove 
Exove is a technology company based in Finland, 
Estonia and UK with over 70 professionals
The project 
The customer is Nelonen, a Finnish TV broadcaster 
owned by Sanoma 
The platform is used by their subscription video and 
catchup video on-demand service
The architecture
The architecture 
A video content management system 
It gets fed by linear TV programming as well as 
uploaded content 
It’s supposed to deliver all content to downstream 
clients, multiple websites, mobile and TV apps and 
other CMSs
The architecture 
Of videos, the system only handles metadata 
Any uploaded videos are moved away from the CMS, 
to a separate stream controlled by the CMS 
Videos are streamed from multiple streaming locations 
as directed by the CMS
Video content management 
system 
(Drupal 7) 
Linear television 
data 
(ERP) 
Drupal 7 site Wordpress site
Drupal 
Focusing solely in content management, not delivering 
any web pages outside the admin 
There are custom modules for 
Integrating to linear TV ERP system 
Controlling the video binary management system 
Marking videos ready to display
Video content management 
system 
(Drupal 7) 
Linear television 
data 
(ERP) 
Drupal 7 site Wordpress site
Video content management 
system 
(Drupal 7) 
Linear television 
data 
(ERP) 
Drupal 7 site 
Drupal 7 site 
iOS app 
Wordpress site 
Samsung 
SmartTV app 
Android app
Drupal optimizations 
It’s not like we didn’t think of the performance early on 
The Drupal 7 was built on MongoDB field storage and 
thus standing on a fast database 
The Views feeds (JSON) were coming from SOLR 
backend
Drupal optimizations 
MongoDB field storage 
Is faster 
Isn’t compatible with Views, unless used with Entity 
Field Queries 
EFQ’s didn’t originally work well with MongoDB, 
e.g. booleans just didn’t work 
Eventually, isn’t worth the trouble
Syndicating content 
Big feeds are always too slow if coming from Drupal 
Storage doesn’t make a difference (MySQL, 
MongoDB, SOLR) 
Field API is extensible and flexible and thus - slow
Fields API 
40 fields per item, 1000 items in feed page 
40 000 calls to every hook per page load
Hey, 
can’t you just 
cache it?
Caching feeds 
Downstream clients want integration feeds limited by 
time 
Time attribute by seconds of the last fetch 
To deal with existing content 
To deal with changed content 
Caching just doesn’t cut it well
Indexing 
outside
We need a new approach 
Indexing outside of Drupal felt like the only way out 
We decided we’ll go with SOLR via ApacheSOLR 
integration 
Distribution by a simple REST API
We need a new approach 
Due to very frequent updates in popularity data and the 
need the order by popularity, SOLR indexing was found 
too slow 
All data was moved to MongoDB except full-text 
search backend
Video content management 
system 
(Drupal 7) 
Linear television 
data 
(ERP) 
Drupal 7 site 
Drupal 7 site 
MongoDB, SOLR and 
Node.JS REST API 
iOS app 
Wordpress site 
Samsung 
SmartTV app 
Android app
Video content management 
system 
(Drupal 7) 
Linear television 
data 
(ERP) 
Drupal 7 site 
Drupal 7 site 
Indexing is done using a 
Drupal module, MongoDB 
indexer 
MongoDB, SOLR and 
Node.JS REST API 
iOS app 
Wordpress site 
Samsung 
SmartTV app 
Android app
MongoDB indexer 
MongoDB indexer uses a straight connection to the 
MongoDB 
We have an indexing API on the roadmap, but 
currently don’t have a need for it 
MongoDB indexer also de-normalizes the data for 
optimized distribution by the Node.JS REST API 
It’s a contributed module, currently waiting approval
Delivery & 
distribution
Delivery 
We have optimized data in the MongoDB 
We want to deliver it out, fast 
We want to be able to do some logic while delivering it
Node.JS
Node.JS 
Node.JS is Javascript running on the server 
The Javascript is ran by Chrome’s Javascript engine, 
the V8 
It’s non-blocking, event-based and when used 
correctly, blazing fast
RPS Avg response time 
Drupal 
Node.JS
Node.JS 
No Node.JS framework used 
No fronting Nginx used, requests are passed from the 
main program to separate sub-programs manually 
Running on three nodes, sharing a MongoDB replica 
set and fronted by a F5 load balancer
Node.JS 
The code is very simple as it’s mostly just passing 
information out from the MongoDB 
There are filters in the API that are validated and used 
for filtering, other than that, very little processing is 
done 
The backend has also some special services
API
Node.JS 
Cluster (npm module) 
Forever (npm module)
Node.JS 
For a PHP programmer, it’s quite a change 
Due to the asynchronous nature, parallel programming 
understanding is needed 
There are npm modules there to help 
During the lifetime of the project (18 months) both 
Node.JS and MongoDB have evolved quite a bit
What’s next?
Node.JS optimizations 
Separating different Node.JS services 
Moving MongoDB’s out from the Node.JS servers 
MongoDB’s are very, very IO intensive
Drupal optimizations 
Moving integrations outside Drupal for clarity 
Using a fake Drupal 8 REST API to connect the 
integrations to the Drupal 
To be able to upgrade some time soon 
We released out ‘fake Drupal 8 REST API’ module, 
it’s in sandbox pending approval
Thank you! 
Questions?

More Related Content

Viewers also liked

Language support in searching Drupal with SOLR - Drupalcamp London 2013
Language support in searching Drupal with SOLR - Drupalcamp London 2013Language support in searching Drupal with SOLR - Drupalcamp London 2013
Language support in searching Drupal with SOLR - Drupalcamp London 2013Exove
 
Internet Business Trends in 2014
Internet Business Trends in 2014Internet Business Trends in 2014
Internet Business Trends in 2014Exove
 
Drupal Cafe - Nenäpäivä
Drupal Cafe - NenäpäiväDrupal Cafe - Nenäpäivä
Drupal Cafe - NenäpäiväExove
 
Palvelusuunnittelu ketterissä verkkoprojekteissa
Palvelusuunnittelu ketterissä verkkoprojekteissaPalvelusuunnittelu ketterissä verkkoprojekteissa
Palvelusuunnittelu ketterissä verkkoprojekteissaExove
 
Agile Web Development, Exove seminar August 15th, 2013
Agile Web Development, Exove seminar August 15th, 2013Agile Web Development, Exove seminar August 15th, 2013
Agile Web Development, Exove seminar August 15th, 2013Exove
 
Drupal Café October - DrupalCon Highlights
Drupal Café October - DrupalCon HighlightsDrupal Café October - DrupalCon Highlights
Drupal Café October - DrupalCon HighlightsExove
 
Kuinka verkkokauppa taipuu kännykkään / Marblesin treenit
Kuinka verkkokauppa taipuu kännykkään / Marblesin treenitKuinka verkkokauppa taipuu kännykkään / Marblesin treenit
Kuinka verkkokauppa taipuu kännykkään / Marblesin treenitExove
 
AppTalk Frontline: Web vs Hybrid vs Native
AppTalk Frontline: Web vs Hybrid vs NativeAppTalk Frontline: Web vs Hybrid vs Native
AppTalk Frontline: Web vs Hybrid vs NativeExove
 

Viewers also liked (8)

Language support in searching Drupal with SOLR - Drupalcamp London 2013
Language support in searching Drupal with SOLR - Drupalcamp London 2013Language support in searching Drupal with SOLR - Drupalcamp London 2013
Language support in searching Drupal with SOLR - Drupalcamp London 2013
 
Internet Business Trends in 2014
Internet Business Trends in 2014Internet Business Trends in 2014
Internet Business Trends in 2014
 
Drupal Cafe - Nenäpäivä
Drupal Cafe - NenäpäiväDrupal Cafe - Nenäpäivä
Drupal Cafe - Nenäpäivä
 
Palvelusuunnittelu ketterissä verkkoprojekteissa
Palvelusuunnittelu ketterissä verkkoprojekteissaPalvelusuunnittelu ketterissä verkkoprojekteissa
Palvelusuunnittelu ketterissä verkkoprojekteissa
 
Agile Web Development, Exove seminar August 15th, 2013
Agile Web Development, Exove seminar August 15th, 2013Agile Web Development, Exove seminar August 15th, 2013
Agile Web Development, Exove seminar August 15th, 2013
 
Drupal Café October - DrupalCon Highlights
Drupal Café October - DrupalCon HighlightsDrupal Café October - DrupalCon Highlights
Drupal Café October - DrupalCon Highlights
 
Kuinka verkkokauppa taipuu kännykkään / Marblesin treenit
Kuinka verkkokauppa taipuu kännykkään / Marblesin treenitKuinka verkkokauppa taipuu kännykkään / Marblesin treenit
Kuinka verkkokauppa taipuu kännykkään / Marblesin treenit
 
AppTalk Frontline: Web vs Hybrid vs Native
AppTalk Frontline: Web vs Hybrid vs NativeAppTalk Frontline: Web vs Hybrid vs Native
AppTalk Frontline: Web vs Hybrid vs Native
 

Similar to Turbocharging Drupal Syndication with Node.js

Drupal Café: Building Node.js Accelerator for Your Headless Drupal
Drupal Café: Building Node.js Accelerator for Your Headless DrupalDrupal Café: Building Node.js Accelerator for Your Headless Drupal
Drupal Café: Building Node.js Accelerator for Your Headless DrupalExove
 
Building a Node.JS accelerator for your headless Drupal backend - DrupalCamp ...
Building a Node.JS accelerator for your headless Drupal backend - DrupalCamp ...Building a Node.JS accelerator for your headless Drupal backend - DrupalCamp ...
Building a Node.JS accelerator for your headless Drupal backend - DrupalCamp ...Exove
 
Lessons learned from a large scale OSGi web app
Lessons learned from a large scale OSGi web appLessons learned from a large scale OSGi web app
Lessons learned from a large scale OSGi web appPaul Bakker
 
Node.Js vs PHP Which One Should You Choose.pdf
Node.Js vs PHP Which One Should You Choose.pdfNode.Js vs PHP Which One Should You Choose.pdf
Node.Js vs PHP Which One Should You Choose.pdfWPWeb Infotech
 
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdf
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdfNode.js and the MEAN Stack Building Full-Stack Web Applications.pdf
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdflubnayasminsebl
 
PHP is the King, nodejs is the Prince and Lua is the fool
PHP is the King, nodejs is the Prince and Lua is the foolPHP is the King, nodejs is the Prince and Lua is the fool
PHP is the King, nodejs is the Prince and Lua is the foolAlessandro Cinelli (cirpo)
 
Cloud development technology sharing (BlueMix premier)
Cloud development technology sharing (BlueMix premier)Cloud development technology sharing (BlueMix premier)
Cloud development technology sharing (BlueMix premier)湯米吳 Tommy Wu
 
PHP is the king, nodejs is the prince and Lua is the fool
PHP is the king, nodejs is the prince and Lua is the foolPHP is the king, nodejs is the prince and Lua is the fool
PHP is the king, nodejs is the prince and Lua is the foolAlessandro Cinelli (cirpo)
 
Node.JS Vs PHP: Which Is The Top Server-Side Programming Language?
Node.JS Vs PHP: Which Is The Top Server-Side Programming Language?Node.JS Vs PHP: Which Is The Top Server-Side Programming Language?
Node.JS Vs PHP: Which Is The Top Server-Side Programming Language?Pixel Crayons
 
12 Reasons to Choose NodeJS for Product Development.pdf
12 Reasons to Choose NodeJS for Product Development.pdf12 Reasons to Choose NodeJS for Product Development.pdf
12 Reasons to Choose NodeJS for Product Development.pdfWDP Technologies
 
Node.js vs PHP, What should SMBs prefer for web development.pdf
Node.js vs PHP, What should SMBs prefer for web development.pdfNode.js vs PHP, What should SMBs prefer for web development.pdf
Node.js vs PHP, What should SMBs prefer for web development.pdfMindfire LLC
 
Running a business in the Cloud with AWS
Running a business in the Cloud with AWSRunning a business in the Cloud with AWS
Running a business in the Cloud with AWSConor O'Neill
 
Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015Bluegrass Digital
 
Java enterprise paradise
Java enterprise paradiseJava enterprise paradise
Java enterprise paradiseAmr Salah
 
All You Need to Know About Using Node.pdf
All You Need to Know About Using Node.pdfAll You Need to Know About Using Node.pdf
All You Need to Know About Using Node.pdfiDataScientists
 
Web Development Today
Web Development TodayWeb Development Today
Web Development Todaybretticus
 

Similar to Turbocharging Drupal Syndication with Node.js (20)

Drupal Café: Building Node.js Accelerator for Your Headless Drupal
Drupal Café: Building Node.js Accelerator for Your Headless DrupalDrupal Café: Building Node.js Accelerator for Your Headless Drupal
Drupal Café: Building Node.js Accelerator for Your Headless Drupal
 
Building a Node.JS accelerator for your headless Drupal backend - DrupalCamp ...
Building a Node.JS accelerator for your headless Drupal backend - DrupalCamp ...Building a Node.JS accelerator for your headless Drupal backend - DrupalCamp ...
Building a Node.JS accelerator for your headless Drupal backend - DrupalCamp ...
 
Lessons learned from a large scale OSGi web app
Lessons learned from a large scale OSGi web appLessons learned from a large scale OSGi web app
Lessons learned from a large scale OSGi web app
 
Node.Js vs PHP Which One Should You Choose.pdf
Node.Js vs PHP Which One Should You Choose.pdfNode.Js vs PHP Which One Should You Choose.pdf
Node.Js vs PHP Which One Should You Choose.pdf
 
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdf
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdfNode.js and the MEAN Stack Building Full-Stack Web Applications.pdf
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdf
 
PHP is the King, nodejs is the Prince and Lua is the fool
PHP is the King, nodejs is the Prince and Lua is the foolPHP is the King, nodejs is the Prince and Lua is the fool
PHP is the King, nodejs is the Prince and Lua is the fool
 
Cloud development technology sharing (BlueMix premier)
Cloud development technology sharing (BlueMix premier)Cloud development technology sharing (BlueMix premier)
Cloud development technology sharing (BlueMix premier)
 
PHP is the king, nodejs is the prince and Lua is the fool
PHP is the king, nodejs is the prince and Lua is the foolPHP is the king, nodejs is the prince and Lua is the fool
PHP is the king, nodejs is the prince and Lua is the fool
 
Node.JS Vs PHP: Which Is The Top Server-Side Programming Language?
Node.JS Vs PHP: Which Is The Top Server-Side Programming Language?Node.JS Vs PHP: Which Is The Top Server-Side Programming Language?
Node.JS Vs PHP: Which Is The Top Server-Side Programming Language?
 
12 Reasons to Choose NodeJS for Product Development.pdf
12 Reasons to Choose NodeJS for Product Development.pdf12 Reasons to Choose NodeJS for Product Development.pdf
12 Reasons to Choose NodeJS for Product Development.pdf
 
Node.js vs PHP, What should SMBs prefer for web development.pdf
Node.js vs PHP, What should SMBs prefer for web development.pdfNode.js vs PHP, What should SMBs prefer for web development.pdf
Node.js vs PHP, What should SMBs prefer for web development.pdf
 
Ramji
RamjiRamji
Ramji
 
Node.js as an IOT Bridge
Node.js as an IOT BridgeNode.js as an IOT Bridge
Node.js as an IOT Bridge
 
Running a business in the Cloud with AWS
Running a business in the Cloud with AWSRunning a business in the Cloud with AWS
Running a business in the Cloud with AWS
 
NodeJS VS Python
NodeJS VS PythonNodeJS VS Python
NodeJS VS Python
 
Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015
 
Javantura v4 - Support SpringBoot application development lifecycle using Ora...
Javantura v4 - Support SpringBoot application development lifecycle using Ora...Javantura v4 - Support SpringBoot application development lifecycle using Ora...
Javantura v4 - Support SpringBoot application development lifecycle using Ora...
 
Java enterprise paradise
Java enterprise paradiseJava enterprise paradise
Java enterprise paradise
 
All You Need to Know About Using Node.pdf
All You Need to Know About Using Node.pdfAll You Need to Know About Using Node.pdf
All You Need to Know About Using Node.pdf
 
Web Development Today
Web Development TodayWeb Development Today
Web Development Today
 

More from Exove

Data security in the age of GDPR – most common data security problems
Data security in the age of GDPR – most common data security problemsData security in the age of GDPR – most common data security problems
Data security in the age of GDPR – most common data security problemsExove
 
Provisioning infrastructure to AWS using Terraform – Exove
Provisioning infrastructure to AWS using Terraform – ExoveProvisioning infrastructure to AWS using Terraform – Exove
Provisioning infrastructure to AWS using Terraform – ExoveExove
 
Advanced custom fields in Wordpress
Advanced custom fields in WordpressAdvanced custom fields in Wordpress
Advanced custom fields in WordpressExove
 
Introduction to Robot Framework – Exove
Introduction to Robot Framework – ExoveIntroduction to Robot Framework – Exove
Introduction to Robot Framework – ExoveExove
 
Jenkins and visual regression – Exove
Jenkins and visual regression – ExoveJenkins and visual regression – Exove
Jenkins and visual regression – ExoveExove
 
Server-side React with Headless CMS – Exove
Server-side React with Headless CMS – ExoveServer-side React with Headless CMS – Exove
Server-side React with Headless CMS – ExoveExove
 
WebSockets in Bravo Dashboard – Exove
WebSockets in Bravo Dashboard – ExoveWebSockets in Bravo Dashboard – Exove
WebSockets in Bravo Dashboard – ExoveExove
 
Diversity in recruitment
Diversity in recruitmentDiversity in recruitment
Diversity in recruitmentExove
 
Saavutettavuus liiketoimintana
Saavutettavuus liiketoimintanaSaavutettavuus liiketoimintana
Saavutettavuus liiketoimintanaExove
 
Saavutettavuus osana Eläkeliiton verkkosivu-uudistusta
Saavutettavuus osana Eläkeliiton verkkosivu-uudistustaSaavutettavuus osana Eläkeliiton verkkosivu-uudistusta
Saavutettavuus osana Eläkeliiton verkkosivu-uudistustaExove
 
Mitä saavutettavuusdirektiivi pitää sisällään
Mitä saavutettavuusdirektiivi pitää sisälläänMitä saavutettavuusdirektiivi pitää sisällään
Mitä saavutettavuusdirektiivi pitää sisälläänExove
 
Creating Landing Pages for Drupal 8
Creating Landing Pages for Drupal 8Creating Landing Pages for Drupal 8
Creating Landing Pages for Drupal 8Exove
 
GDPR for developers
GDPR for developersGDPR for developers
GDPR for developersExove
 
Managing Complexity and Privacy Debt with Drupal
Managing Complexity and Privacy Debt with DrupalManaging Complexity and Privacy Debt with Drupal
Managing Complexity and Privacy Debt with DrupalExove
 
Life with digital services after GDPR
Life with digital services after GDPRLife with digital services after GDPR
Life with digital services after GDPRExove
 
GDPR - no beginning no end
GDPR - no beginning no endGDPR - no beginning no end
GDPR - no beginning no endExove
 
Developing truly personalised experiences
Developing truly personalised experiencesDeveloping truly personalised experiences
Developing truly personalised experiencesExove
 
Customer Experience and Personalisation
Customer Experience and PersonalisationCustomer Experience and Personalisation
Customer Experience and PersonalisationExove
 
Adventures In Programmatic Branding – How To Design With Algorithms And How T...
Adventures In Programmatic Branding – How To Design With Algorithms And How T...Adventures In Programmatic Branding – How To Design With Algorithms And How T...
Adventures In Programmatic Branding – How To Design With Algorithms And How T...Exove
 
Dataohjattu asiakaskokemus
Dataohjattu asiakaskokemusDataohjattu asiakaskokemus
Dataohjattu asiakaskokemusExove
 

More from Exove (20)

Data security in the age of GDPR – most common data security problems
Data security in the age of GDPR – most common data security problemsData security in the age of GDPR – most common data security problems
Data security in the age of GDPR – most common data security problems
 
Provisioning infrastructure to AWS using Terraform – Exove
Provisioning infrastructure to AWS using Terraform – ExoveProvisioning infrastructure to AWS using Terraform – Exove
Provisioning infrastructure to AWS using Terraform – Exove
 
Advanced custom fields in Wordpress
Advanced custom fields in WordpressAdvanced custom fields in Wordpress
Advanced custom fields in Wordpress
 
Introduction to Robot Framework – Exove
Introduction to Robot Framework – ExoveIntroduction to Robot Framework – Exove
Introduction to Robot Framework – Exove
 
Jenkins and visual regression – Exove
Jenkins and visual regression – ExoveJenkins and visual regression – Exove
Jenkins and visual regression – Exove
 
Server-side React with Headless CMS – Exove
Server-side React with Headless CMS – ExoveServer-side React with Headless CMS – Exove
Server-side React with Headless CMS – Exove
 
WebSockets in Bravo Dashboard – Exove
WebSockets in Bravo Dashboard – ExoveWebSockets in Bravo Dashboard – Exove
WebSockets in Bravo Dashboard – Exove
 
Diversity in recruitment
Diversity in recruitmentDiversity in recruitment
Diversity in recruitment
 
Saavutettavuus liiketoimintana
Saavutettavuus liiketoimintanaSaavutettavuus liiketoimintana
Saavutettavuus liiketoimintana
 
Saavutettavuus osana Eläkeliiton verkkosivu-uudistusta
Saavutettavuus osana Eläkeliiton verkkosivu-uudistustaSaavutettavuus osana Eläkeliiton verkkosivu-uudistusta
Saavutettavuus osana Eläkeliiton verkkosivu-uudistusta
 
Mitä saavutettavuusdirektiivi pitää sisällään
Mitä saavutettavuusdirektiivi pitää sisälläänMitä saavutettavuusdirektiivi pitää sisällään
Mitä saavutettavuusdirektiivi pitää sisällään
 
Creating Landing Pages for Drupal 8
Creating Landing Pages for Drupal 8Creating Landing Pages for Drupal 8
Creating Landing Pages for Drupal 8
 
GDPR for developers
GDPR for developersGDPR for developers
GDPR for developers
 
Managing Complexity and Privacy Debt with Drupal
Managing Complexity and Privacy Debt with DrupalManaging Complexity and Privacy Debt with Drupal
Managing Complexity and Privacy Debt with Drupal
 
Life with digital services after GDPR
Life with digital services after GDPRLife with digital services after GDPR
Life with digital services after GDPR
 
GDPR - no beginning no end
GDPR - no beginning no endGDPR - no beginning no end
GDPR - no beginning no end
 
Developing truly personalised experiences
Developing truly personalised experiencesDeveloping truly personalised experiences
Developing truly personalised experiences
 
Customer Experience and Personalisation
Customer Experience and PersonalisationCustomer Experience and Personalisation
Customer Experience and Personalisation
 
Adventures In Programmatic Branding – How To Design With Algorithms And How T...
Adventures In Programmatic Branding – How To Design With Algorithms And How T...Adventures In Programmatic Branding – How To Design With Algorithms And How T...
Adventures In Programmatic Branding – How To Design With Algorithms And How T...
 
Dataohjattu asiakaskokemus
Dataohjattu asiakaskokemusDataohjattu asiakaskokemus
Dataohjattu asiakaskokemus
 

Recently uploaded

Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 

Recently uploaded (20)

Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 

Turbocharging Drupal Syndication with Node.js

  • 1. Turbocharging Drupal syndication with Node.JS Kalle Varisvirta Technology Director
  • 2. Pre-requisites Moderate understanding of PHP and Javascript Moderate understanding of Drupal’s internals Some idea of how MySQL, NoSQL, SOLR and Varnish work
  • 3. What you’ll learn How to speed up Drupal content delivery with Node.JS in real life Why to speed up Drupal content delivery with Node.JS How does Node.JS scale compared to Drupal/PHP
  • 4. About me Kalle Varisvirta Technology Director at Exove Exove is a technology company based in Finland, Estonia and UK with over 70 professionals
  • 5. The project The customer is Nelonen, a Finnish TV broadcaster owned by Sanoma The platform is used by their subscription video and catchup video on-demand service
  • 7. The architecture A video content management system It gets fed by linear TV programming as well as uploaded content It’s supposed to deliver all content to downstream clients, multiple websites, mobile and TV apps and other CMSs
  • 8. The architecture Of videos, the system only handles metadata Any uploaded videos are moved away from the CMS, to a separate stream controlled by the CMS Videos are streamed from multiple streaming locations as directed by the CMS
  • 9. Video content management system (Drupal 7) Linear television data (ERP) Drupal 7 site Wordpress site
  • 10. Drupal Focusing solely in content management, not delivering any web pages outside the admin There are custom modules for Integrating to linear TV ERP system Controlling the video binary management system Marking videos ready to display
  • 11. Video content management system (Drupal 7) Linear television data (ERP) Drupal 7 site Wordpress site
  • 12. Video content management system (Drupal 7) Linear television data (ERP) Drupal 7 site Drupal 7 site iOS app Wordpress site Samsung SmartTV app Android app
  • 13. Drupal optimizations It’s not like we didn’t think of the performance early on The Drupal 7 was built on MongoDB field storage and thus standing on a fast database The Views feeds (JSON) were coming from SOLR backend
  • 14. Drupal optimizations MongoDB field storage Is faster Isn’t compatible with Views, unless used with Entity Field Queries EFQ’s didn’t originally work well with MongoDB, e.g. booleans just didn’t work Eventually, isn’t worth the trouble
  • 15. Syndicating content Big feeds are always too slow if coming from Drupal Storage doesn’t make a difference (MySQL, MongoDB, SOLR) Field API is extensible and flexible and thus - slow
  • 16. Fields API 40 fields per item, 1000 items in feed page 40 000 calls to every hook per page load
  • 17. Hey, can’t you just cache it?
  • 18. Caching feeds Downstream clients want integration feeds limited by time Time attribute by seconds of the last fetch To deal with existing content To deal with changed content Caching just doesn’t cut it well
  • 20. We need a new approach Indexing outside of Drupal felt like the only way out We decided we’ll go with SOLR via ApacheSOLR integration Distribution by a simple REST API
  • 21. We need a new approach Due to very frequent updates in popularity data and the need the order by popularity, SOLR indexing was found too slow All data was moved to MongoDB except full-text search backend
  • 22. Video content management system (Drupal 7) Linear television data (ERP) Drupal 7 site Drupal 7 site MongoDB, SOLR and Node.JS REST API iOS app Wordpress site Samsung SmartTV app Android app
  • 23. Video content management system (Drupal 7) Linear television data (ERP) Drupal 7 site Drupal 7 site Indexing is done using a Drupal module, MongoDB indexer MongoDB, SOLR and Node.JS REST API iOS app Wordpress site Samsung SmartTV app Android app
  • 24. MongoDB indexer MongoDB indexer uses a straight connection to the MongoDB We have an indexing API on the roadmap, but currently don’t have a need for it MongoDB indexer also de-normalizes the data for optimized distribution by the Node.JS REST API It’s a contributed module, currently waiting approval
  • 26. Delivery We have optimized data in the MongoDB We want to deliver it out, fast We want to be able to do some logic while delivering it
  • 28. Node.JS Node.JS is Javascript running on the server The Javascript is ran by Chrome’s Javascript engine, the V8 It’s non-blocking, event-based and when used correctly, blazing fast
  • 29. RPS Avg response time Drupal Node.JS
  • 30. Node.JS No Node.JS framework used No fronting Nginx used, requests are passed from the main program to separate sub-programs manually Running on three nodes, sharing a MongoDB replica set and fronted by a F5 load balancer
  • 31. Node.JS The code is very simple as it’s mostly just passing information out from the MongoDB There are filters in the API that are validated and used for filtering, other than that, very little processing is done The backend has also some special services
  • 32. API
  • 33. Node.JS Cluster (npm module) Forever (npm module)
  • 34. Node.JS For a PHP programmer, it’s quite a change Due to the asynchronous nature, parallel programming understanding is needed There are npm modules there to help During the lifetime of the project (18 months) both Node.JS and MongoDB have evolved quite a bit
  • 36. Node.JS optimizations Separating different Node.JS services Moving MongoDB’s out from the Node.JS servers MongoDB’s are very, very IO intensive
  • 37. Drupal optimizations Moving integrations outside Drupal for clarity Using a fake Drupal 8 REST API to connect the integrations to the Drupal To be able to upgrade some time soon We released out ‘fake Drupal 8 REST API’ module, it’s in sandbox pending approval