SlideShare une entreprise Scribd logo
1  sur  107
The Brick Wall of
                           Modularity
                          (or what µServices can mean for you)




                                 Peter Kriens (aQute)




vrijdag 25 november 11
Agenda
                    •    Why OSGi
                    •    Modularity Maturity Model
                    •    The Brick Wall
                    •    Type & Instance Coupling
                    •    µServices
                    •    The Brick Wall Revisited
                    •    Conclusion


vrijdag 25 november 11
Why OSGi?
                                   2010           2003




                                                  1996 1989

                                                         1982   1982


                                                                1975 1968


                                                                     1961




                            Amount of software doubling every 7 years
                         source: http://users.jyu.fi/~koskinen/smcosts.htm


vrijdag 25 november 11
Why OSGi?
                 2010    2003




                         1996 1989
                                                                       2017

                                1982   1982


                                       1975 1968


                                            1961




                            Amount of software doubling every 7 years
                         source: http://users.jyu.fi/~koskinen/smcosts.htm


vrijdag 25 november 11
The Dream




vrijdag 25 november 11
The Dream
                    •    Adaptive
                    •    Flexible
                                            B   C



                    •    Contracts
                    •    Robust         D   E   F

                    •    Secure
                    •    Evolution
                                        G   H   I
                    •    Distributed


vrijdag 25 november 11
The Dream
                    •    Adaptive
                    •    Flexible
                                        A   B   C



                    •    Contracts
                    •    Robust         D   E   F

                    •    Secure
                    •    Evolution
                                        G   H   I
                    •    Distributed


vrijdag 25 november 11
The Dream
                    •    Adaptive
                    •    Flexible
                                        A   Ba B Bb   C



                    •    Contracts
                    •    Robust         D     E       F

                    •    Secure
                    •    Evolution
                                        G     H       I
                    •    Distributed


vrijdag 25 november 11
The Dream
                    •    Adaptive
                    •    Flexible
                                        A   Ba       Bb   C



                    •    Contracts
                    •    Robust         D        E        F

                    •    Secure
                    •    Evolution
                                        G        H        I
                    •    Distributed


vrijdag 25 november 11
The Dream
                    •    Adaptive
                    •    Flexible
                                        A   Ba       Bb   C



                    •    Contracts
                    •    Robust         D        E        F

                    •    Secure
                    •    Evolution
                                        G        H        I
                    •    Distributed


vrijdag 25 november 11
The Dream
                    •    Adaptive
                    •    Flexible
                                        A   Ba       Bb   C



                    •    Contracts
                    •    Robust         D        E        F

                    •    Secure
                    •    Evolution
                                        G        H        I
                    •    Distributed


vrijdag 25 november 11
The Dream
                    •    Adaptive
                    •    Flexible
                                        A   Ba       Bb   C



                    •    Contracts
                    •    Robust         D        E        F

                    •    Secure
                    •    Evolution
                                        G        H        I
                    •    Distributed


vrijdag 25 november 11
The Dream
                    •    Adaptive
                    •    Flexible
                                        A   Ba       Bb   C



                    •    Contracts
                    •    Robust         D        E        F

                    •    Secure
                    •    Evolution
                                        G        H
                    •    Distributed


vrijdag 25 november 11
The Dream
                    •    Adaptive
                    •    Flexible
                                        A   Ba       Bb   C



                    •    Contracts
                    •    Robust         D        E        F

                    •    Secure
                    •    Evolution
                                        G        H
                    •    Distributed


vrijdag 25 november 11
The Dream
                    •    Adaptive
                    •    Flexible
                                        A   Ba       Bb   C



                    •    Contracts
                    •    Robust         D        E        F

                    •    Secure
                    •    Evolution
                                        G        H
                    •    Distributed


vrijdag 25 november 11
The Dream
                    •    Adaptive
                    •    Flexible
                                        A   Ba       Bb   C



                    •    Contracts
                    •    Robust         D        E        F

                    •    Secure
                    •    Evolution
                                        G        H
                    •    Distributed


vrijdag 25 november 11
The Dream
                    •    Adaptive
                    •    Flexible
                                        A   Ba       Bb     C



                    •    Contracts
                    •    Robust         D        E          F

                    •    Secure
                    •    Evolution
                                        G        H        I v2.0
                    •    Distributed


vrijdag 25 november 11
The Dream
                    •    Adaptive
                    •    Flexible
                                        A   Ba       Bb     C



                    •    Contracts
                    •    Robust         D        E          F

                    •    Secure                                 S;1.1.0


                    •    Evolution
                                        G        H        I v2.0
                    •    Distributed


vrijdag 25 november 11
The Dream
                    •    Adaptive
                    •    Flexible
                                        A   Ba       Bb     C



                    •    Contracts
                    •    Robust         D        E          F

                    •    Secure                                 S;1.1.0


                    •    Evolution
                                        G        H        I v2.0
                    •    Distributed


vrijdag 25 november 11
The Dream
                    •    Adaptive
                    •    Flexible
                                        A   Ba       Bb



                    •    Contracts
                    •    Robust         D        E          F

                    •    Secure                                 S;1.1.0


                    •    Evolution
                                        G        H        I v2.0
                    •    Distributed


vrijdag 25 november 11
Modularity Maturity
                              Model
                    •    1 Ad Hoc

                    •    2 Managed

                    •    3 Contracts

                    •    4 Fences             Page 2   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
                                                       © IBM Corp. 2011
                                                                                                                    21.09.2011




                    •
                                       Inspired by Graham Charters’ excellent OSGi Community Event 2011
                         5 Optimize    presentation @ http://slidesha.re/q8EHFp




vrijdag 25 november 11
Modularity Maturity
                              Model




vrijdag 25 november 11
1. Ad Hoc
                    •    Flat, manual class path

                    •    Single name space

                    •    Full visibility and normal
                         accessibility

                    •    Monolithic

                    •    Highly coupled

                    •    Split Packages

                    •    Add/Shuffle JARs until it works




vrijdag 25 november 11
1. Ad Hoc
                    •    Flat, manual class path

                    •    Single name space



                                                                e l l
                                                               H
                    •    Full visibility and normal
                         accessibility

                    •    Monolithic


                                                            AR
                    •
                    •
                         Highly coupled

                         Split Packages                   J
                    •    Add/Shuffle JARs until it works




vrijdag 25 november 11
2. Managed
                    •    Treat JARs as a module

                    •    JAR Identity

                         •   Naming

                         •   Versioning

                    •    Dependencies

                    •    Repositories



vrijdag 25 november 11
2. Managed
                                                           a d
                    •    Treat JARs as a module


                                                      n l o
                                                     w he t
                    •    JAR Identity

                         •   Naming

                                                  D o t
                         •   Versioning

                                                              r n e
                    •    Dependencies


                                                        n t e
                    •    Repositories
                                                      i
vrijdag 25 november 11
3. Contracts
                    •    Interface based design,
                         POJOs

                    •    Provide contracts for
                         each connection
                         between JARs

                    •    Implementation details
                         inside the JAR

                    •    Versioning on contracts



vrijdag 25 november 11
3. Contracts
                    •
                                                          d e r
                                                           a
                         Interface based design,


                                                          o
                         POJOs

                    •    Provide contracts for
                                                         l s
                                                        s k
                                                       s c
                                                      a a
                         each connection


                                                     l h
                         between JARs

                    •    Implementation details
                         inside the JAR            c
                    •    Versioning on contracts



vrijdag 25 november 11
4. Fences
                    •    Explicitly Import/Export
                         packages

                    •    Explicitly specify
                         requirements and capabilities

                    •    Enforce the module
                         boundaries

                    •    Semantic Versioning

                    •    Side-by-side versioning
                         supported




vrijdag 25 november 11
4. Fences
                    •    Explicitly Import/Export
                         packages

                    •    Explicitly specify
                         requirements and capabilities

                                                            o d!
                    •

                    •
                         Enforce the module
                         boundaries

                         Semantic Versioning
                                                         Go
                    •    Side-by-side versioning
                         supported




vrijdag 25 november 11
5. Optimize
                    •    Exploit concepts for
                         modules and contracts

                    •    Delegated Control

                    •    Optimize the code base to
                         leverage new patterns:

                         •   Extender

                         •   Whiteboard

                    •    Repeat



vrijdag 25 november 11
5. Optimize
                    •    Exploit concepts for
                         modules and contracts

                    •    Delegated Control

                    •    Optimize the code base to
                         leverage new patterns:

                         •   Extender

                         •   Whiteboard

                    •    Repeat



vrijdag 25 november 11
Today
                                      1.
                                    Ad Hoc




                           2.                     3.
                         Managed               Contracts



                                       4.
                                     Fences



                                       5.
                                    Optimize


vrijdag 25 november 11
Today
                                                1.
                                              Ad Hoc            Enterprise

                                                                             DI
                            vn                                            ,C
                          m                                            ice ing
                                     2.                     3.
                             Ivy   Managed               Contracts
                                                                     gu r
                             saw                                       sp
                         jig
                                                 4.
                                               Fences



                                                 5.
                                              Optimize


vrijdag 25 november 11
Today
                                                1.
                                              Ad Hoc            Enterprise

                                                                             DI
                            vn                                             ,C
                          m                                            ice ing
                                     2.                     3.
                             Ivy   Managed               Contracts
                                                                     gu r       OSGi
                             saw                                       s p
                         jig
                                                 4.
                                               Fences



                                                 5.
                                              Optimize


vrijdag 25 november 11
Today
                                                1.
                                              Ad Hoc            Enterprise

                                                                             DI
                            vn                                             ,C
                          m                                            ice ing
                                     2.                     3.
                             Ivy   Managed               Contracts
                                                                     gu r       OSGi
                             saw                                       s p
                         jig
                                                 4.
                                               Fences



                                                 5.
                                              Optimize


vrijdag 25 november 11
vrijdag 25 november 11
vrijdag 25 november 11
Class.forName(String)




vrijdag 25 november 11
Class Space
                         package

                         class




vrijdag 25 november 11
Class Space
                         package

                         class




vrijdag 25 november 11
Class Space
                         package

                         class




vrijdag 25 november 11
Class Space


                               V1      V2




vrijdag 25 november 11
Class Space


                               V1      V2




vrijdag 25 november 11
Class Space


                                         V1   V2




                         Class.forName


vrijdag 25 november 11
Class Space


                                                 V1   V2




                         x                   x
                             Class.forName


vrijdag 25 november 11
Class Space


                                                 V1   V2




                         x                   x
                             Class.forName


vrijdag 25 november 11
Why Class.forName?




vrijdag 25 november 11
Why Class.forName?
                                                                 ! ! !
                                                         ! ! !
                                                 ! ! !
                                         ! ! !
                                  N G!
                             P LI
                         C OU
vrijdag 25 november 11
vrijdag 25 november 11
1. Type Coupling




vrijdag 25 november 11
1. Type Coupling

                         2. Instance Coupling


vrijdag 25 november 11
Coupling

                                modular    not Example
                                          modular

                         type                   FooImpl foo;


                                                Foo foo = (Foo)
                   instance                       Class.forName(“FooImpl”)
                                                     .newInstance();




vrijdag 25 november 11
Type Coupling
                         class Client {}   class FooImpl{}




vrijdag 25 november 11
Type Coupling
                         class Client {}   class FooImpl{}




vrijdag 25 november 11
Type Coupling
                         class Client {}                     class FooImpl{}




                                           interface Foo{}




vrijdag 25 november 11
Type Coupling
                         class Client {}                     class FooImpl{}




                                           interface Foo{}

                                    uses              implements




vrijdag 25 november 11
Type Coupling
                         class Client {}                     class FooImpl{}




                                           interface Foo{}

                                    uses              implements



                                             get instance




vrijdag 25 november 11
Type Coupling
                         class Client {}                     class FooImpl{}




                                            o
                                           r ?l
                                       o ut s
                                        n einterface Foo{}



                                      C s
                                    uses              implements




                                        Is   get instance




vrijdag 25 november 11
Instance Coupling

                    •    New

                    •    Factory

                    •    Inversion of Control

                    •    Broker




vrijdag 25 november 11
Instance Coupling
                                                client   container   impl

                    •    New

                    •    Factory

                    •    Inversion of Control

                    •    Broker




vrijdag 25 november 11
Instance Coupling
                                                client   container   impl

                    •    New

                    •    Factory

                    •    Inversion of Control

                    •    Broker




vrijdag 25 november 11
Instance Coupling
                                                client   container   impl

                    •    New

                    •    Factory

                    •    Inversion of Control

                    •    Broker




vrijdag 25 november 11
Instance Coupling
                                                client   container   impl

                    •    New

                    •    Factory

                    •    Inversion of Control

                    •    Broker




vrijdag 25 november 11
Instance Coupling
                                                client   container   impl

                    •    New

                    •    Factory

                    •    Inversion of Control

                    •    Broker




vrijdag 25 november 11
Instance Coupling
                                              t
                                             o ?
                                            n ?
                                           g ??
                                                client   container   impl

                    •
                                        i n r
                         New

                    •
                    •
                         Factory


                                   S ur a
                                    p l
                         Inversion of Control

                    •    Broker
                                      o d
                                    M
vrijdag 25 november 11
µServices Primitive
                    •    Broker Pattern

                    •    Direction

                    •    Contract

                    •    Publish

                    •    Find

                    •    Bind

                    •    Who’s Listening?

                    •    Cardinality



vrijdag 25 november 11
µServices Primitive
                    •    Broker Pattern

                    •    Direction

                    •    Contract

                    •    Publish            A   S   B
                    •    Find

                    •    Bind

                    •    Who’s listening?

                    •    Cardinality



vrijdag 25 november 11
µServices Primitive
                    •    Broker Pattern

                    •    Direction

                    •    Contract

                    •    Publish
                                            S
                    •    Find

                    •    Bind

                    •    Who’s Listening?

                    •    Cardinality



vrijdag 25 november 11
µServices Primitive
                    •    Broker Pattern

                    •    Direction

                    •    Contract

                    •    Publish
                                            S
                    •    Find

                    •    Bind               dependency

                    •    Who’s Listening?

                    •    Cardinality



vrijdag 25 november 11
µServices Primitive
                    •    Broker Pattern

                    •    Direction

                    •    Contract

                    •    Publish
                                            S
                    •    Find

                    •    Bind

                    •    Who’s Listening?

                    •    Cardinality



vrijdag 25 november 11
µServices Primitive
                    •    Broker Pattern

                    •    Direction

                    •    Contract

                    •    Publish
                                            S
                    •    Find

                    •    Bind

                    •    Who’s Listening?

                    •    Cardinality



vrijdag 25 november 11
µServices Primitive
                    •    Broker Pattern     public interface S {
                                                void foo();
                    •    Direction          }


                    •    Contract

                    •    Publish
                                                     S
                    •    Find

                    •    Bind

                    •    Who’s Listening?

                    •    Cardinality



vrijdag 25 november 11
µServices Primitive
                                            package com.acme.foo;
                    •    Broker Pattern     public interface S {
                                                void foo();
                    •    Direction          }


                    •    Contract

                    •    Publish
                                                     S
                    •    Find

                    •    Bind

                    •    Who’s Listening?

                    •    Cardinality



vrijdag 25 november 11
µServices Primitive
                    •    Broker Pattern

                    •    Direction

                    •    Contract

                    •    Publish
                                            S
                    •    Find

                    •    Bind

                    •    Who’s Listening?

                    •    Cardinality



vrijdag 25 november 11
µServices Primitive
                    •    Broker Pattern

                    •    Direction

                    •    Contract

                    •    Publish
                                            S
                    •    Find

                    •    Bind

                    •    Who’s Listening?

                    •    Cardinality



vrijdag 25 november 11
µServices Primitive
                    •    Broker Pattern

                    •    Direction

                    •    Contract

                    •    Publish
                                            S   register
                    •    Find

                    •    Bind

                    •    Who’s Listening?

                    •    Cardinality



vrijdag 25 november 11
µServices Primitive
                    •    Broker Pattern

                    •    Direction

                    •    Contract

                    •    Publish
                                            S   register
                    •    Find

                    •    Bind

                    •    Who’s Listening?

                    •    Cardinality



vrijdag 25 november 11
µServices Primitive
                    •    Broker Pattern

                    •    Direction

                    •    Contract

                    •    Publish
                                            S   register
                    •    Find

                    •    Bind

                    •    Who’s Listening?

                    •    Cardinality



vrijdag 25 november 11
µServices Primitive
                    •    Broker Pattern

                    •    Direction

                    •    Contract

                    •    Publish
                                            S   register
                    •    Find

                    •    Bind

                    •    Who’s Listening?

                    •    Cardinality



vrijdag 25 november 11
µServices Primitive
                    •    Broker Pattern

                    •    Direction

                    •    Contract

                    •    Publish
                                            S      register
                    •    Find
                                                listen
                    •    Bind

                    •    Who’s Listening?

                    •    Cardinality



vrijdag 25 november 11
µServices Primitive
                    •    Broker Pattern

                    •    Direction

                    •    Contract

                    •    Publish
                                            S    !!
                                                      register
                    •    Find
                                                listen
                    •    Bind

                    •    Who’s Listening?

                    •    Cardinality



vrijdag 25 november 11
µServices Primitive
                    •    Broker Pattern

                    •    Direction

                    •    Contract

                    •    Publish
                                            S         register
                    •    Find
                                                listen
                    •    Bind
                                                 !!

                    •    Who’s Listening?

                    •    Cardinality



vrijdag 25 november 11
µServices Primitive
                    •    Broker Pattern

                    •    Direction

                    •    Contract

                    •    Publish
                                            S      register
                    •    Find
                                                listen
                    •    Bind

                    •    Who’s Listening?

                    •    Cardinality



vrijdag 25 november 11
µServices Primitive
                    •    Broker Pattern

                    •    Direction

                    •    Contract

                    •    Publish
                                            get   S      register
                    •    Find
                                                      listen
                    •    Bind

                    •    Who’s Listening?

                    •    Cardinality



vrijdag 25 november 11
µServices Primitive
                    •    Broker Pattern

                    •    Direction

                    •    Contract

                    •    Publish
                                            get   S      register
                    •    Find
                                                      listen
                    •    Bind

                    •    Who’s Listening?

                    •    Cardinality



vrijdag 25 november 11
µServices Primitive
                    •    Broker Pattern

                    •    Direction

                    •    Contract

                    •    Publish
                                            get   S      register
                    •    Find
                                                      listen
                    •    Bind

                    •    Who’s Listening?

                    •    Cardinality



vrijdag 25 november 11
µServices Primitive
                    •    Broker Pattern

                    •    Direction

                    •    Contract

                    •    Publish
                                            get   S      register
                    •    Find
                                                      listen
                    •    Bind

                    •    Who’s Listening?

                    •    Cardinality



vrijdag 25 november 11
µServices Primitive
                    •    Broker Pattern

                    •    Direction                hook

                    •    Contract

                    •    Publish
                                            get     S       register
                    •    Find
                                                         listen
                    •    Bind

                    •    Who’s Listening?

                    •    Cardinality



vrijdag 25 november 11
µServices Primitive
                    •    Broker Pattern

                    •    Direction                hook

                    •    Contract                          ??

                    •    Publish
                                            get     S           register
                    •    Find
                                                         listen
                    •    Bind

                    •    Who’s Listening?

                    •    Cardinality



vrijdag 25 november 11
µServices Primitive
                                                           ??
                    •    Broker Pattern

                    •    Direction                hook

                    •    Contract

                    •    Publish
                                            get     S           register
                    •    Find
                                                         listen
                    •    Bind

                    •    Who’s Listening?

                    •    Cardinality



vrijdag 25 november 11
µServices Primitive
                    •    Broker Pattern

                    •    Direction                hook

                    •    Contract

                    •    Publish
                                            get     S       register
                    •    Find
                                                         listen
                    •    Bind

                    •    Who’s Listening?

                    •    Cardinality



vrijdag 25 november 11
µServices Primitive
                    •    Broker Pattern

                    •    Direction                hook

                    •    Contract

                    •    Publish
                                            get     S       register
                    •    Find
                                                         listen
                    •    Bind

                    •    Who’s Listening?

                    •    Cardinality



vrijdag 25 november 11
Instance Coupling
                                 Patterns
                    •    Factory

                    •    Listener

                    •    Discovery

                    •    Distribution




vrijdag 25 november 11
Back to the Brick Wall




vrijdag 25 november 11
Migration
                         A   B   C




                         D   E   F




                         G   H   I




vrijdag 25 november 11
Migration
                         A   B   C




                         D   E   F




                         G   H   I




vrijdag 25 november 11
Migration
                         A   B   C




                         D   E   F




                         G   H   I




vrijdag 25 november 11
Migration
                         A   B   C




                         D   E   F




                         G   H   I




vrijdag 25 november 11
Migration
                         A   B   C




                         D   E   F




                         G   H   I




vrijdag 25 november 11
POJOSR

                    • Developed by Karl Pauls
                    • JavaOne presentation 24811
                    • http://pojosr.googlecode.com
                    • Based on Apache Felix

vrijdag 25 november 11
Good Fences
                         Make Good Neighbors




vrijdag 25 november 11
Good Fences
                                     od ul es
                         Make Good Neighbors
                                   m



vrijdag 25 november 11
Conclusion
                  2010   2003




                                                                       2017
                         1996 1989

                                1982   1982


                                       1975 1968


                                            1961




                           Amount of software doubling every 7 years
                         source: http://users.jyu.fi/~koskinen/smcosts.htm


vrijdag 25 november 11
OSGi
                    •    Legacy and backward compatibility is important
                    •    Modularizing is hard
                         •   Many popular Java patterns are fundamentally
                             not modular
                    •    In the next 7 years, we double the amount of
                         software
                    •    Investment in modularity has a great ROI!


vrijdag 25 november 11
Join!
                    • Help us to achieve our vision to make
                         software simpler to develop
                    • Provide Requirements
                    • Develop specifications
                    • Help the community
                    • OSGi Alliance restructured to provide
                         lower-cost membership levels


vrijdag 25 november 11
Q&A




vrijdag 25 november 11

Contenu connexe

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 

En vedette

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

En vedette (20)

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 

The Brick Wall of Modularity

  • 1. The Brick Wall of Modularity (or what µServices can mean for you) Peter Kriens (aQute) vrijdag 25 november 11
  • 2. Agenda • Why OSGi • Modularity Maturity Model • The Brick Wall • Type & Instance Coupling • µServices • The Brick Wall Revisited • Conclusion vrijdag 25 november 11
  • 3. Why OSGi? 2010 2003 1996 1989 1982 1982 1975 1968 1961 Amount of software doubling every 7 years source: http://users.jyu.fi/~koskinen/smcosts.htm vrijdag 25 november 11
  • 4. Why OSGi? 2010 2003 1996 1989 2017 1982 1982 1975 1968 1961 Amount of software doubling every 7 years source: http://users.jyu.fi/~koskinen/smcosts.htm vrijdag 25 november 11
  • 5. The Dream vrijdag 25 november 11
  • 6. The Dream • Adaptive • Flexible B C • Contracts • Robust D E F • Secure • Evolution G H I • Distributed vrijdag 25 november 11
  • 7. The Dream • Adaptive • Flexible A B C • Contracts • Robust D E F • Secure • Evolution G H I • Distributed vrijdag 25 november 11
  • 8. The Dream • Adaptive • Flexible A Ba B Bb C • Contracts • Robust D E F • Secure • Evolution G H I • Distributed vrijdag 25 november 11
  • 9. The Dream • Adaptive • Flexible A Ba Bb C • Contracts • Robust D E F • Secure • Evolution G H I • Distributed vrijdag 25 november 11
  • 10. The Dream • Adaptive • Flexible A Ba Bb C • Contracts • Robust D E F • Secure • Evolution G H I • Distributed vrijdag 25 november 11
  • 11. The Dream • Adaptive • Flexible A Ba Bb C • Contracts • Robust D E F • Secure • Evolution G H I • Distributed vrijdag 25 november 11
  • 12. The Dream • Adaptive • Flexible A Ba Bb C • Contracts • Robust D E F • Secure • Evolution G H I • Distributed vrijdag 25 november 11
  • 13. The Dream • Adaptive • Flexible A Ba Bb C • Contracts • Robust D E F • Secure • Evolution G H • Distributed vrijdag 25 november 11
  • 14. The Dream • Adaptive • Flexible A Ba Bb C • Contracts • Robust D E F • Secure • Evolution G H • Distributed vrijdag 25 november 11
  • 15. The Dream • Adaptive • Flexible A Ba Bb C • Contracts • Robust D E F • Secure • Evolution G H • Distributed vrijdag 25 november 11
  • 16. The Dream • Adaptive • Flexible A Ba Bb C • Contracts • Robust D E F • Secure • Evolution G H • Distributed vrijdag 25 november 11
  • 17. The Dream • Adaptive • Flexible A Ba Bb C • Contracts • Robust D E F • Secure • Evolution G H I v2.0 • Distributed vrijdag 25 november 11
  • 18. The Dream • Adaptive • Flexible A Ba Bb C • Contracts • Robust D E F • Secure S;1.1.0 • Evolution G H I v2.0 • Distributed vrijdag 25 november 11
  • 19. The Dream • Adaptive • Flexible A Ba Bb C • Contracts • Robust D E F • Secure S;1.1.0 • Evolution G H I v2.0 • Distributed vrijdag 25 november 11
  • 20. The Dream • Adaptive • Flexible A Ba Bb • Contracts • Robust D E F • Secure S;1.1.0 • Evolution G H I v2.0 • Distributed vrijdag 25 november 11
  • 21. Modularity Maturity Model • 1 Ad Hoc • 2 Managed • 3 Contracts • 4 Fences Page 2 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011 21.09.2011 • Inspired by Graham Charters’ excellent OSGi Community Event 2011 5 Optimize presentation @ http://slidesha.re/q8EHFp vrijdag 25 november 11
  • 22. Modularity Maturity Model vrijdag 25 november 11
  • 23. 1. Ad Hoc • Flat, manual class path • Single name space • Full visibility and normal accessibility • Monolithic • Highly coupled • Split Packages • Add/Shuffle JARs until it works vrijdag 25 november 11
  • 24. 1. Ad Hoc • Flat, manual class path • Single name space e l l H • Full visibility and normal accessibility • Monolithic AR • • Highly coupled Split Packages J • Add/Shuffle JARs until it works vrijdag 25 november 11
  • 25. 2. Managed • Treat JARs as a module • JAR Identity • Naming • Versioning • Dependencies • Repositories vrijdag 25 november 11
  • 26. 2. Managed a d • Treat JARs as a module n l o w he t • JAR Identity • Naming D o t • Versioning r n e • Dependencies n t e • Repositories i vrijdag 25 november 11
  • 27. 3. Contracts • Interface based design, POJOs • Provide contracts for each connection between JARs • Implementation details inside the JAR • Versioning on contracts vrijdag 25 november 11
  • 28. 3. Contracts • d e r a Interface based design, o POJOs • Provide contracts for l s s k s c a a each connection l h between JARs • Implementation details inside the JAR c • Versioning on contracts vrijdag 25 november 11
  • 29. 4. Fences • Explicitly Import/Export packages • Explicitly specify requirements and capabilities • Enforce the module boundaries • Semantic Versioning • Side-by-side versioning supported vrijdag 25 november 11
  • 30. 4. Fences • Explicitly Import/Export packages • Explicitly specify requirements and capabilities o d! • • Enforce the module boundaries Semantic Versioning Go • Side-by-side versioning supported vrijdag 25 november 11
  • 31. 5. Optimize • Exploit concepts for modules and contracts • Delegated Control • Optimize the code base to leverage new patterns: • Extender • Whiteboard • Repeat vrijdag 25 november 11
  • 32. 5. Optimize • Exploit concepts for modules and contracts • Delegated Control • Optimize the code base to leverage new patterns: • Extender • Whiteboard • Repeat vrijdag 25 november 11
  • 33. Today 1. Ad Hoc 2. 3. Managed Contracts 4. Fences 5. Optimize vrijdag 25 november 11
  • 34. Today 1. Ad Hoc Enterprise DI vn ,C m ice ing 2. 3. Ivy Managed Contracts gu r saw sp jig 4. Fences 5. Optimize vrijdag 25 november 11
  • 35. Today 1. Ad Hoc Enterprise DI vn ,C m ice ing 2. 3. Ivy Managed Contracts gu r OSGi saw s p jig 4. Fences 5. Optimize vrijdag 25 november 11
  • 36. Today 1. Ad Hoc Enterprise DI vn ,C m ice ing 2. 3. Ivy Managed Contracts gu r OSGi saw s p jig 4. Fences 5. Optimize vrijdag 25 november 11
  • 40. Class Space package class vrijdag 25 november 11
  • 41. Class Space package class vrijdag 25 november 11
  • 42. Class Space package class vrijdag 25 november 11
  • 43. Class Space V1 V2 vrijdag 25 november 11
  • 44. Class Space V1 V2 vrijdag 25 november 11
  • 45. Class Space V1 V2 Class.forName vrijdag 25 november 11
  • 46. Class Space V1 V2 x x Class.forName vrijdag 25 november 11
  • 47. Class Space V1 V2 x x Class.forName vrijdag 25 november 11
  • 49. Why Class.forName? ! ! ! ! ! ! ! ! ! ! ! ! N G! P LI C OU vrijdag 25 november 11
  • 51. 1. Type Coupling vrijdag 25 november 11
  • 52. 1. Type Coupling 2. Instance Coupling vrijdag 25 november 11
  • 53. Coupling modular not Example modular type FooImpl foo; Foo foo = (Foo) instance Class.forName(“FooImpl”) .newInstance(); vrijdag 25 november 11
  • 54. Type Coupling class Client {} class FooImpl{} vrijdag 25 november 11
  • 55. Type Coupling class Client {} class FooImpl{} vrijdag 25 november 11
  • 56. Type Coupling class Client {} class FooImpl{} interface Foo{} vrijdag 25 november 11
  • 57. Type Coupling class Client {} class FooImpl{} interface Foo{} uses implements vrijdag 25 november 11
  • 58. Type Coupling class Client {} class FooImpl{} interface Foo{} uses implements get instance vrijdag 25 november 11
  • 59. Type Coupling class Client {} class FooImpl{} o r ?l o ut s n einterface Foo{} C s uses implements Is get instance vrijdag 25 november 11
  • 60. Instance Coupling • New • Factory • Inversion of Control • Broker vrijdag 25 november 11
  • 61. Instance Coupling client container impl • New • Factory • Inversion of Control • Broker vrijdag 25 november 11
  • 62. Instance Coupling client container impl • New • Factory • Inversion of Control • Broker vrijdag 25 november 11
  • 63. Instance Coupling client container impl • New • Factory • Inversion of Control • Broker vrijdag 25 november 11
  • 64. Instance Coupling client container impl • New • Factory • Inversion of Control • Broker vrijdag 25 november 11
  • 65. Instance Coupling client container impl • New • Factory • Inversion of Control • Broker vrijdag 25 november 11
  • 66. Instance Coupling t o ? n ? g ?? client container impl • i n r New • • Factory S ur a p l Inversion of Control • Broker o d M vrijdag 25 november 11
  • 67. µServices Primitive • Broker Pattern • Direction • Contract • Publish • Find • Bind • Who’s Listening? • Cardinality vrijdag 25 november 11
  • 68. µServices Primitive • Broker Pattern • Direction • Contract • Publish A S B • Find • Bind • Who’s listening? • Cardinality vrijdag 25 november 11
  • 69. µServices Primitive • Broker Pattern • Direction • Contract • Publish S • Find • Bind • Who’s Listening? • Cardinality vrijdag 25 november 11
  • 70. µServices Primitive • Broker Pattern • Direction • Contract • Publish S • Find • Bind dependency • Who’s Listening? • Cardinality vrijdag 25 november 11
  • 71. µServices Primitive • Broker Pattern • Direction • Contract • Publish S • Find • Bind • Who’s Listening? • Cardinality vrijdag 25 november 11
  • 72. µServices Primitive • Broker Pattern • Direction • Contract • Publish S • Find • Bind • Who’s Listening? • Cardinality vrijdag 25 november 11
  • 73. µServices Primitive • Broker Pattern public interface S { void foo(); • Direction } • Contract • Publish S • Find • Bind • Who’s Listening? • Cardinality vrijdag 25 november 11
  • 74. µServices Primitive package com.acme.foo; • Broker Pattern public interface S { void foo(); • Direction } • Contract • Publish S • Find • Bind • Who’s Listening? • Cardinality vrijdag 25 november 11
  • 75. µServices Primitive • Broker Pattern • Direction • Contract • Publish S • Find • Bind • Who’s Listening? • Cardinality vrijdag 25 november 11
  • 76. µServices Primitive • Broker Pattern • Direction • Contract • Publish S • Find • Bind • Who’s Listening? • Cardinality vrijdag 25 november 11
  • 77. µServices Primitive • Broker Pattern • Direction • Contract • Publish S register • Find • Bind • Who’s Listening? • Cardinality vrijdag 25 november 11
  • 78. µServices Primitive • Broker Pattern • Direction • Contract • Publish S register • Find • Bind • Who’s Listening? • Cardinality vrijdag 25 november 11
  • 79. µServices Primitive • Broker Pattern • Direction • Contract • Publish S register • Find • Bind • Who’s Listening? • Cardinality vrijdag 25 november 11
  • 80. µServices Primitive • Broker Pattern • Direction • Contract • Publish S register • Find • Bind • Who’s Listening? • Cardinality vrijdag 25 november 11
  • 81. µServices Primitive • Broker Pattern • Direction • Contract • Publish S register • Find listen • Bind • Who’s Listening? • Cardinality vrijdag 25 november 11
  • 82. µServices Primitive • Broker Pattern • Direction • Contract • Publish S !! register • Find listen • Bind • Who’s Listening? • Cardinality vrijdag 25 november 11
  • 83. µServices Primitive • Broker Pattern • Direction • Contract • Publish S register • Find listen • Bind !! • Who’s Listening? • Cardinality vrijdag 25 november 11
  • 84. µServices Primitive • Broker Pattern • Direction • Contract • Publish S register • Find listen • Bind • Who’s Listening? • Cardinality vrijdag 25 november 11
  • 85. µServices Primitive • Broker Pattern • Direction • Contract • Publish get S register • Find listen • Bind • Who’s Listening? • Cardinality vrijdag 25 november 11
  • 86. µServices Primitive • Broker Pattern • Direction • Contract • Publish get S register • Find listen • Bind • Who’s Listening? • Cardinality vrijdag 25 november 11
  • 87. µServices Primitive • Broker Pattern • Direction • Contract • Publish get S register • Find listen • Bind • Who’s Listening? • Cardinality vrijdag 25 november 11
  • 88. µServices Primitive • Broker Pattern • Direction • Contract • Publish get S register • Find listen • Bind • Who’s Listening? • Cardinality vrijdag 25 november 11
  • 89. µServices Primitive • Broker Pattern • Direction hook • Contract • Publish get S register • Find listen • Bind • Who’s Listening? • Cardinality vrijdag 25 november 11
  • 90. µServices Primitive • Broker Pattern • Direction hook • Contract ?? • Publish get S register • Find listen • Bind • Who’s Listening? • Cardinality vrijdag 25 november 11
  • 91. µServices Primitive ?? • Broker Pattern • Direction hook • Contract • Publish get S register • Find listen • Bind • Who’s Listening? • Cardinality vrijdag 25 november 11
  • 92. µServices Primitive • Broker Pattern • Direction hook • Contract • Publish get S register • Find listen • Bind • Who’s Listening? • Cardinality vrijdag 25 november 11
  • 93. µServices Primitive • Broker Pattern • Direction hook • Contract • Publish get S register • Find listen • Bind • Who’s Listening? • Cardinality vrijdag 25 november 11
  • 94. Instance Coupling Patterns • Factory • Listener • Discovery • Distribution vrijdag 25 november 11
  • 95. Back to the Brick Wall vrijdag 25 november 11
  • 96. Migration A B C D E F G H I vrijdag 25 november 11
  • 97. Migration A B C D E F G H I vrijdag 25 november 11
  • 98. Migration A B C D E F G H I vrijdag 25 november 11
  • 99. Migration A B C D E F G H I vrijdag 25 november 11
  • 100. Migration A B C D E F G H I vrijdag 25 november 11
  • 101. POJOSR • Developed by Karl Pauls • JavaOne presentation 24811 • http://pojosr.googlecode.com • Based on Apache Felix vrijdag 25 november 11
  • 102. Good Fences Make Good Neighbors vrijdag 25 november 11
  • 103. Good Fences od ul es Make Good Neighbors m vrijdag 25 november 11
  • 104. Conclusion 2010 2003 2017 1996 1989 1982 1982 1975 1968 1961 Amount of software doubling every 7 years source: http://users.jyu.fi/~koskinen/smcosts.htm vrijdag 25 november 11
  • 105. OSGi • Legacy and backward compatibility is important • Modularizing is hard • Many popular Java patterns are fundamentally not modular • In the next 7 years, we double the amount of software • Investment in modularity has a great ROI! vrijdag 25 november 11
  • 106. Join! • Help us to achieve our vision to make software simpler to develop • Provide Requirements • Develop specifications • Help the community • OSGi Alliance restructured to provide lower-cost membership levels vrijdag 25 november 11