SlideShare a Scribd company logo
Calling All Modularity Solutions:
A Comparative Study from eBay
JavaOne 2011




 Sangjin Lee, Tony Ng
 eBay Inc.
Agenda

•  What is modularity?
•  Why modularity?
•  Evaluation criteria
•  Scorecard
•  Summary




2
What is Modularity?

Dictionary says...
   modular: employing or involving a module or modules as the basis of design
   or construction: modular housing units.
Then what is a “module”?
      module: each of a set of standardized parts or independent units that can be
      used to construct a more complex structure, such as an item of furniture or a
      building.
According to Wikipedia*:
      modular design: an approach that subdivides a system into smaller parts
      (modules) that can be independently created and then used in different
      systems to drive multiple functionalities.


    * http://en.wikipedia.org/wiki/Modular_design

3
Key modularity concepts for software

•  Building blocks
•  Re-use
•  Granularity
•  Dependencies
•  Encapsulation
•  Composition
•  Versioning




                      Source: http://techdistrict.kirkk.com/2010/04/22/granularity-architectures-nemesis/
                      Author: Kirk Knoernschild



4
Challenges for large enterprises

•  Some stats on the eBay code base
    –    ~ 44 million of lines of code and growing
    –    Hundreds of thousands of classes
    –    Tens of thousands of packages
    –    ~ 4,000+ jars

•  We have too many dependencies and tight coupling in our code
    –  Everyone sees everyone else
    –  Everyone affects everyone else




5
Challenges for large enterprises

•  Developer productivity/agility suffers as the knowledge goes down
    –    Changes ripple throughout the system
    –    Fallouts from changes/features are difficult to resolve
    –    Developers slow down and become risk averse
    –    Everyone affects everyone else: invites even more dependencies

                                            knowledge               complexity




                                                        code size
6
Our goals with modularity efforts

•  Tame complexity
•  Organize our code base in loose coupling fashion
    –  Coarse-grained modules: number matters!
    –  Declarative coupling contract
    –  Ability to hide internals

•  Establish clear code ownership, boundaries and dependencies
•  Allow different components (and teams) evolve at different speeds
•  Increase development agility




7
Considerations on any modularity solutions

•  Scalability: enterprise software tends to be large scale
•  We need to consider a large group of developers with varying skill
   levels
•  End-to-end development lifecycle is crucial
•  Conversion/migration of existing code base is crucial
    –  We rarely start from vacuum
    –  We want to move over and modularize bulk of existing code
    –  It is imperative that we chart a realistic migration course that can be
       achieved within a reasonable amount of time
    –  We cannot afford disruption to business meanwhile: “change parts
       while the car is running”




8
Evaluation criteria

•  Modularity concerns
    –    Hide internals (“reduce the surface area”)
    –    Enforce modularity
    –    Provision/assemble application easily
    –    Isolate and run two versions of the same class




9
Evaluation criteria

•  End-to-end development lifecycle: IDE, command line build,
   repository, server runtime, etc.
     –  Complete and mature tooling
     –  Integration and fidelity of tools across phases



                      pull/push           SCM          pull


                                                               Command line
              IDE
                                                                 build (CI)



                consume                             publish/consume



                                                              Deployment               Server runtime
                             Repository
                                                packaging                     deploy




10
Evaluation criteria

•  Migration concerns
     –  Ease of conversion
     –  Learning curve

•  Adoption: user communities and knowledge




11
Evaluation candidates

•  OSGi
•  Maven
•  Jigsaw
•  JBoss modules




 Disclaimer: this is not a comprehensive discussion of these technologies. We will
 focus only on modularity aspects and it will not be an exhaustive evaluation.


12
OSGi

•  Observations
     –    “The only game in town” (?)
     –    Strong modularity framework
     –    Focuses more on runtime than build time
     –    “All or nothing”: everything needs to be pretty much in an OSGi bundle
     –    Bundles and services are dynamic at runtime




13
OSGi

META-INF/MANIFEST.MF:
	
Bundle-ManifestVersion: 2	
Bundle-SymbolicName: org.foo.bar	
Bundle-Version: 1.2.1	
Import-Package: org.foo.other;version=“[1.1,2.0)”,	
  javax.xml.parsers	
Export-Package: org.foo.bar;version=“1.2.3”,	
  org.foo.bar.sub;uses=“org.foo.bar”;version=“1.2.1”	




14
OSGi

•  Pros
     –  Enforces modularity strongly: it will let you know if you violate it
     –  Mature and comprehensive: covers pretty much all use cases regarding
        modularity
     –  Open standard
     –  Services: the ultimate decoupling force
     –  Can run two versions of the same class easily




15
OSGi

•  Cons
     –  Can run two versions of the same class easily, and run into trouble
     –  Some problems are nasty to troubleshoot (uses conflict anyone?)
     –  Still not many well-integrated tools across all phases: impedance
        mismatches
     –  Compared to strong runtime model, build side story is weak
     –  Migration can be quite painful
     –  Learning curve is still fairly steep




16
OSGi

•  Hide internals: A
     –  Declarative way to exclude module-private
        packages
     –  It’s strictly enforced: won’t resolve if it is
        violated

•  Enforce modularity: A
     –  Requirements and capabilities declared in the
        manifest are strongly enforced: runtime will
        fail if violated




17
OSGi

•  Assemble application easily: A
     –  Supported through subsystem provisioning (Karaf features, OSGi
        application model, etc.)
     –  Works quite well because the underlying dependency metadata is high
        quality

•  Run two versions of the same class: B+
     –  Works great if consumers are well-separated
     –  Supports version range dependencies
     –  However, has a chance of introducing nasty problems if one is not
        careful: uses conflicts, accidental wiring, and ClassCastExceptions
     –  Be careful what you wish for




18
OSGi

•  Complete and mature tooling: B+
     –  IDE: PDE, bndtools, sigil, ...
     –  Command line build: maven + bundle plug-in, ant, tycho, ...
     –  Repository: OBR, target platform, maven repository

•  Integration of tools: D
     –  Tools at different phases do not integrate too well
     –  Left to deal with a lot of little impedance mismatches




19
OSGi

•  Ease of migration: D
     –  Binaries can be “wrapped” into OSGi bundles
     –  All bad practices must be addressed before they can be used, however:
        split packages, Class.forName, thread context classloader, etc.
     –  Not all third-party libraries are available as OSGi bundles
     –  Need to take a continuous refactoring approach

•  Learning curve: C
     –  The learning curve is fairly steep mainly because modularity is not
        always easy to master
     –  Dynamic behavior of bundles/services introduces complexity

•  Adoption: B-
     –  Fairly wide adoption, but less so in enterprise applications



20
OSGi: scorecard



     Hide internals                    A
     Enforce modularity                A
     Assemble application easily       A
     Run two versions of the same class B+
     Complete and mature tooling       B+
     Integration of tools              D
     Ease of migration                 D
     Learning curve                    C
     Adoption                          B-
     Overall                           B-


21
Maven

•  Observations
     –  Normally not thought of as a “modularity solution”
     –  But has some characteristics of modularity through dependency
        management
     –  More of a build time solution than runtime




22
Maven

pom.xml:
	
<?xml version=“1.0”?>	
<project>	
    <groupId>org.foo</groupId>	
    <artifactId>bar</artifactId>	
    <version>1.2.1</version>	
    <packaging>jar</packaging>	
    <dependencies>	
        <groupId>org.foo</groupId>	
        <artifactId>other</artifactId>	
        <version>1.1.0</version>	
    </dependencies>	
</project>	




23
Maven

•  Pros
     –    Most developers are already familiar with maven
     –    Most third-party libraries are already available as maven artifacts
     –    Comes with a fairly comprehensive and mature tooling ecosystem
     –    You can extend the behavior easily with your own plug-ins




24
Maven

•  Cons: it’s not really meant as a modularity framework
     –  It does not enforce modularity (either at build time or runtime)
     –  You cannot hide internals
     –  At runtime, the global classpath still rules




25
Maven

•  Hide internals: F
     –  Nothing there
     –  Still the global classpath rules

•  Enforce modularity: D-
     –    More of a build time concern than runtime
     –    No enforcement of dependencies: transitive build classpath!
     –    Not even an option of strict dependency build
     –    There is a dependency plugin that analyzes your dependencies




26
Maven

•  Assemble application easily: B
     –  Definitely possible
     –  But it’s only as good as your POM dependencies

•  Run two versions of the same class: F
     –  Nothing there
     –  Still the global classpath rules
     –  When there are version collisions, maven picks one for you J




27
Maven

•  Complete and mature tooling: A
     –  Command line build, IDE (m2eclipse), and maven repo

•  Integration of tools: A
•  Ease of migration: B+
     –  Boils down to creating POMs for existing non-maven projects
     –  Third-party libs are pretty much maven artifacts these days

•  Learning curve: B
     –  Most developers are already familiar with maven
     –  Maven has its own quirks

•  Adoption: A



28
Maven: scorecard



     Hide internals                    F
     Enforce modularity                D-
     Assemble application easily       B
     Run two versions of the same class F
     Complete and mature tooling       A
     Integration of tools              A
     Ease of migration                 B+
     Learning curve                    B
     Adoption                          A
     Overall                           C+


29
Project Jigsaw overview

•  Part of JDK 8
•  JSR 277, JSR 294
•  Key Features
     –    Static resolution
     –    Versioning
     –    Optional modules
     –    Permits
     –    Virtual modules
     –    Native packaging
     –    Module-private accessibility at language level




30
Jigsaw: module declaration (module-info)

•  Source and binary form

module a.b @ 1.0 {	
    requires c.d @ [2.0,3.0);   //   dependencies	
    export e.f.*;               //   package exported	
    provide g.h @ 4.0;          //   virtual provider modules	
    permit i.j;                 //   module friendship	
    class   k.l;                //   main class	
}	




31
Jigsaw

•  Pros
     –  Native support in JDK (e.g. javac) and language
     –  Covers build time, install-time, and runtime
     –  Static resolution may provide optimization & simplicity

•  Cons
     –    Not ready to be used yet
     –    Less mature, lesser known
     –    Primary focus is to modularize JDK (but open to others)
     –    Pace has been slow
     –    Static resolution means less flexibility at runtime




32
Jigsaw

•  Hide internals: A
•  Enforce modularity: A
•  Easy app provisioning & creation: A
•  Run two versions of the same class: B




33
Jigsaw

•  Complete and mature tooling: F
•  Integration of tools: F
     –  Only OpenJDK tools support right now

•  Migration concerns: B-
     –  Extra effort would be given to minimize migration pain since the plan
        is to modularize JDK
     –  Some unknown on interoperability with OSGi

•  Learning curve: B
     –  Not much info yet and still evolving (so far does not look too
        complicated)

•  Adoption: F


34
Jigsaw: scorecard



     Hide internals                    A
     Enforce modularity                A
     Assemble application easily       A
     Run two versions of the same class B
     Complete and mature tooling       F
     Integration of tools              F
     Ease of migration                 B-
     Learning curve                    B
     Adoption                          F
     Overall                           C


35
JBoss modules

•  Basis for JBoss OSGi & app server
•  No container required
•  Features
     –    Exact version match only
     –    Transitive and non-transitive dependencies
     –    Optional dependencies
     –    Import/export filters




36
JBoss modules: module declaration

<module xmlns="urn:jboss:module:1.0" name="my.module">	
     <main-class name="my.module.Main"/>	
     <resources>	
       <resource-root path="mymodule.jar"/>	
     </resources>	
     <dependencies>	
       <module name="a.b"/>	
       <module name="c.d" slot="1.3.0"/>	
       <!-- Optional dependencies -->	
       <module name="e.f" optional="true"/>	
     </dependencies>	
</module>	




37
JBoss modules

•  Pros
     –  Very simple
     –  Fast static resolution
     –  Lightweight (jboss-modules.jar ~240k)

•  Cons
     –    Lacks (public) tools: IDE, command line builds, ...
     –    Lacks advanced features
     –    No version ranges: exact match only
     –    Non-standards based




38
JBoss modules

•  Hide internals: A
     –  Can constrain exported packages easily

•  Enforce modularity: A
•  Easy app provisioning & creation: B
     –  It is possible by way of resolving and starting the first module
     –  It is unknown if there is a formal provisioning concept or framework/
        library publicly available

•  Run two versions of the same class: C
     –  No version ranges: exact match only
     –  Has potential to introduce multiple versions unintentionally




39
JBoss modules

•  Complete and mature tooling: F
•  Integration of tools: F
•  Migration concerns: D
     –  Many of the OSGi bad practices would be issues with JBoss modules too

•  Learning curve: B
     –  Relatively simple to learn

•  Adoption: D-
     –  Little adoption outside JBoss itself?




40
JBoss modules: scorecard



     Hide internals                    A
     Enforce modularity                A
     Assemble application easily       B
     Run two versions of the same class C
     Complete and mature tooling       F
     Integration of tools              F
     Ease of migration                 D
     Learning curve                    B
     Adoption                          D-
     Overall                           C-


41
Scorecard


                                     OSGi Maven Jigsaw JBoss
                                                       modules
Hide internals                       A    F     A      A
Enforce modularity                   A    D-    A      A
Assemble application easily          A    B     A      B
Run two versions of the same class   B+   F     B      C
Complete and mature tooling          B+   A     F      F
Integration of tools                 D    A     F      F
Ease of migration                    D    B+    B-     D
Learning curve                       C    B     B      B
Adoption                             B-   A     F      D-
Overall                              B-   C+    C      C-
 42
Summary

•  OSGi is the only true modularity solution that is “ready” now
•  OSGi has challenges in migration and learning curve
•  Dearth of integrated tooling is an issue with OSGi
•  Maven does not offer much in the way of modularity: no
   enforcement
•  Jigsaw will introduce language level modularity support
•  Will there be interoperability between Jigsaw and OSGi?
•  JBoss modules shares strong modularity traits with OSGi
•  JBoss modules does not offer much tooling



43
Thank you!




Sangjin Lee: sangjin.lee@ebay.com, twitter @sjlee
Tony Ng: tonyng@ebay.com




44

More Related Content

What's hot

Best practices and lessons learnt from Running Apache NiFi at Renault
Best practices and lessons learnt from Running Apache NiFi at RenaultBest practices and lessons learnt from Running Apache NiFi at Renault
Best practices and lessons learnt from Running Apache NiFi at Renault
DataWorks Summit
 
Key Methodologies for Migrating from Oracle to Postgres
Key Methodologies for Migrating from Oracle to PostgresKey Methodologies for Migrating from Oracle to Postgres
Key Methodologies for Migrating from Oracle to Postgres
EDB
 
Developing modular Java applications
Developing modular Java applicationsDeveloping modular Java applications
Developing modular Java applications
Julien Dubois
 
Eclipse MicroProfile 과 Microservice Java framework – Helidon
Eclipse MicroProfile 과 Microservice Java framework – HelidonEclipse MicroProfile 과 Microservice Java framework – Helidon
Eclipse MicroProfile 과 Microservice Java framework – Helidon
Oracle Korea
 
Database as a Service - Tutorial @ICDE 2010
Database as a Service - Tutorial @ICDE 2010Database as a Service - Tutorial @ICDE 2010
Database as a Service - Tutorial @ICDE 2010
DBIS @ Ilmenau University of Technology
 
MySQL High Availability with Replication New Features
MySQL High Availability with Replication New FeaturesMySQL High Availability with Replication New Features
MySQL High Availability with Replication New Features
Shivji Kumar Jha
 
How to Become a Winner in the JVM Performance-Tuning Battle
How to Become a Winner in the JVM Performance-Tuning BattleHow to Become a Winner in the JVM Performance-Tuning Battle
How to Become a Winner in the JVM Performance-Tuning Battle
Capgemini
 
Java Serverless in Action - Voxxed Banff
Java Serverless in Action - Voxxed BanffJava Serverless in Action - Voxxed Banff
Java Serverless in Action - Voxxed Banff
David Delabassee
 
A sane approach to microservices
A sane approach to microservicesA sane approach to microservices
A sane approach to microservices
Toby Matejovsky
 
Database Migrations with Gradle and Liquibase
Database Migrations with Gradle and LiquibaseDatabase Migrations with Gradle and Liquibase
Database Migrations with Gradle and Liquibase
Dan Stine
 
Ankit Chohan - Java
Ankit Chohan - JavaAnkit Chohan - Java
Ankit Chohan - Java
Ankit Chohan
 
Jelastic - DevOps for Java with Docker Containers - Madrid 2015
Jelastic - DevOps for Java with Docker Containers - Madrid 2015Jelastic - DevOps for Java with Docker Containers - Madrid 2015
Jelastic - DevOps for Java with Docker Containers - Madrid 2015
Jelastic Multi-Cloud PaaS
 
JavaOne 2015: 12 Factor App
JavaOne 2015: 12 Factor AppJavaOne 2015: 12 Factor App
JavaOne 2015: 12 Factor App
Joe Kutner
 
Enterprise Java Web Application Frameworks Sample Stack Implementation
Enterprise Java Web Application Frameworks   Sample Stack ImplementationEnterprise Java Web Application Frameworks   Sample Stack Implementation
Enterprise Java Web Application Frameworks Sample Stack Implementation
Mert Çalışkan
 
AQAvit: Vitality through Testing
AQAvit: Vitality through TestingAQAvit: Vitality through Testing
AQAvit: Vitality through Testing
Shelley Lambert
 
DevOps tools for winning agility
DevOps tools for winning agilityDevOps tools for winning agility
DevOps tools for winning agility
Kellyn Pot'Vin-Gorman
 
Breathing New Life into Apache Oozie with Apache Ambari Workflow Manager
Breathing New Life into Apache Oozie with Apache Ambari Workflow ManagerBreathing New Life into Apache Oozie with Apache Ambari Workflow Manager
Breathing New Life into Apache Oozie with Apache Ambari Workflow Manager
DataWorks Summit
 
OUG Ireland Meet-up 12th January
OUG Ireland Meet-up 12th JanuaryOUG Ireland Meet-up 12th January
OUG Ireland Meet-up 12th January
Brendan Tierney
 
Slides for the Apache Geode Hands-on Meetup and Hackathon Announcement
Slides for the Apache Geode Hands-on Meetup and Hackathon Announcement Slides for the Apache Geode Hands-on Meetup and Hackathon Announcement
Slides for the Apache Geode Hands-on Meetup and Hackathon Announcement
VMware Tanzu
 
Stumbling stones when migrating from Oracle
 Stumbling stones when migrating from Oracle Stumbling stones when migrating from Oracle
Stumbling stones when migrating from Oracle
EDB
 

What's hot (20)

Best practices and lessons learnt from Running Apache NiFi at Renault
Best practices and lessons learnt from Running Apache NiFi at RenaultBest practices and lessons learnt from Running Apache NiFi at Renault
Best practices and lessons learnt from Running Apache NiFi at Renault
 
Key Methodologies for Migrating from Oracle to Postgres
Key Methodologies for Migrating from Oracle to PostgresKey Methodologies for Migrating from Oracle to Postgres
Key Methodologies for Migrating from Oracle to Postgres
 
Developing modular Java applications
Developing modular Java applicationsDeveloping modular Java applications
Developing modular Java applications
 
Eclipse MicroProfile 과 Microservice Java framework – Helidon
Eclipse MicroProfile 과 Microservice Java framework – HelidonEclipse MicroProfile 과 Microservice Java framework – Helidon
Eclipse MicroProfile 과 Microservice Java framework – Helidon
 
Database as a Service - Tutorial @ICDE 2010
Database as a Service - Tutorial @ICDE 2010Database as a Service - Tutorial @ICDE 2010
Database as a Service - Tutorial @ICDE 2010
 
MySQL High Availability with Replication New Features
MySQL High Availability with Replication New FeaturesMySQL High Availability with Replication New Features
MySQL High Availability with Replication New Features
 
How to Become a Winner in the JVM Performance-Tuning Battle
How to Become a Winner in the JVM Performance-Tuning BattleHow to Become a Winner in the JVM Performance-Tuning Battle
How to Become a Winner in the JVM Performance-Tuning Battle
 
Java Serverless in Action - Voxxed Banff
Java Serverless in Action - Voxxed BanffJava Serverless in Action - Voxxed Banff
Java Serverless in Action - Voxxed Banff
 
A sane approach to microservices
A sane approach to microservicesA sane approach to microservices
A sane approach to microservices
 
Database Migrations with Gradle and Liquibase
Database Migrations with Gradle and LiquibaseDatabase Migrations with Gradle and Liquibase
Database Migrations with Gradle and Liquibase
 
Ankit Chohan - Java
Ankit Chohan - JavaAnkit Chohan - Java
Ankit Chohan - Java
 
Jelastic - DevOps for Java with Docker Containers - Madrid 2015
Jelastic - DevOps for Java with Docker Containers - Madrid 2015Jelastic - DevOps for Java with Docker Containers - Madrid 2015
Jelastic - DevOps for Java with Docker Containers - Madrid 2015
 
JavaOne 2015: 12 Factor App
JavaOne 2015: 12 Factor AppJavaOne 2015: 12 Factor App
JavaOne 2015: 12 Factor App
 
Enterprise Java Web Application Frameworks Sample Stack Implementation
Enterprise Java Web Application Frameworks   Sample Stack ImplementationEnterprise Java Web Application Frameworks   Sample Stack Implementation
Enterprise Java Web Application Frameworks Sample Stack Implementation
 
AQAvit: Vitality through Testing
AQAvit: Vitality through TestingAQAvit: Vitality through Testing
AQAvit: Vitality through Testing
 
DevOps tools for winning agility
DevOps tools for winning agilityDevOps tools for winning agility
DevOps tools for winning agility
 
Breathing New Life into Apache Oozie with Apache Ambari Workflow Manager
Breathing New Life into Apache Oozie with Apache Ambari Workflow ManagerBreathing New Life into Apache Oozie with Apache Ambari Workflow Manager
Breathing New Life into Apache Oozie with Apache Ambari Workflow Manager
 
OUG Ireland Meet-up 12th January
OUG Ireland Meet-up 12th JanuaryOUG Ireland Meet-up 12th January
OUG Ireland Meet-up 12th January
 
Slides for the Apache Geode Hands-on Meetup and Hackathon Announcement
Slides for the Apache Geode Hands-on Meetup and Hackathon Announcement Slides for the Apache Geode Hands-on Meetup and Hackathon Announcement
Slides for the Apache Geode Hands-on Meetup and Hackathon Announcement
 
Stumbling stones when migrating from Oracle
 Stumbling stones when migrating from Oracle Stumbling stones when migrating from Oracle
Stumbling stones when migrating from Oracle
 

Similar to Calling All Modularity Solutions: A Comparative Study from eBay

S/W Design and Modularity using Maven
S/W Design and Modularity using MavenS/W Design and Modularity using Maven
S/W Design and Modularity using Maven
Scheidt & Bachmann
 
Clone Clone Make: a better way to build
Clone Clone Make: a better way to buildClone Clone Make: a better way to build
Clone Clone Make: a better way to build
DanHeidinga
 
Использование maven для сборки больших модульных c++ проектов на примере Odin...
Использование maven для сборки больших модульных c++ проектов на примере Odin...Использование maven для сборки больших модульных c++ проектов на примере Odin...
Использование maven для сборки больших модульных c++ проектов на примере Odin...
Platonov Sergey
 
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil BartlettJava Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
JAX London
 
Jax london 2011
Jax london 2011Jax london 2011
Jax london 2011
njbartlett
 
DevHub 3 - Composer plus Magento
DevHub 3 - Composer plus MagentoDevHub 3 - Composer plus Magento
DevHub 3 - Composer plus Magento
Magento Dev
 
Architectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and ConsistentlyArchitectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and Consistently
Comsysto Reply GmbH
 
Architectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and ConsistentlyArchitectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and Consistently
Comsysto Reply GmbH
 
Organinzing Your PHP Projects (2010 Memphis PHP)
Organinzing Your PHP Projects (2010 Memphis PHP)Organinzing Your PHP Projects (2010 Memphis PHP)
Organinzing Your PHP Projects (2010 Memphis PHP)
Paul Jones
 
Organizing Your PHP Projects (2010 ConFoo)
Organizing Your PHP Projects (2010 ConFoo)Organizing Your PHP Projects (2010 ConFoo)
Organizing Your PHP Projects (2010 ConFoo)
Paul Jones
 
Platform Engineering for the Modern Oracle World
Platform Engineering for the Modern Oracle WorldPlatform Engineering for the Modern Oracle World
Platform Engineering for the Modern Oracle World
Simon Haslam
 
How to Build Composite Applications with PRISM
How to Build Composite Applications with PRISMHow to Build Composite Applications with PRISM
How to Build Composite Applications with PRISM
DataLeader.io
 
Oracle ADF Architecture TV - Development - Version Control
Oracle ADF Architecture TV - Development - Version ControlOracle ADF Architecture TV - Development - Version Control
Oracle ADF Architecture TV - Development - Version Control
Chris Muir
 
Java Modularity with OSGi
Java Modularity with OSGiJava Modularity with OSGi
Java Modularity with OSGi
Ilya Rybak
 
10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere
10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere
10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere
mfrancis
 
A Journey through the JDKs (Java 9 to Java 11)
A Journey through the JDKs (Java 9 to Java 11)A Journey through the JDKs (Java 9 to Java 11)
A Journey through the JDKs (Java 9 to Java 11)
Markus Günther
 
June 2014 HUG - Continuuity Loom : Cluster Management
June 2014 HUG - Continuuity Loom : Cluster ManagementJune 2014 HUG - Continuuity Loom : Cluster Management
June 2014 HUG - Continuuity Loom : Cluster Management
Yahoo Developer Network
 
Java 9 Module System Introduction
Java 9 Module System IntroductionJava 9 Module System Introduction
Java 9 Module System Introduction
Dan Stine
 
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai..."Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
Fwdays
 
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...
Martin Bergljung
 

Similar to Calling All Modularity Solutions: A Comparative Study from eBay (20)

S/W Design and Modularity using Maven
S/W Design and Modularity using MavenS/W Design and Modularity using Maven
S/W Design and Modularity using Maven
 
Clone Clone Make: a better way to build
Clone Clone Make: a better way to buildClone Clone Make: a better way to build
Clone Clone Make: a better way to build
 
Использование maven для сборки больших модульных c++ проектов на примере Odin...
Использование maven для сборки больших модульных c++ проектов на примере Odin...Использование maven для сборки больших модульных c++ проектов на примере Odin...
Использование maven для сборки больших модульных c++ проектов на примере Odin...
 
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil BartlettJava Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
 
Jax london 2011
Jax london 2011Jax london 2011
Jax london 2011
 
DevHub 3 - Composer plus Magento
DevHub 3 - Composer plus MagentoDevHub 3 - Composer plus Magento
DevHub 3 - Composer plus Magento
 
Architectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and ConsistentlyArchitectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and Consistently
 
Architectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and ConsistentlyArchitectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and Consistently
 
Organinzing Your PHP Projects (2010 Memphis PHP)
Organinzing Your PHP Projects (2010 Memphis PHP)Organinzing Your PHP Projects (2010 Memphis PHP)
Organinzing Your PHP Projects (2010 Memphis PHP)
 
Organizing Your PHP Projects (2010 ConFoo)
Organizing Your PHP Projects (2010 ConFoo)Organizing Your PHP Projects (2010 ConFoo)
Organizing Your PHP Projects (2010 ConFoo)
 
Platform Engineering for the Modern Oracle World
Platform Engineering for the Modern Oracle WorldPlatform Engineering for the Modern Oracle World
Platform Engineering for the Modern Oracle World
 
How to Build Composite Applications with PRISM
How to Build Composite Applications with PRISMHow to Build Composite Applications with PRISM
How to Build Composite Applications with PRISM
 
Oracle ADF Architecture TV - Development - Version Control
Oracle ADF Architecture TV - Development - Version ControlOracle ADF Architecture TV - Development - Version Control
Oracle ADF Architecture TV - Development - Version Control
 
Java Modularity with OSGi
Java Modularity with OSGiJava Modularity with OSGi
Java Modularity with OSGi
 
10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere
10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere
10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere
 
A Journey through the JDKs (Java 9 to Java 11)
A Journey through the JDKs (Java 9 to Java 11)A Journey through the JDKs (Java 9 to Java 11)
A Journey through the JDKs (Java 9 to Java 11)
 
June 2014 HUG - Continuuity Loom : Cluster Management
June 2014 HUG - Continuuity Loom : Cluster ManagementJune 2014 HUG - Continuuity Loom : Cluster Management
June 2014 HUG - Continuuity Loom : Cluster Management
 
Java 9 Module System Introduction
Java 9 Module System IntroductionJava 9 Module System Introduction
Java 9 Module System Introduction
 
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai..."Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
 
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...
 

Recently uploaded

Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 

Recently uploaded (20)

Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 

Calling All Modularity Solutions: A Comparative Study from eBay

  • 1. Calling All Modularity Solutions: A Comparative Study from eBay JavaOne 2011 Sangjin Lee, Tony Ng eBay Inc.
  • 2. Agenda •  What is modularity? •  Why modularity? •  Evaluation criteria •  Scorecard •  Summary 2
  • 3. What is Modularity? Dictionary says... modular: employing or involving a module or modules as the basis of design or construction: modular housing units. Then what is a “module”? module: each of a set of standardized parts or independent units that can be used to construct a more complex structure, such as an item of furniture or a building. According to Wikipedia*: modular design: an approach that subdivides a system into smaller parts (modules) that can be independently created and then used in different systems to drive multiple functionalities. * http://en.wikipedia.org/wiki/Modular_design 3
  • 4. Key modularity concepts for software •  Building blocks •  Re-use •  Granularity •  Dependencies •  Encapsulation •  Composition •  Versioning Source: http://techdistrict.kirkk.com/2010/04/22/granularity-architectures-nemesis/ Author: Kirk Knoernschild 4
  • 5. Challenges for large enterprises •  Some stats on the eBay code base –  ~ 44 million of lines of code and growing –  Hundreds of thousands of classes –  Tens of thousands of packages –  ~ 4,000+ jars •  We have too many dependencies and tight coupling in our code –  Everyone sees everyone else –  Everyone affects everyone else 5
  • 6. Challenges for large enterprises •  Developer productivity/agility suffers as the knowledge goes down –  Changes ripple throughout the system –  Fallouts from changes/features are difficult to resolve –  Developers slow down and become risk averse –  Everyone affects everyone else: invites even more dependencies knowledge complexity code size 6
  • 7. Our goals with modularity efforts •  Tame complexity •  Organize our code base in loose coupling fashion –  Coarse-grained modules: number matters! –  Declarative coupling contract –  Ability to hide internals •  Establish clear code ownership, boundaries and dependencies •  Allow different components (and teams) evolve at different speeds •  Increase development agility 7
  • 8. Considerations on any modularity solutions •  Scalability: enterprise software tends to be large scale •  We need to consider a large group of developers with varying skill levels •  End-to-end development lifecycle is crucial •  Conversion/migration of existing code base is crucial –  We rarely start from vacuum –  We want to move over and modularize bulk of existing code –  It is imperative that we chart a realistic migration course that can be achieved within a reasonable amount of time –  We cannot afford disruption to business meanwhile: “change parts while the car is running” 8
  • 9. Evaluation criteria •  Modularity concerns –  Hide internals (“reduce the surface area”) –  Enforce modularity –  Provision/assemble application easily –  Isolate and run two versions of the same class 9
  • 10. Evaluation criteria •  End-to-end development lifecycle: IDE, command line build, repository, server runtime, etc. –  Complete and mature tooling –  Integration and fidelity of tools across phases pull/push SCM pull Command line IDE build (CI) consume publish/consume Deployment Server runtime Repository packaging deploy 10
  • 11. Evaluation criteria •  Migration concerns –  Ease of conversion –  Learning curve •  Adoption: user communities and knowledge 11
  • 12. Evaluation candidates •  OSGi •  Maven •  Jigsaw •  JBoss modules Disclaimer: this is not a comprehensive discussion of these technologies. We will focus only on modularity aspects and it will not be an exhaustive evaluation. 12
  • 13. OSGi •  Observations –  “The only game in town” (?) –  Strong modularity framework –  Focuses more on runtime than build time –  “All or nothing”: everything needs to be pretty much in an OSGi bundle –  Bundles and services are dynamic at runtime 13
  • 14. OSGi META-INF/MANIFEST.MF: Bundle-ManifestVersion: 2 Bundle-SymbolicName: org.foo.bar Bundle-Version: 1.2.1 Import-Package: org.foo.other;version=“[1.1,2.0)”, javax.xml.parsers Export-Package: org.foo.bar;version=“1.2.3”, org.foo.bar.sub;uses=“org.foo.bar”;version=“1.2.1” 14
  • 15. OSGi •  Pros –  Enforces modularity strongly: it will let you know if you violate it –  Mature and comprehensive: covers pretty much all use cases regarding modularity –  Open standard –  Services: the ultimate decoupling force –  Can run two versions of the same class easily 15
  • 16. OSGi •  Cons –  Can run two versions of the same class easily, and run into trouble –  Some problems are nasty to troubleshoot (uses conflict anyone?) –  Still not many well-integrated tools across all phases: impedance mismatches –  Compared to strong runtime model, build side story is weak –  Migration can be quite painful –  Learning curve is still fairly steep 16
  • 17. OSGi •  Hide internals: A –  Declarative way to exclude module-private packages –  It’s strictly enforced: won’t resolve if it is violated •  Enforce modularity: A –  Requirements and capabilities declared in the manifest are strongly enforced: runtime will fail if violated 17
  • 18. OSGi •  Assemble application easily: A –  Supported through subsystem provisioning (Karaf features, OSGi application model, etc.) –  Works quite well because the underlying dependency metadata is high quality •  Run two versions of the same class: B+ –  Works great if consumers are well-separated –  Supports version range dependencies –  However, has a chance of introducing nasty problems if one is not careful: uses conflicts, accidental wiring, and ClassCastExceptions –  Be careful what you wish for 18
  • 19. OSGi •  Complete and mature tooling: B+ –  IDE: PDE, bndtools, sigil, ... –  Command line build: maven + bundle plug-in, ant, tycho, ... –  Repository: OBR, target platform, maven repository •  Integration of tools: D –  Tools at different phases do not integrate too well –  Left to deal with a lot of little impedance mismatches 19
  • 20. OSGi •  Ease of migration: D –  Binaries can be “wrapped” into OSGi bundles –  All bad practices must be addressed before they can be used, however: split packages, Class.forName, thread context classloader, etc. –  Not all third-party libraries are available as OSGi bundles –  Need to take a continuous refactoring approach •  Learning curve: C –  The learning curve is fairly steep mainly because modularity is not always easy to master –  Dynamic behavior of bundles/services introduces complexity •  Adoption: B- –  Fairly wide adoption, but less so in enterprise applications 20
  • 21. OSGi: scorecard Hide internals A Enforce modularity A Assemble application easily A Run two versions of the same class B+ Complete and mature tooling B+ Integration of tools D Ease of migration D Learning curve C Adoption B- Overall B- 21
  • 22. Maven •  Observations –  Normally not thought of as a “modularity solution” –  But has some characteristics of modularity through dependency management –  More of a build time solution than runtime 22
  • 23. Maven pom.xml: <?xml version=“1.0”?> <project> <groupId>org.foo</groupId> <artifactId>bar</artifactId> <version>1.2.1</version> <packaging>jar</packaging> <dependencies> <groupId>org.foo</groupId> <artifactId>other</artifactId> <version>1.1.0</version> </dependencies> </project> 23
  • 24. Maven •  Pros –  Most developers are already familiar with maven –  Most third-party libraries are already available as maven artifacts –  Comes with a fairly comprehensive and mature tooling ecosystem –  You can extend the behavior easily with your own plug-ins 24
  • 25. Maven •  Cons: it’s not really meant as a modularity framework –  It does not enforce modularity (either at build time or runtime) –  You cannot hide internals –  At runtime, the global classpath still rules 25
  • 26. Maven •  Hide internals: F –  Nothing there –  Still the global classpath rules •  Enforce modularity: D- –  More of a build time concern than runtime –  No enforcement of dependencies: transitive build classpath! –  Not even an option of strict dependency build –  There is a dependency plugin that analyzes your dependencies 26
  • 27. Maven •  Assemble application easily: B –  Definitely possible –  But it’s only as good as your POM dependencies •  Run two versions of the same class: F –  Nothing there –  Still the global classpath rules –  When there are version collisions, maven picks one for you J 27
  • 28. Maven •  Complete and mature tooling: A –  Command line build, IDE (m2eclipse), and maven repo •  Integration of tools: A •  Ease of migration: B+ –  Boils down to creating POMs for existing non-maven projects –  Third-party libs are pretty much maven artifacts these days •  Learning curve: B –  Most developers are already familiar with maven –  Maven has its own quirks •  Adoption: A 28
  • 29. Maven: scorecard Hide internals F Enforce modularity D- Assemble application easily B Run two versions of the same class F Complete and mature tooling A Integration of tools A Ease of migration B+ Learning curve B Adoption A Overall C+ 29
  • 30. Project Jigsaw overview •  Part of JDK 8 •  JSR 277, JSR 294 •  Key Features –  Static resolution –  Versioning –  Optional modules –  Permits –  Virtual modules –  Native packaging –  Module-private accessibility at language level 30
  • 31. Jigsaw: module declaration (module-info) •  Source and binary form module a.b @ 1.0 { requires c.d @ [2.0,3.0); // dependencies export e.f.*; // package exported provide g.h @ 4.0; // virtual provider modules permit i.j; // module friendship class k.l; // main class } 31
  • 32. Jigsaw •  Pros –  Native support in JDK (e.g. javac) and language –  Covers build time, install-time, and runtime –  Static resolution may provide optimization & simplicity •  Cons –  Not ready to be used yet –  Less mature, lesser known –  Primary focus is to modularize JDK (but open to others) –  Pace has been slow –  Static resolution means less flexibility at runtime 32
  • 33. Jigsaw •  Hide internals: A •  Enforce modularity: A •  Easy app provisioning & creation: A •  Run two versions of the same class: B 33
  • 34. Jigsaw •  Complete and mature tooling: F •  Integration of tools: F –  Only OpenJDK tools support right now •  Migration concerns: B- –  Extra effort would be given to minimize migration pain since the plan is to modularize JDK –  Some unknown on interoperability with OSGi •  Learning curve: B –  Not much info yet and still evolving (so far does not look too complicated) •  Adoption: F 34
  • 35. Jigsaw: scorecard Hide internals A Enforce modularity A Assemble application easily A Run two versions of the same class B Complete and mature tooling F Integration of tools F Ease of migration B- Learning curve B Adoption F Overall C 35
  • 36. JBoss modules •  Basis for JBoss OSGi & app server •  No container required •  Features –  Exact version match only –  Transitive and non-transitive dependencies –  Optional dependencies –  Import/export filters 36
  • 37. JBoss modules: module declaration <module xmlns="urn:jboss:module:1.0" name="my.module"> <main-class name="my.module.Main"/> <resources> <resource-root path="mymodule.jar"/> </resources> <dependencies> <module name="a.b"/> <module name="c.d" slot="1.3.0"/> <!-- Optional dependencies --> <module name="e.f" optional="true"/> </dependencies> </module> 37
  • 38. JBoss modules •  Pros –  Very simple –  Fast static resolution –  Lightweight (jboss-modules.jar ~240k) •  Cons –  Lacks (public) tools: IDE, command line builds, ... –  Lacks advanced features –  No version ranges: exact match only –  Non-standards based 38
  • 39. JBoss modules •  Hide internals: A –  Can constrain exported packages easily •  Enforce modularity: A •  Easy app provisioning & creation: B –  It is possible by way of resolving and starting the first module –  It is unknown if there is a formal provisioning concept or framework/ library publicly available •  Run two versions of the same class: C –  No version ranges: exact match only –  Has potential to introduce multiple versions unintentionally 39
  • 40. JBoss modules •  Complete and mature tooling: F •  Integration of tools: F •  Migration concerns: D –  Many of the OSGi bad practices would be issues with JBoss modules too •  Learning curve: B –  Relatively simple to learn •  Adoption: D- –  Little adoption outside JBoss itself? 40
  • 41. JBoss modules: scorecard Hide internals A Enforce modularity A Assemble application easily B Run two versions of the same class C Complete and mature tooling F Integration of tools F Ease of migration D Learning curve B Adoption D- Overall C- 41
  • 42. Scorecard OSGi Maven Jigsaw JBoss modules Hide internals A F A A Enforce modularity A D- A A Assemble application easily A B A B Run two versions of the same class B+ F B C Complete and mature tooling B+ A F F Integration of tools D A F F Ease of migration D B+ B- D Learning curve C B B B Adoption B- A F D- Overall B- C+ C C- 42
  • 43. Summary •  OSGi is the only true modularity solution that is “ready” now •  OSGi has challenges in migration and learning curve •  Dearth of integrated tooling is an issue with OSGi •  Maven does not offer much in the way of modularity: no enforcement •  Jigsaw will introduce language level modularity support •  Will there be interoperability between Jigsaw and OSGi? •  JBoss modules shares strong modularity traits with OSGi •  JBoss modules does not offer much tooling 43
  • 44. Thank you! Sangjin Lee: sangjin.lee@ebay.com, twitter @sjlee Tony Ng: tonyng@ebay.com 44