SlideShare uma empresa Scribd logo
1 de 52
PUSHING UMBRACO
TO THE LIMITS
While building New Heroes
• Lead developer @coloursinternet
• Umbraco MVP 2016/2017
• Working with Umbraco since late 2007 (v3)
Dave Woestenborghs
@dawoe21
• Senior Developer @coloursinternet
• 3 times Umbraco MVP
• Working with Umbraco since 2009 (v4)
• Was looking for a job last year during CG. Since
than only been working on this project.
Jeroen Breuer
@j_breuer
INTRODUCTION
Pushing umbraco to the limits
THE AGENDA
1. What is New Heroes
2. Statistics
3. Load balance setup
4. 1-1 multilingual
5. Database access
6. Miniprofiler
7. Performance tweaking
8. Pluginmanager
9. Other techniques
10. Questions
NEW HEROES
New Heroes is an online platform that allows access to soft skills and
leadership training for anyone , anytime and anywhere in the world . Through
the platform , users can continue develop in the areas of communication,
personal empowerment and leadership.
5
NEW HEROES
For a fixed and low monthly
amount, both individuals and
businesses, have unlimited usage
of all trainings , also known as
'learning journeys ' .
VIDEO
PUSHINGUMBRACOTOTHELIMITS
The statistics
• Lines of code : 69k
• Git commits : 7500+
• Community property editors : 4
• Community tools : 7
• Custom build property editors : 1
STATS CODE
PUSHINGUMBRACOTOTHELIMITS
The statistics
• Umbraco Version : 7.3.8 (started on 7.3.0-beta1)
• Number of media items : 1263
• Number of content items : 8411
• Number of cache instructions : +37k
• Number of doctypes : 205
STATS UMBRACO
PUSHINGUMBRACOTOTHELIMITS
The statistics
• Number of times that Jeroen deleted the wrong doctype : 2
STATS MISTAKES
Development goals
• Application should autoscale
• Use core/community functionality where possible
• Focus on performance
• DRY backend and front end
• 1-1 multilingual for reusable content
OUR GOALS
PUSHINGUMBRACOTOTHELIMITS
PUSHINGUMBRACOTOTHELIMITS
Load balance setup
• Hosted on Azure (Blob storage / redis cache)
• VM with editors environment (master)
• Front end runs on auto scaling web app (slaves)
• Started on 7.3 beta because of the flexible loadbalancing (no
config for loadbalancing needed)
• But you need to have some config tweaks. So make sure you
read the loadbalancing docs on our.umbraco.org
LOADBALANCED
12
LOADBALANCED
• Use correct events to update custom cache (e.g. output cache)
• Published event is only executed on the server where it’s triggered.
Not on all other servers.
• Hook in to CacheRefreshers CacheUpdated event instead.
PageCacheRefresher.CacheUpdated += (sender, args) =>
{
{
// clear cache here
};
13
LOADBALANCED
• For custom needs it’s possible to create your own cache refreshers .
• Need to create a class that implements ICacheRefresher interface.
• Umbraco has some base classes that you can inherit from like
CacheRefresherBase and JsonCacheRefresherBase
• When your data is changed tell the distributed cache that it needs to
execute a method on the cacherefresher :
• DistributedCache.Instance.RefreshAll(CustomCacheRefresherGuid);
• And handle the CacheUpdated event for the cache refresher
14
1-1 multilingual
MULTILINGUAL
SETUP
15
MULTILINGUALSETUP
• Still uses a separate language tree
• Nodes that need to be reused in a shared data folder.
• Uses a UrlProvider and ContentFinder.
• Vorto for the 1-1 properties
• Nested Content to create fieldsets
• ModelsBuilder for strongly typed fieldsets.
• http://24days.in/umbraco/2015/multilingual-vorto-nested-content/
16
PUSHINGUMBRACOTOTHELIMITS
17
PUSHINGUMBRACOTOTHELIMITS
18
PUSHINGUMBRACOTOTHELIMITS
19
PUSHINGUMBRACOTOTHELIMITS
20
PUSHINGUMBRACOTOTHELIMITS
21
PUSHINGUMBRACOTOTHELIMITS
22
RENDER
23
MODELSBUILDER
24
URLPROVIDER
25
CONTENTFINDER
Database access
• Needed custom database tables for storing user data
• Needed to select a ORM
• Decided to go with PetaPoco because it ships with Umbraco.
DATABASE ACCESS
PUSHINGUMBRACOTOTHELIMITS
27
EXAMPLEPOCO
28
CRUDOPERATIONS
29
Database access
• Goal was to do database maintenance (creating, modifying
tables) from code so that it becomes part of the automated build
process.
• We’re using uSync for all Umbraco parts.
MAINTENANCE
PUSHINGUMBRACOTOTHELIMITS
30
PETAPOCOATTEMPT
31
• Only possible to create and drop tables
• No ways to alter tables, add constraints and indexes
• Needed an alternative
PETA POCO ATTEMPT
PUSHINGUMBRACOTOTHELIMITS
Database access
32
• Migrations is used by Umbraco process
• Have been in place since 6.0.0
• Open to the general public since 7.3.0
MIGRATIONS
PUSHINGUMBRACOTOTHELIMITS
Database access
33
MIGRATIONS
34
MIGRATIONS
35
MIGRATIONS
36
MIGRATIONS
37
Miniprofiler
PERFORMANCE
MINIPROFILER
38
LOGGINGEXECUTIONTIME
39
LOGGINGEXECUTIONTIME
40
LOGGINGEXECUTIONTIME
41
MVCWITHHTML.ACTION
42
MVCWITHHTML.ACTION
43
EXAMINE
44
DATABASE
Pluginmanager
Whenever types need to be found in assemblies in order to add
them to resolvers, the PluginManager should be used. The
TypeFinder should never be used directly in any code except for in
PluginManager extension methods or in the PluingManager itself.
• PluginManager.Current.ResolveTypes<T>
• PluginManager.Current.ResolveAttributedTypes<T>()
• PluginManager.Current.ResolveTypesWithAttribute<T,S>
PLUGINMANAGER
PUSHINGUMBRACOTOTHELIMITS
Pluginmanager
A Resolver is an class that returns a plugin object or multiple
plugin objects. There are 2 types of Resolvers: A single object
resolver and a multiple object resolver.
Some examples :
Single object resolver :
DefaultRenderMvcControllerResolver.Current
Multiple object resolver : UrlProviderResolver.Current
OBJECTRESOLVERS
PUSHINGUMBRACOTOTHELIMITS
47
EXAMPLE
48
EXAMPLE
49
EXAMPLE
50
Pluginmanager
EXAMPLE
• Only possible to create and drop tables
• No ways to alter tables, add constraints and indexes
• Needed an alternative
PUSHINGUMBRACOTOTHELIMITS
51
Other techniques
OTHER TECHNIQUES
• Custom section with Angular + Umbraco WebApi + PetaPoco
• Virtual nodes
• Service API (ContentService, MediaService, RelationService)
• ImageProcessor to resize images
• Dependency Injection
• Custom property value converters
PUSHINGUMBRACOTOTHELIMITS
Pushing umbraco to the limits
QUESTIONS?

Mais conteúdo relacionado

Mais procurados

Drupal 8, Symfony and Content Management
Drupal 8, Symfony and Content ManagementDrupal 8, Symfony and Content Management
Drupal 8, Symfony and Content ManagementExove
 
WordPress development checklist
WordPress development checklistWordPress development checklist
WordPress development checklistBinh Quan Duc
 
AWS, is it interesting?
AWS, is it interesting?AWS, is it interesting?
AWS, is it interesting?Duy Tan Geek
 
Start with Bolt and Go Ez - eZ Publish Summer Camp 2015
Start with Bolt and Go Ez - eZ Publish Summer Camp 2015Start with Bolt and Go Ez - eZ Publish Summer Camp 2015
Start with Bolt and Go Ez - eZ Publish Summer Camp 2015Exove
 
Introduction to JS frameworks
Introduction to JS frameworksIntroduction to JS frameworks
Introduction to JS frameworksDeepu S Nath
 
Building Drupal 8 Sites
Building Drupal 8 SitesBuilding Drupal 8 Sites
Building Drupal 8 SitesExove
 
Polkadot encode club moonbeam
Polkadot encode club moonbeamPolkadot encode club moonbeam
Polkadot encode club moonbeamDanielBohnemann
 
Introduction to ASP.NET Core
Introduction to ASP.NET CoreIntroduction to ASP.NET Core
Introduction to ASP.NET CoreMiroslav Popovic
 
WebAssembly with Rust
WebAssembly with RustWebAssembly with Rust
WebAssembly with RustKnoldus Inc.
 
Build your first DApp using Substrate Framework - Part I
Build your first DApp using Substrate Framework - Part IBuild your first DApp using Substrate Framework - Part I
Build your first DApp using Substrate Framework - Part IKnoldus Inc.
 
WordPress Multilingual: WordCamp Antwerp 2016
WordPress Multilingual: WordCamp Antwerp 2016WordPress Multilingual: WordCamp Antwerp 2016
WordPress Multilingual: WordCamp Antwerp 2016Octavio Andrés Cifuentes
 
Building Desktop RIAs with PHP, HTML & Javascript in AIR
Building Desktop RIAs with  PHP, HTML & Javascript  in AIRBuilding Desktop RIAs with  PHP, HTML & Javascript  in AIR
Building Desktop RIAs with PHP, HTML & Javascript in AIRfunkatron
 
Instruction to build Apache CloudStack docs with Sphinx
Instruction to build Apache CloudStack docs with SphinxInstruction to build Apache CloudStack docs with Sphinx
Instruction to build Apache CloudStack docs with SphinxGo Chiba
 
introduction to js
introduction to jsintroduction to js
introduction to jsSireesh K
 

Mais procurados (20)

Don't worry with bower
Don't worry with bowerDon't worry with bower
Don't worry with bower
 
Drupal 8, Symfony and Content Management
Drupal 8, Symfony and Content ManagementDrupal 8, Symfony and Content Management
Drupal 8, Symfony and Content Management
 
WordPress development checklist
WordPress development checklistWordPress development checklist
WordPress development checklist
 
AWS, is it interesting?
AWS, is it interesting?AWS, is it interesting?
AWS, is it interesting?
 
DevDay 2018 - Blazor
DevDay 2018 - BlazorDevDay 2018 - Blazor
DevDay 2018 - Blazor
 
MEAN stack
MEAN stackMEAN stack
MEAN stack
 
Start with Bolt and Go Ez - eZ Publish Summer Camp 2015
Start with Bolt and Go Ez - eZ Publish Summer Camp 2015Start with Bolt and Go Ez - eZ Publish Summer Camp 2015
Start with Bolt and Go Ez - eZ Publish Summer Camp 2015
 
Introduction to JS frameworks
Introduction to JS frameworksIntroduction to JS frameworks
Introduction to JS frameworks
 
Building Drupal 8 Sites
Building Drupal 8 SitesBuilding Drupal 8 Sites
Building Drupal 8 Sites
 
JustSharing: Lessons in Xamarin development
JustSharing: Lessons in Xamarin development JustSharing: Lessons in Xamarin development
JustSharing: Lessons in Xamarin development
 
Mini-Training: NancyFX
Mini-Training: NancyFXMini-Training: NancyFX
Mini-Training: NancyFX
 
Polkadot encode club moonbeam
Polkadot encode club moonbeamPolkadot encode club moonbeam
Polkadot encode club moonbeam
 
Introduction to ASP.NET Core
Introduction to ASP.NET CoreIntroduction to ASP.NET Core
Introduction to ASP.NET Core
 
WebAssembly with Rust
WebAssembly with RustWebAssembly with Rust
WebAssembly with Rust
 
Build your first DApp using Substrate Framework - Part I
Build your first DApp using Substrate Framework - Part IBuild your first DApp using Substrate Framework - Part I
Build your first DApp using Substrate Framework - Part I
 
WordPress Multilingual: WordCamp Antwerp 2016
WordPress Multilingual: WordCamp Antwerp 2016WordPress Multilingual: WordCamp Antwerp 2016
WordPress Multilingual: WordCamp Antwerp 2016
 
Linux for Web Developers
Linux for Web DevelopersLinux for Web Developers
Linux for Web Developers
 
Building Desktop RIAs with PHP, HTML & Javascript in AIR
Building Desktop RIAs with  PHP, HTML & Javascript  in AIRBuilding Desktop RIAs with  PHP, HTML & Javascript  in AIR
Building Desktop RIAs with PHP, HTML & Javascript in AIR
 
Instruction to build Apache CloudStack docs with Sphinx
Instruction to build Apache CloudStack docs with SphinxInstruction to build Apache CloudStack docs with Sphinx
Instruction to build Apache CloudStack docs with Sphinx
 
introduction to js
introduction to jsintroduction to js
introduction to js
 

Destaque

Umbraco 5th Birthday from SAS Design
Umbraco 5th Birthday from SAS DesignUmbraco 5th Birthday from SAS Design
Umbraco 5th Birthday from SAS DesignWarren Buckley
 
Umbraco - .NET-owy scyzoryk w świecie CMS-ów
Umbraco - .NET-owy scyzoryk w świecie CMS-ówUmbraco - .NET-owy scyzoryk w świecie CMS-ów
Umbraco - .NET-owy scyzoryk w świecie CMS-ówMarcin Zajkowski
 
McrUmbMeetup 22 May 14: Umbraco and Amazon
McrUmbMeetup 22 May 14: Umbraco and AmazonMcrUmbMeetup 22 May 14: Umbraco and Amazon
McrUmbMeetup 22 May 14: Umbraco and AmazonDan Lister
 
DotNed Umbraco Presentation
DotNed Umbraco PresentationDotNed Umbraco Presentation
DotNed Umbraco PresentationRoel
 
Introduction To Umbraco
Introduction To UmbracoIntroduction To Umbraco
Introduction To UmbracoKen Cenerelli
 

Destaque (7)

Selling Umbraco - CodeGarden 2015
Selling Umbraco - CodeGarden 2015Selling Umbraco - CodeGarden 2015
Selling Umbraco - CodeGarden 2015
 
Selling umbraco
Selling umbracoSelling umbraco
Selling umbraco
 
Umbraco 5th Birthday from SAS Design
Umbraco 5th Birthday from SAS DesignUmbraco 5th Birthday from SAS Design
Umbraco 5th Birthday from SAS Design
 
Umbraco - .NET-owy scyzoryk w świecie CMS-ów
Umbraco - .NET-owy scyzoryk w świecie CMS-ówUmbraco - .NET-owy scyzoryk w świecie CMS-ów
Umbraco - .NET-owy scyzoryk w świecie CMS-ów
 
McrUmbMeetup 22 May 14: Umbraco and Amazon
McrUmbMeetup 22 May 14: Umbraco and AmazonMcrUmbMeetup 22 May 14: Umbraco and Amazon
McrUmbMeetup 22 May 14: Umbraco and Amazon
 
DotNed Umbraco Presentation
DotNed Umbraco PresentationDotNed Umbraco Presentation
DotNed Umbraco Presentation
 
Introduction To Umbraco
Introduction To UmbracoIntroduction To Umbraco
Introduction To Umbraco
 

Semelhante a Pushing Umbraco Performance Limits

Warsaw MuleSoft Meetup - Runtime Fabric
Warsaw MuleSoft Meetup - Runtime FabricWarsaw MuleSoft Meetup - Runtime Fabric
Warsaw MuleSoft Meetup - Runtime FabricPatryk Bandurski
 
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit EuropeAutomation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit EuropeAppDynamics
 
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The UglyDevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The UglyDevOpsGroup
 
Continuous Deployment of your Application @jSession#5
Continuous Deployment of your Application @jSession#5Continuous Deployment of your Application @jSession#5
Continuous Deployment of your Application @jSession#5Marcin Grzejszczak
 
Netflix oss season 2 episode 1 - meetup Lightning talks
Netflix oss   season 2 episode 1 - meetup Lightning talksNetflix oss   season 2 episode 1 - meetup Lightning talks
Netflix oss season 2 episode 1 - meetup Lightning talksRuslan Meshenberg
 
Cognos Performance Tuning Tips & Tricks
Cognos Performance Tuning Tips & TricksCognos Performance Tuning Tips & Tricks
Cognos Performance Tuning Tips & TricksSenturus
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Dynamic infrastructure for development
Dynamic infrastructure for developmentDynamic infrastructure for development
Dynamic infrastructure for developmentBalázs Rostás
 
Microservices development at scale
Microservices development at scaleMicroservices development at scale
Microservices development at scaleVishal Banthia
 
Leveraging docker for hadoop build automation and big data stack provisioning
Leveraging docker for hadoop build automation and big data stack provisioningLeveraging docker for hadoop build automation and big data stack provisioning
Leveraging docker for hadoop build automation and big data stack provisioningEvans Ye
 
Leveraging Docker for Hadoop build automation and Big Data stack provisioning
Leveraging Docker for Hadoop build automation and Big Data stack provisioningLeveraging Docker for Hadoop build automation and Big Data stack provisioning
Leveraging Docker for Hadoop build automation and Big Data stack provisioningDataWorks Summit
 
Gearman - Northeast PHP 2012
Gearman - Northeast PHP 2012Gearman - Northeast PHP 2012
Gearman - Northeast PHP 2012Mike Willbanks
 
How we scale up our architecture and organization at Dailymotion
How we scale up our architecture and organization at DailymotionHow we scale up our architecture and organization at Dailymotion
How we scale up our architecture and organization at DailymotionStanislas Chollet
 
Meetup Openshift Geneva 03/10
Meetup Openshift Geneva 03/10Meetup Openshift Geneva 03/10
Meetup Openshift Geneva 03/10MagaliDavidCruz
 

Semelhante a Pushing Umbraco Performance Limits (20)

Code One 2018 maven
Code One 2018   mavenCode One 2018   maven
Code One 2018 maven
 
Warsaw MuleSoft Meetup - Runtime Fabric
Warsaw MuleSoft Meetup - Runtime FabricWarsaw MuleSoft Meetup - Runtime Fabric
Warsaw MuleSoft Meetup - Runtime Fabric
 
Gitlab ci-cd
Gitlab ci-cdGitlab ci-cd
Gitlab ci-cd
 
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit EuropeAutomation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
 
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The UglyDevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
 
Continuous Deployment of your Application @jSession#5
Continuous Deployment of your Application @jSession#5Continuous Deployment of your Application @jSession#5
Continuous Deployment of your Application @jSession#5
 
Netflix oss season 2 episode 1 - meetup Lightning talks
Netflix oss   season 2 episode 1 - meetup Lightning talksNetflix oss   season 2 episode 1 - meetup Lightning talks
Netflix oss season 2 episode 1 - meetup Lightning talks
 
Cognos Performance Tuning Tips & Tricks
Cognos Performance Tuning Tips & TricksCognos Performance Tuning Tips & Tricks
Cognos Performance Tuning Tips & Tricks
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
HPC on OpenStack
HPC on OpenStackHPC on OpenStack
HPC on OpenStack
 
Dynamic infrastructure for development
Dynamic infrastructure for developmentDynamic infrastructure for development
Dynamic infrastructure for development
 
Microservices development at scale
Microservices development at scaleMicroservices development at scale
Microservices development at scale
 
Stackato v6
Stackato v6Stackato v6
Stackato v6
 
Stackato v5
Stackato v5Stackato v5
Stackato v5
 
Leveraging docker for hadoop build automation and big data stack provisioning
Leveraging docker for hadoop build automation and big data stack provisioningLeveraging docker for hadoop build automation and big data stack provisioning
Leveraging docker for hadoop build automation and big data stack provisioning
 
Leveraging Docker for Hadoop build automation and Big Data stack provisioning
Leveraging Docker for Hadoop build automation and Big Data stack provisioningLeveraging Docker for Hadoop build automation and Big Data stack provisioning
Leveraging Docker for Hadoop build automation and Big Data stack provisioning
 
Gearman - Northeast PHP 2012
Gearman - Northeast PHP 2012Gearman - Northeast PHP 2012
Gearman - Northeast PHP 2012
 
How we scale up our architecture and organization at Dailymotion
How we scale up our architecture and organization at DailymotionHow we scale up our architecture and organization at Dailymotion
How we scale up our architecture and organization at Dailymotion
 
Meetup Openshift Geneva 03/10
Meetup Openshift Geneva 03/10Meetup Openshift Geneva 03/10
Meetup Openshift Geneva 03/10
 

Último

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 

Último (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

Pushing Umbraco Performance Limits

Notas do Editor

  1. Community editors used are Nested Content, Vorto, nuPickers and RJP Multi Url picker Thank Hendy, Lee and Matt for their great packages. Other tools include uSync, Diplo trace log viewer, CMSImport, Bulkmanager, Load balancing dashboard, Zbu Models Builder, Core Value Convertors One custom build property editor for managing “short” urls => is a candidate to be open sourced
  2. Started on Umbraco 7.3 beta so we could use the new flexible loadbalancing We have already a big amount of content that keeps growing Cache instructions are stored in the database so the new load balancing knows what to updated on all the servers. More on that later
  3. First I deleted it on dev environment. After that I opened the qa environment to use that version to recreate it. Than I also deleted it on the qa environment. A lot of test content was lost because of that. Luckily we had uSync in place so it was easy to import the document type again.
  4. Flexible load balancing works on the database instead of configuration in umbracosettings.config When a Umbraco application starts up it registers itself in the table umbracoServer. When changes are made cache instructions are written to table umbracoCacheInstruction. Each server keeps track of executed cache instructions in App_Data/Temp/DistCache. If behind it will catch up. Check happens at start of request to application Created load balancing dashboard for easy info on registered servers Config tweaks needed for storing umbraco.config and examine indexes in temp storage of web app instance
  5. When you have your own caches like output cache and you are running in a loadbalanced environment it’s important you hook in to the correct event. Most people hook in to Published Event to do this, but published event is only executed on the server where it’s triggered. In our case the VM with editors environment. You will need to hook in to cache Updated event of the different cache refreshers like PageCacheRefresher, MediaCacheRefresher, DictionairyCacheRefresher These will get executed after the cacheInstructions (from DB) have been processed.
  6. In the new heroes project a lot of data in custom datatables is managed through the umbraco backend in a custom section. The data is not changed frequently so we can cache it for a long time and don’t want it cleared by publishing actions. You can create your own cache refresher. By inheriting one of the base classes in the core. When your data is changed you tell the distribute cache to execute a action on all servers. Additionally you can hook in to a cache updated event after cache has been updated
  7. The node name isn’t used for the URL. We have a Vorto textstring which can change the URL per language. The node name is a code which the content editor uses. Vorto converts a property editor into a multilingual property by allowing you to enter multiple values per language. Nested Content can create a single or repeatable fieldset based on a document type. ModelsBuilder is a tool to generate strongly-typed published content models. It’s in the core since Umbraco 7.4.
  8. This is the end result on New Heroes. I’ll know quickly explain how we’ve done this with a simple example.
  9. 1 Create a document type with these properties.
  10. 2 Create a Nested Content data type with this document type and set min and max to 1.
  11. 3. Create a Vorto data type which has the Nested Content document type.
  12. 4. Put this Vorto data type on the News Items document type.
  13. Are you still following me? 6. It looks the same as the New Heroes result. Again. You can all read this in the blog article too.
  14. Code from the 1-1 multilingual example The Nested Content fieldset will return an IPublishedContent. Because it’s in Vorto we can get a translated IPublishedContent which will have all the properties in the correct language. Render the IPublishedContent properties.
  15. We still get the translated IPublishedContent from Vorto. The ModelsBuilder generated a model for the document type which we used for the Nested Content. The IPublishedContent can be passed to this model to get the strongly-typed model. Rendering the properties is easier now.
  16. A simple UrlProvider example. Not used in New Heroes. A single node used for 1-1 multilingual can get different URLs per language like this. Extremely powerful! Used for all nodes that are 1-1 multilingual with Vorto.
  17. If the URL of a node is changed with a UrlProvider it will give a 404 if you visit that URL. The ContentFinder can match the URL to a content node and return that. rootNodes.DescendantsOrSelf is bad for performance. You should get the nodes you need first. Not important for this example.
  18. We need to store progress of learning journeys and learning element and other user related data Discussion was to use EF, but decided to use PetaPoco because this is used by Umbraco and keeps down external plugins
  19. Decorate your class with table name and primary key attribute Decorate your properties with attributes
  20. Crud methods are done using strongly typed objects..no SQL query needed, but you can do it if you need more control over the query Linq way of writing where clauses
  21. Because we have build server set up for CI we don’t want to update our db schema by running scripts on the database every time we deploy. The maintenance of the db should be handled by the application
  22. First attempt was by using the database schema helper to create tables base on our POCO
  23. This works fine if you only want to create or drop tables. But there is no way to alter tables, add constraints, indexes or other db objects like stored procedures or views. So a better alternative was needed
  24. Had a look at the Umbraco source on how they handle the upgrades..and discovered the migration framework It has been in Umbraco since version 6.0.0 Since 7.3.0 exuted migrations are stored in db with an application name. Benefit is that DB upgrade is run when db is behind on Umbraco version. Also can be used for other migrations than Umbraco because of the application name Migrations are the way to go if you application or package needs custom database tables
  25. First you need to create a class that inherits from MigrationBase. You will need to override 2 methods Up and Down You need to decorate the class with the Migration Attribute so it’s picked up by Umbraco In the attribute you specify the version number of the migration, the execution order of the file (version can have multiple files), and the application name that the migration is for. Additionally you can specify a minimum version that needs to be run before this can be run. E.g umbraco runs some migrations only if your current version is for example 7.3.0
  26. Some examples of the migrations syntax Creating a table Adding a column Executing a sql statement Many more options available like dropping a table, creating constraints and indexes, inserting/updating/deleting records. There is even a option to execute code, but never tried it
  27. We run database migrations on startup of the web app. The code checks for the latest migration version in the table “umbracoMigration” We set new target version and check if it needs to be executed
  28. Dave: After we have determined if we need to execute migrations we create a new migrationrunner And execute it against the database Jeroen: We’re probably one of the first that used the migrations for our own custom tables, because we did run into some issues. We had a migration called 7.3.4 and no matter what we did it was never executed. After doing a deep investigation we found out that the product name wasn’t checked and since Umbraco itself was already upgraded to 7.3.4 it thought it had already run. It was very coincidence to run into something like this and it can drive you pretty crazy ;-). Luckily Dave created a PR and now it’s fixed in 7.3.7 (http://issues.umbraco.org/issue/U4-7872).
  29. To find performance issues you can log the execution time of your methods to the log. There are 2 options that will log differently. This information is also visible in the miniprofiler
  30. With Miniprofiler you get a clear overview of how long a page takes.
  31. We even found out that after a Save and Publish Umbraco did a query for each dictionary item so we build are own cache layer around it.
  32. All index methods use the DonutOutputCache attribute for better performance. LongPageCache is default. Order so other attributes execute first. For example to check credentials. We don’t do a lot of logic in the index method. With TraceDuration we can see how long all logic in the index method takes place. These are also all the html actions on the view.
  33. In the view we do a lot of Html.Action. This way the code is better separated and easier to reuse. We can also exclude a part and let the child action have a donut cache with another time.
  34. We used this code a lot in the UrlHelper to get the nodes of a specific doctype and return those URLs. This was first done with Umbraco.TypedContentAtRoot().DescendantsOrSelf("alias") which was very slow. Could also be used in the ContentFinder to return all nodes of a document type. For example all nodes of the Newsitem document type.
  35. We’ve had some Examine corruption issues so instead you can also get the ids by querying the database.
  36. The pluginmanager is a usefull tool when you need to find certain classes in your application
  37. Object resolvers provide some kind of “Inversion of Control”. At start up you initialize the resolver with the needed types (from plugin manager). After the application has started you can the you use your resolver to get the types. Some more example in the core are ContentFinderResolver, PropertyValueConvertersResolver If you wish to create a package that is extendable to third parties the plugin manager and object resolver are your friends
  38. First step would to create a extension method on the plugin manager to find a certain type
  39. The next step is to create a resolver for your type. In this example we created a resolver that return multiple objects
  40. Then the final thing is to set up your resolver during the startup of umbraco in the ApplicationInitialized event
  41. Now you can use in your application and you can use the object resolver to find your types. So we created some kind of inversion of control without a IOC container framework like Autofac
  42. Now everyone is on 7.4, but I remember the 4.7 days. It would have been impossible to build this. Umbraco and the core functionalities are awesome! We’ve learned a lot from the 24 days blog posts.