SlideShare a Scribd company logo
1 of 22
The Alfresco fat JAR
experiment
Axel Faust
@ReluctantBird83
Learn. Connect. Collaborate.
Fat JAR
Executable Repo JAR
Content Services
ROOT / _vti_bin
Share Services
Addons
Office Services
Learn. Connect. Collaborate.
Fat JAR
Executable Repo JAR
Content Services
ROOT / _vti_bin
Share Services
Addons
Office Services
Share Addons
Executable Share JAR
Learn. Connect. Collaborate.
Fat JAR – But why?
A universal, polyglot VM
Module: Substrate VM
Ahead-of-Time (AOT) compilation
Compilation
Learn. Connect. Collaborate.
Fat JAR – But why? Seriously, why?!?
+
146 MiB 12 MiB 202 MiB
ACS CE 6.1.1
60s – 3m (YMMV)
Learn. Connect. Collaborate.
Fat JAR – But why? Seriously, why?!?
+
146 MiB 12 MiB 202 MiB
ACS CE 6.1.1
60s – 3m (YMMV)
Compilation
?? < 180 MiB
?? < 10s
<Immutable>
Learn. Connect. Collaborate.
Step 1: Deal with Maven mess
Alfresco != good at Maven
• 5.2.f: antlr 2.7.7 + 3.5.2
• Distribution BOM is dead
Task #1: Create BOM from GA WAR
Task #2: Find + eliminate duplicates
Learn. Connect. Collaborate.
Step 1: Deal with Maven mess
Task #1: Create BOM from GA WAR
• Tool: artifact-lookup-maven-plugin
• Output: <dependencies> block
mvn com.codspire.plugins:artifact-lookup-maven-plugin:lookup
Results
• 291 <dependency>
• 1 failure (slf4j-api)
• +2 failures w/ proprietary AOS
Learn. Connect. Collaborate.
Step 1: Deal with Maven mess
Task #2: Find + eliminate duplicates
• Tool: maven-shade-plugin
• Reveals conflicts – filters for cleanup
• Bonus: “simple” fat JAR for next steps
Learn. Connect. Collaborate.
Step 1: Deal with Maven mess
Task #2: Find + eliminate duplicates
• Tool: maven-shade-plugin
• Reveals conflicts – filters for cleanup
• Bonus: “simple” fat JAR for next steps
Results
• 11 JAR + 372 class conflicts
• 1 redundant JAR
• Share: 38 class conflicts
• ALF-22021 – 22029, ALF-22053
Learn. Connect. Collaborate.
Step 2: Jetty launcher
Task #3: Integrate / merge webapps
• Tool: maven-dependency-plugin:unpack
• Filter unwanted WEB-INF content
• Target: /webapps/<name>/
Learn. Connect. Collaborate.
Step 2: Jetty launcher
Task #3: Integrate / merge webapps
• Tool: maven-dependency-plugin:unpack
• Filter unwanted WEB-INF content
• Target: /webapps/<name>/
Challenge: unpack “simple” fat JAR
• ACS: ~89k files = ~12 min
• Shade unsuitable: path relocation => rewrite
Learn. Connect. Collaborate.
Step 2: Jetty launcher
Task #4: Integrate / start Jetty
• Shade in Jetty JARs
• Simple CLI main class (init + config)
• Custom classloader per webapp
Learn. Connect. Collaborate.
Step 2: Jetty launcher
Task #4: Integrate / start Jetty
• Shade in Jetty JARs
• Simple CLI main class (init + config)
• Custom classloader per webapp
Challenge: initial ACS startup ~10 min
• TLD + annotation scan (~89k files)
• Custom JAR listing => 56 sec
Learn. Connect. Collaborate.
Step 3: Install addons
Task #5: Unpack JAR / AMP
• Target 1: /webapps/alfresco/…
• Target 2: /webapps/share/...
Challenge: AMP-nested JARs
1) Filter + separate resolution/shade
2) Unzip via antrun
Learn. Connect. Collaborate.
Step 3: Install addons
Task #6: Unpack AOS WAR + AMP
• Target 1: /webapps/_vti_bin/…
• Target 2: /webapps/alfresco/...
Challenge: JARs unavailable via Maven
●
Unzip bundled JARs via antrun
Learn. Connect. Collaborate.
Step 4: Fix bugs / issues
Task #7: Fix resource loading
• Incorrect classpath: handling (web scripts)
• Incorrect webapp: handling (URL config source)
• JVM / Jetty JAR handling (open/close)
Learn. Connect. Collaborate.
Review: Current state
https://github.com/AFaust/simple-alfresco-executables
Working executable JARs
• ACS 179 MiB, Share: 84 MiB
• “Typical” startup time
Effort ~5 person days
Learn. Connect. Collaborate.
Outlook: Optimisations
Pre-built TLD / annotation inventory
• Avoid JAR listing
• Potential: ACS ~50-60 sec, Share ~15 sec
Maven: build without unpack
• Shade in sub-path + AMP support
• Potential: ~15-20 min
Learn. Connect. Collaborate.
Outlook: Substrate VM / AOT
Investigation
• Rhino JS pre-compilation
• AOP proxy pre-generation
• Built-time AspectJ binary weaving
Test new GraalVM release candidates
Learn. Connect. Collaborate.
Outlook: Substrate VM / AOT
Task #8: Build time inventory
Task #9: Generate AOT helper
• Code substitution
• Feature config (reflection etc.)
Task #10: Build, test, adapt, repeat...
The Alfresco fat JAR
experiment
Thank you!

More Related Content

What's hot

Apache Jackrabbit Oak on MongoDB
Apache Jackrabbit Oak on MongoDBApache Jackrabbit Oak on MongoDB
Apache Jackrabbit Oak on MongoDBMongoDB
 
CIRCUIT 2015 - AEM Infrastructure Automation with Chef Cookbooks
CIRCUIT 2015 - AEM Infrastructure Automation with Chef CookbooksCIRCUIT 2015 - AEM Infrastructure Automation with Chef Cookbooks
CIRCUIT 2015 - AEM Infrastructure Automation with Chef CookbooksICF CIRCUIT
 
Bulk Export Tool for Alfresco
Bulk Export Tool for AlfrescoBulk Export Tool for Alfresco
Bulk Export Tool for AlfrescoRichard McKnight
 
Mitchell Hashimoto, HashiCorp
Mitchell Hashimoto, HashiCorpMitchell Hashimoto, HashiCorp
Mitchell Hashimoto, HashiCorpOntico
 
Alfresco search services: Now and Then
Alfresco search services: Now and ThenAlfresco search services: Now and Then
Alfresco search services: Now and ThenAngel Borroy López
 
An Introduction into Bosh | anynines
An Introduction into Bosh | anynines An Introduction into Bosh | anynines
An Introduction into Bosh | anynines anynines GmbH
 
Automated Deployments with Ansible
Automated Deployments with AnsibleAutomated Deployments with Ansible
Automated Deployments with AnsibleMartin Etmajer
 
Scaling Development Environments with Docker
Scaling Development Environments with DockerScaling Development Environments with Docker
Scaling Development Environments with DockerDocker, Inc.
 
Docker at Shopify: From This-Looks-Fun to Production by Simon Eskildsen (Shop...
Docker at Shopify: From This-Looks-Fun to Production by Simon Eskildsen (Shop...Docker at Shopify: From This-Looks-Fun to Production by Simon Eskildsen (Shop...
Docker at Shopify: From This-Looks-Fun to Production by Simon Eskildsen (Shop...Docker, Inc.
 
Scaling Your App With Docker Swarm using Terraform, Packer on Openstack
Scaling Your App With Docker Swarm using Terraform, Packer on OpenstackScaling Your App With Docker Swarm using Terraform, Packer on Openstack
Scaling Your App With Docker Swarm using Terraform, Packer on OpenstackBobby DeVeaux, DevOps Consultant
 
Handling 10k requests per second with Symfony and Varnish - SymfonyCon Berlin...
Handling 10k requests per second with Symfony and Varnish - SymfonyCon Berlin...Handling 10k requests per second with Symfony and Varnish - SymfonyCon Berlin...
Handling 10k requests per second with Symfony and Varnish - SymfonyCon Berlin...Alexander Lisachenko
 
All the troubles you get into when setting up a production ready Kubernetes c...
All the troubles you get into when setting up a production ready Kubernetes c...All the troubles you get into when setting up a production ready Kubernetes c...
All the troubles you get into when setting up a production ready Kubernetes c...Jimmy Lu
 
Clocker - The Docker Cloud Maker
Clocker - The Docker Cloud MakerClocker - The Docker Cloud Maker
Clocker - The Docker Cloud MakerAndrew Kennedy
 
(Re)Indexing Large Repositories in Alfresco
(Re)Indexing Large Repositories in Alfresco(Re)Indexing Large Repositories in Alfresco
(Re)Indexing Large Repositories in AlfrescoAngel Borroy López
 
Play Framework: Intro & High-Level Overview
Play Framework: Intro & High-Level OverviewPlay Framework: Intro & High-Level Overview
Play Framework: Intro & High-Level OverviewJosh Padnick
 
Deploy, Scale and Manage your Application with AWS Elastic Beanstalk
Deploy, Scale and Manage your Application with AWS Elastic BeanstalkDeploy, Scale and Manage your Application with AWS Elastic Beanstalk
Deploy, Scale and Manage your Application with AWS Elastic BeanstalkAmazon Web Services
 
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...Edureka!
 
Chef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of ChefChef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of ChefChef Software, Inc.
 

What's hot (20)

Hacking on WildFly 9
Hacking on WildFly 9Hacking on WildFly 9
Hacking on WildFly 9
 
Apache Jackrabbit Oak on MongoDB
Apache Jackrabbit Oak on MongoDBApache Jackrabbit Oak on MongoDB
Apache Jackrabbit Oak on MongoDB
 
CIRCUIT 2015 - AEM Infrastructure Automation with Chef Cookbooks
CIRCUIT 2015 - AEM Infrastructure Automation with Chef CookbooksCIRCUIT 2015 - AEM Infrastructure Automation with Chef Cookbooks
CIRCUIT 2015 - AEM Infrastructure Automation with Chef Cookbooks
 
Bulk Export Tool for Alfresco
Bulk Export Tool for AlfrescoBulk Export Tool for Alfresco
Bulk Export Tool for Alfresco
 
Mitchell Hashimoto, HashiCorp
Mitchell Hashimoto, HashiCorpMitchell Hashimoto, HashiCorp
Mitchell Hashimoto, HashiCorp
 
Alfresco search services: Now and Then
Alfresco search services: Now and ThenAlfresco search services: Now and Then
Alfresco search services: Now and Then
 
An Introduction into Bosh | anynines
An Introduction into Bosh | anynines An Introduction into Bosh | anynines
An Introduction into Bosh | anynines
 
Automated Deployments with Ansible
Automated Deployments with AnsibleAutomated Deployments with Ansible
Automated Deployments with Ansible
 
Scaling Development Environments with Docker
Scaling Development Environments with DockerScaling Development Environments with Docker
Scaling Development Environments with Docker
 
Docker at Shopify: From This-Looks-Fun to Production by Simon Eskildsen (Shop...
Docker at Shopify: From This-Looks-Fun to Production by Simon Eskildsen (Shop...Docker at Shopify: From This-Looks-Fun to Production by Simon Eskildsen (Shop...
Docker at Shopify: From This-Looks-Fun to Production by Simon Eskildsen (Shop...
 
Scaling Your App With Docker Swarm using Terraform, Packer on Openstack
Scaling Your App With Docker Swarm using Terraform, Packer on OpenstackScaling Your App With Docker Swarm using Terraform, Packer on Openstack
Scaling Your App With Docker Swarm using Terraform, Packer on Openstack
 
Handling 10k requests per second with Symfony and Varnish - SymfonyCon Berlin...
Handling 10k requests per second with Symfony and Varnish - SymfonyCon Berlin...Handling 10k requests per second with Symfony and Varnish - SymfonyCon Berlin...
Handling 10k requests per second with Symfony and Varnish - SymfonyCon Berlin...
 
All the troubles you get into when setting up a production ready Kubernetes c...
All the troubles you get into when setting up a production ready Kubernetes c...All the troubles you get into when setting up a production ready Kubernetes c...
All the troubles you get into when setting up a production ready Kubernetes c...
 
Clocker - The Docker Cloud Maker
Clocker - The Docker Cloud MakerClocker - The Docker Cloud Maker
Clocker - The Docker Cloud Maker
 
(Re)Indexing Large Repositories in Alfresco
(Re)Indexing Large Repositories in Alfresco(Re)Indexing Large Repositories in Alfresco
(Re)Indexing Large Repositories in Alfresco
 
Play Framework: Intro & High-Level Overview
Play Framework: Intro & High-Level OverviewPlay Framework: Intro & High-Level Overview
Play Framework: Intro & High-Level Overview
 
Deploy, Scale and Manage your Application with AWS Elastic Beanstalk
Deploy, Scale and Manage your Application with AWS Elastic BeanstalkDeploy, Scale and Manage your Application with AWS Elastic Beanstalk
Deploy, Scale and Manage your Application with AWS Elastic Beanstalk
 
TIAD 2016 : Using and abusing container metadata
TIAD 2016 : Using and abusing container metadataTIAD 2016 : Using and abusing container metadata
TIAD 2016 : Using and abusing container metadata
 
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
 
Chef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of ChefChef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of Chef
 

Similar to Alfresco Devcon 2019 - Lightning Talk - The Alfresco fat JAR experiment

DevOps(4) : Ansible(2) - (MOSG)
DevOps(4) : Ansible(2) - (MOSG)DevOps(4) : Ansible(2) - (MOSG)
DevOps(4) : Ansible(2) - (MOSG)Soshi Nemoto
 
Migrating to a bazel based CI system: 6 learnings
Migrating to a bazel based CI system: 6 learnings Migrating to a bazel based CI system: 6 learnings
Migrating to a bazel based CI system: 6 learnings Or Shachar
 
Migrating to a Bazel-based CI System: 6 Learnings - Or Shachar
Migrating to a Bazel-based CI System: 6 Learnings - Or ShacharMigrating to a Bazel-based CI System: 6 Learnings - Or Shachar
Migrating to a Bazel-based CI System: 6 Learnings - Or ShacharWix Engineering
 
HTTP cache @ PUG Rome 03-29-2011
HTTP cache @ PUG Rome 03-29-2011HTTP cache @ PUG Rome 03-29-2011
HTTP cache @ PUG Rome 03-29-2011Alessandro Nadalin
 
So. many. vulnerabilities. Why are containers such a mess and what to do abou...
So. many. vulnerabilities. Why are containers such a mess and what to do abou...So. many. vulnerabilities. Why are containers such a mess and what to do abou...
So. many. vulnerabilities. Why are containers such a mess and what to do abou...Eric Smalling
 
Getting Git Right
Getting Git RightGetting Git Right
Getting Git RightSven Peters
 
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry PiGrâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry PiJérémy Derussé
 
Breaking bad habits with GitLab CI
Breaking bad habits with GitLab CIBreaking bad habits with GitLab CI
Breaking bad habits with GitLab CIIvan Nemytchenko
 
Cloud meets Fog & Puppet A Story of Version Controlled Infrastructure
Cloud meets Fog & Puppet A Story of Version Controlled InfrastructureCloud meets Fog & Puppet A Story of Version Controlled Infrastructure
Cloud meets Fog & Puppet A Story of Version Controlled InfrastructureHabeeb Rahman
 
Slides Aquarium Paris 2008
Slides Aquarium Paris 2008Slides Aquarium Paris 2008
Slides Aquarium Paris 2008julien.ponge
 
Deploying JRuby Web Applications
Deploying JRuby Web ApplicationsDeploying JRuby Web Applications
Deploying JRuby Web ApplicationsJoe Kutner
 
A Post-Apocalyptic sun.misc.Unsafe World by Christoph engelbert
A Post-Apocalyptic sun.misc.Unsafe World by Christoph engelbertA Post-Apocalyptic sun.misc.Unsafe World by Christoph engelbert
A Post-Apocalyptic sun.misc.Unsafe World by Christoph engelbertJ On The Beach
 
Fisl - Deployment
Fisl - DeploymentFisl - Deployment
Fisl - DeploymentFabio Akita
 
Automated Java Deployments With Rpm
Automated Java Deployments With RpmAutomated Java Deployments With Rpm
Automated Java Deployments With RpmMartin Jackson
 
Ruby and Rails Packaging to Production
Ruby and Rails Packaging to ProductionRuby and Rails Packaging to Production
Ruby and Rails Packaging to ProductionFabio Kung
 

Similar to Alfresco Devcon 2019 - Lightning Talk - The Alfresco fat JAR experiment (20)

Introduction to Kalabox
Introduction to KalaboxIntroduction to Kalabox
Introduction to Kalabox
 
DevOps(4) : Ansible(2) - (MOSG)
DevOps(4) : Ansible(2) - (MOSG)DevOps(4) : Ansible(2) - (MOSG)
DevOps(4) : Ansible(2) - (MOSG)
 
Migrating to a bazel based CI system: 6 learnings
Migrating to a bazel based CI system: 6 learnings Migrating to a bazel based CI system: 6 learnings
Migrating to a bazel based CI system: 6 learnings
 
Migrating to a Bazel-based CI System: 6 Learnings - Or Shachar
Migrating to a Bazel-based CI System: 6 Learnings - Or ShacharMigrating to a Bazel-based CI System: 6 Learnings - Or Shachar
Migrating to a Bazel-based CI System: 6 Learnings - Or Shachar
 
HTTP cache @ PUG Rome 03-29-2011
HTTP cache @ PUG Rome 03-29-2011HTTP cache @ PUG Rome 03-29-2011
HTTP cache @ PUG Rome 03-29-2011
 
F3X12 FLOW3 Project Lifecycle
F3X12 FLOW3 Project LifecycleF3X12 FLOW3 Project Lifecycle
F3X12 FLOW3 Project Lifecycle
 
So. many. vulnerabilities. Why are containers such a mess and what to do abou...
So. many. vulnerabilities. Why are containers such a mess and what to do abou...So. many. vulnerabilities. Why are containers such a mess and what to do abou...
So. many. vulnerabilities. Why are containers such a mess and what to do abou...
 
Getting Git Right
Getting Git RightGetting Git Right
Getting Git Right
 
Capistrano
CapistranoCapistrano
Capistrano
 
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry PiGrâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
 
Breaking bad habits with GitLab CI
Breaking bad habits with GitLab CIBreaking bad habits with GitLab CI
Breaking bad habits with GitLab CI
 
Cloud meets Fog & Puppet A Story of Version Controlled Infrastructure
Cloud meets Fog & Puppet A Story of Version Controlled InfrastructureCloud meets Fog & Puppet A Story of Version Controlled Infrastructure
Cloud meets Fog & Puppet A Story of Version Controlled Infrastructure
 
Slides Aquarium Paris 2008
Slides Aquarium Paris 2008Slides Aquarium Paris 2008
Slides Aquarium Paris 2008
 
Deploying JRuby Web Applications
Deploying JRuby Web ApplicationsDeploying JRuby Web Applications
Deploying JRuby Web Applications
 
A Post-Apocalyptic sun.misc.Unsafe World by Christoph engelbert
A Post-Apocalyptic sun.misc.Unsafe World by Christoph engelbertA Post-Apocalyptic sun.misc.Unsafe World by Christoph engelbert
A Post-Apocalyptic sun.misc.Unsafe World by Christoph engelbert
 
Gradle como alternativa a maven
Gradle como alternativa a mavenGradle como alternativa a maven
Gradle como alternativa a maven
 
Fisl - Deployment
Fisl - DeploymentFisl - Deployment
Fisl - Deployment
 
Automated Java Deployments With Rpm
Automated Java Deployments With RpmAutomated Java Deployments With Rpm
Automated Java Deployments With Rpm
 
Ruby and Rails Packaging to Production
Ruby and Rails Packaging to ProductionRuby and Rails Packaging to Production
Ruby and Rails Packaging to Production
 
Using Maven2
Using Maven2Using Maven2
Using Maven2
 

Recently uploaded

Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 

Recently uploaded (20)

Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 

Alfresco Devcon 2019 - Lightning Talk - The Alfresco fat JAR experiment

  • 1. The Alfresco fat JAR experiment Axel Faust @ReluctantBird83
  • 2. Learn. Connect. Collaborate. Fat JAR Executable Repo JAR Content Services ROOT / _vti_bin Share Services Addons Office Services
  • 3. Learn. Connect. Collaborate. Fat JAR Executable Repo JAR Content Services ROOT / _vti_bin Share Services Addons Office Services Share Addons Executable Share JAR
  • 4. Learn. Connect. Collaborate. Fat JAR – But why? A universal, polyglot VM Module: Substrate VM Ahead-of-Time (AOT) compilation Compilation
  • 5. Learn. Connect. Collaborate. Fat JAR – But why? Seriously, why?!? + 146 MiB 12 MiB 202 MiB ACS CE 6.1.1 60s – 3m (YMMV)
  • 6. Learn. Connect. Collaborate. Fat JAR – But why? Seriously, why?!? + 146 MiB 12 MiB 202 MiB ACS CE 6.1.1 60s – 3m (YMMV) Compilation ?? < 180 MiB ?? < 10s <Immutable>
  • 7. Learn. Connect. Collaborate. Step 1: Deal with Maven mess Alfresco != good at Maven • 5.2.f: antlr 2.7.7 + 3.5.2 • Distribution BOM is dead Task #1: Create BOM from GA WAR Task #2: Find + eliminate duplicates
  • 8. Learn. Connect. Collaborate. Step 1: Deal with Maven mess Task #1: Create BOM from GA WAR • Tool: artifact-lookup-maven-plugin • Output: <dependencies> block mvn com.codspire.plugins:artifact-lookup-maven-plugin:lookup Results • 291 <dependency> • 1 failure (slf4j-api) • +2 failures w/ proprietary AOS
  • 9. Learn. Connect. Collaborate. Step 1: Deal with Maven mess Task #2: Find + eliminate duplicates • Tool: maven-shade-plugin • Reveals conflicts – filters for cleanup • Bonus: “simple” fat JAR for next steps
  • 10. Learn. Connect. Collaborate. Step 1: Deal with Maven mess Task #2: Find + eliminate duplicates • Tool: maven-shade-plugin • Reveals conflicts – filters for cleanup • Bonus: “simple” fat JAR for next steps Results • 11 JAR + 372 class conflicts • 1 redundant JAR • Share: 38 class conflicts • ALF-22021 – 22029, ALF-22053
  • 11. Learn. Connect. Collaborate. Step 2: Jetty launcher Task #3: Integrate / merge webapps • Tool: maven-dependency-plugin:unpack • Filter unwanted WEB-INF content • Target: /webapps/<name>/
  • 12. Learn. Connect. Collaborate. Step 2: Jetty launcher Task #3: Integrate / merge webapps • Tool: maven-dependency-plugin:unpack • Filter unwanted WEB-INF content • Target: /webapps/<name>/ Challenge: unpack “simple” fat JAR • ACS: ~89k files = ~12 min • Shade unsuitable: path relocation => rewrite
  • 13. Learn. Connect. Collaborate. Step 2: Jetty launcher Task #4: Integrate / start Jetty • Shade in Jetty JARs • Simple CLI main class (init + config) • Custom classloader per webapp
  • 14. Learn. Connect. Collaborate. Step 2: Jetty launcher Task #4: Integrate / start Jetty • Shade in Jetty JARs • Simple CLI main class (init + config) • Custom classloader per webapp Challenge: initial ACS startup ~10 min • TLD + annotation scan (~89k files) • Custom JAR listing => 56 sec
  • 15. Learn. Connect. Collaborate. Step 3: Install addons Task #5: Unpack JAR / AMP • Target 1: /webapps/alfresco/… • Target 2: /webapps/share/... Challenge: AMP-nested JARs 1) Filter + separate resolution/shade 2) Unzip via antrun
  • 16. Learn. Connect. Collaborate. Step 3: Install addons Task #6: Unpack AOS WAR + AMP • Target 1: /webapps/_vti_bin/… • Target 2: /webapps/alfresco/... Challenge: JARs unavailable via Maven ● Unzip bundled JARs via antrun
  • 17. Learn. Connect. Collaborate. Step 4: Fix bugs / issues Task #7: Fix resource loading • Incorrect classpath: handling (web scripts) • Incorrect webapp: handling (URL config source) • JVM / Jetty JAR handling (open/close)
  • 18. Learn. Connect. Collaborate. Review: Current state https://github.com/AFaust/simple-alfresco-executables Working executable JARs • ACS 179 MiB, Share: 84 MiB • “Typical” startup time Effort ~5 person days
  • 19. Learn. Connect. Collaborate. Outlook: Optimisations Pre-built TLD / annotation inventory • Avoid JAR listing • Potential: ACS ~50-60 sec, Share ~15 sec Maven: build without unpack • Shade in sub-path + AMP support • Potential: ~15-20 min
  • 20. Learn. Connect. Collaborate. Outlook: Substrate VM / AOT Investigation • Rhino JS pre-compilation • AOP proxy pre-generation • Built-time AspectJ binary weaving Test new GraalVM release candidates
  • 21. Learn. Connect. Collaborate. Outlook: Substrate VM / AOT Task #8: Build time inventory Task #9: Generate AOT helper • Code substitution • Feature config (reflection etc.) Task #10: Build, test, adapt, repeat...
  • 22. The Alfresco fat JAR experiment Thank you!

Editor's Notes

  1. This is the old system. &amp;lt;number&amp;gt;
  2. This is the old system. &amp;lt;number&amp;gt;