Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Plug-in Architectures With Layrry and the Java ...

Plug-in Architectures With Layrry and the Java Module System (vJUG)

-- A joint talk with Andres Almiray at Virtual JUG --

The Java Module System lays the foundation for building modularized applications on the JVM. It doesn’t concern itself though with resolving module versions and obtaining modules from repositories.

This is where Layrry comes in: an API and launcher for modularized Java applications which takes a descriptor of the module layer(s) to assemble, fetches the modules and starts up the application.

Join us for this session and learn how to:

* Build Java applications using layers, e.g. providing isolation between different versions of one module.
* Use jbang to launch your layered apps in no time.
* Create plug-in based rich-client applications using JavaFX and Layrry, allowing to – dynamically reconfigure and update your layer hierarchy, no restarts required.
* Create your own customized Layrry launcher if needed

This session is code-centered, be ready to see the Java Module System, Layrry, and JavaFX in action!

Gunnar Morling

November 24, 2020
Tweet

More Decks by Gunnar Morling

Other Decks in Programming

Transcript

  1. @gunnarmorling | @aalmiray #Layrry Plug-in Architectures With Layrry and the

    Java Module System Gunnar Morling | Andres Almiray
  2. @gunnarmorling | @aalmiray #Layrry Gunnar Morling • Open source software

    engineer at Red Hat ◦ Debezium ◦ Hibernate • Spec Lead for Bean Validation 2.0 • Java Champion • @gunnarmorling
  3. @gunnarmorling | @aalmiray #Layrry Andres Almiray • Senior Principal Product

    Manager @ Oracle ◦ “Seasoned Sourceror” • ❤ Open Source & Java • Apache Groovy PMC • Java Champion Alumni • @aalmiray
  4. @gunnarmorling | @aalmiray #Layrry JPMS Java Platform Module System (also

    known as Jigsaw) Introduced in Java 9 Designed to break down the JVM monolith Applicable to user space as well The promise is to give developers better code encapsulation and design foundations
  5. @gunnarmorling | @aalmiray #Layrry Some User Statements “JPMS only allows

    for one version of a module” “JPMS doesn’t allow to add modules at runtime” “I have to modularize ALL my dependencies in order to benefit from JPMS” “It’s so hard to map dependency coordinates to module dependencies” “Help, non-exported packages of different modules collide!”
  6. @gunnarmorling | @aalmiray #Layrry What no one ever said “Let’s

    use JPMS Layers to tackle (some of) these issues”
  7. @gunnarmorling | @aalmiray #Layrry Local Repositories • Artifacts can be

    organized in a local repository that does not require remote resolution • Two layouts currently supported
  8. @gunnarmorling | @aalmiray #Layrry Bonus: Class Unloading • Classes and

    layer class loader subject to GC after plug-in removal • Dragons beware, class loader leaks can happen ◦ Dangling references in remaining layers ◦ Started threads ◦ Shutdown hooks
  9. @gunnarmorling | @aalmiray #Layrry Outlook • Remote layer files •

    Binary distributions: Github Releases, Homebrew, SDKMan, etc. • Integration with jlink • Derive layers from pom.xml? • Programmatic plug-in API • Your contributions?!