SlideShare ist ein Scribd-Unternehmen logo
1 von 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!

Weitere ähnliche Inhalte

Was ist angesagt?

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.
 

Was ist angesagt? (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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Kürzlich hochgeladen

Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
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
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
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
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
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
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 

Kürzlich hochgeladen (20)

Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
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
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
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...
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 

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!

Hinweis der Redaktion

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