SlideShare a Scribd company logo
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

PPTX
Moving Gigantic Files Into and Out of the Alfresco Repository
PPTX
No Docker? No Problem: Automating installation and config with Ansible
PPTX
Moving From Actions & Behaviors to Microservices
PDF
F03 a history of (open) conversation alfresco at university of zaragoza
PPTX
How to extend (properly) and old Alfresco Share feature
PDF
Bee con2016 presentation_20160125004_installing
PDF
TIAD : Automating the aplication lifecycle
PPTX
The Alfresco ECM 1 Billion Document Benchmark on AWS and Aurora - Benchmark ...
Moving Gigantic Files Into and Out of the Alfresco Repository
No Docker? No Problem: Automating installation and config with Ansible
Moving From Actions & Behaviors to Microservices
F03 a history of (open) conversation alfresco at university of zaragoza
How to extend (properly) and old Alfresco Share feature
Bee con2016 presentation_20160125004_installing
TIAD : Automating the aplication lifecycle
The Alfresco ECM 1 Billion Document Benchmark on AWS and Aurora - Benchmark ...

What's hot (20)

PDF
Hacking on WildFly 9
PDF
Apache Jackrabbit Oak on MongoDB
PDF
CIRCUIT 2015 - AEM Infrastructure Automation with Chef Cookbooks
PPTX
Bulk Export Tool for Alfresco
PDF
Mitchell Hashimoto, HashiCorp
PPTX
Alfresco search services: Now and Then
PPTX
An Introduction into Bosh | anynines
PPTX
Automated Deployments with Ansible
PPTX
Scaling Development Environments with Docker
PDF
Docker at Shopify: From This-Looks-Fun to Production by Simon Eskildsen (Shop...
PPTX
Scaling Your App With Docker Swarm using Terraform, Packer on Openstack
PDF
Handling 10k requests per second with Symfony and Varnish - SymfonyCon Berlin...
PPTX
All the troubles you get into when setting up a production ready Kubernetes c...
PDF
Clocker - The Docker Cloud Maker
PPTX
(Re)Indexing Large Repositories in Alfresco
PDF
Play Framework: Intro & High-Level Overview
PDF
TIAD 2016 : Using and abusing container metadata
PDF
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
PDF
Chef Fundamentals Training Series Module 1: Overview of Chef
PDF
Building a Serverless Pipeline
Hacking on WildFly 9
Apache Jackrabbit Oak on MongoDB
CIRCUIT 2015 - AEM Infrastructure Automation with Chef Cookbooks
Bulk Export Tool for Alfresco
Mitchell Hashimoto, HashiCorp
Alfresco search services: Now and Then
An Introduction into Bosh | anynines
Automated Deployments with Ansible
Scaling Development Environments with Docker
Docker at Shopify: From This-Looks-Fun to Production by Simon Eskildsen (Shop...
Scaling Your App With Docker Swarm using Terraform, Packer on Openstack
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...
Clocker - The Docker Cloud Maker
(Re)Indexing Large Repositories in Alfresco
Play Framework: Intro & High-Level Overview
TIAD 2016 : Using and abusing container metadata
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef Fundamentals Training Series Module 1: Overview of Chef
Building a Serverless Pipeline
Ad

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

PDF
Tech talk live alfresco add ons
PPTX
Gabriele Columbro - Maurizio Pillitu - Get your Alfresco project from Zero to...
PDF
Alfresco Boxes.pdf
PDF
BP-6 Repository Customization Best Practices
PDF
BP-10 Keeping Your Sanity – Rapid Development & Deployment Tools
PDF
BP-9 Share Customization Best Practices
PDF
BP-7 Share Customization Best Practices
PPTX
Alfresco spk-alfresco-day
PPT
2009-04-21 - Alfresco and Maven NXP case study
PDF
Summit2014 topic 0153 - Alfresco Maven for shared properties
PDF
BP-5 Application Lifecycle Management
PDF
Deploy Flex with Apache Ant
PDF
Implementing alfresco as a content platform with zaizi
PDF
Alfresco Day Roma 2015: Infrastructure as Code with Chef-Alfresco
PDF
IzPack at LyonJUG'11
PPTX
Standard Application Lifecycle Management as Community (and Enterprise) ecosy...
PPT
Introduction to Software Build Technology
PDF
Hands On with Maven
PPT
Demystifying Maven
PDF
IzPack - PoitouJUG
Tech talk live alfresco add ons
Gabriele Columbro - Maurizio Pillitu - Get your Alfresco project from Zero to...
Alfresco Boxes.pdf
BP-6 Repository Customization Best Practices
BP-10 Keeping Your Sanity – Rapid Development & Deployment Tools
BP-9 Share Customization Best Practices
BP-7 Share Customization Best Practices
Alfresco spk-alfresco-day
2009-04-21 - Alfresco and Maven NXP case study
Summit2014 topic 0153 - Alfresco Maven for shared properties
BP-5 Application Lifecycle Management
Deploy Flex with Apache Ant
Implementing alfresco as a content platform with zaizi
Alfresco Day Roma 2015: Infrastructure as Code with Chef-Alfresco
IzPack at LyonJUG'11
Standard Application Lifecycle Management as Community (and Enterprise) ecosy...
Introduction to Software Build Technology
Hands On with Maven
Demystifying Maven
IzPack - PoitouJUG
Ad

Recently uploaded (20)

PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
System and Network Administration Chapter 2
PDF
Nekopoi APK 2025 free lastest update
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PPTX
ai tools demonstartion for schools and inter college
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
How Creative Agencies Leverage Project Management Software.pdf
Upgrade and Innovation Strategies for SAP ERP Customers
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Operating system designcfffgfgggggggvggggggggg
Wondershare Filmora 15 Crack With Activation Key [2025
Odoo POS Development Services by CandidRoot Solutions
wealthsignaloriginal-com-DS-text-... (1).pdf
Navsoft: AI-Powered Business Solutions & Custom Software Development
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
System and Network Administration Chapter 2
Nekopoi APK 2025 free lastest update
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
ai tools demonstartion for schools and inter college
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
2025 Textile ERP Trends: SAP, Odoo & Oracle
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
How to Choose the Right IT Partner for Your Business in Malaysia

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

  • #3: This is the old system. &amp;lt;number&amp;gt;
  • #4: This is the old system. &amp;lt;number&amp;gt;