• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
The Brick Wall of Modularity
 

The Brick Wall of Modularity

on

  • 840 views

Or what µServices can mean for you.

Or what µServices can mean for you.

Peter Kriens, OSGi Fellow, aQute

Statistics

Views

Total Views
840
Views on SlideShare
840
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    The Brick Wall of Modularity The Brick Wall of Modularity Presentation Transcript

    • 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 • Conclusionvrijdag 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.htmvrijdag 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.htmvrijdag 25 november 11
    • The Dreamvrijdag 25 november 11
    • The Dream • Adaptive • Flexible B C • Contracts • Robust D E F • Secure • Evolution G H I • Distributedvrijdag 25 november 11
    • The Dream • Adaptive • Flexible A B C • Contracts • Robust D E F • Secure • Evolution G H I • Distributedvrijdag 25 november 11
    • The Dream • Adaptive • Flexible A Ba B Bb C • Contracts • Robust D E F • Secure • Evolution G H I • Distributedvrijdag 25 november 11
    • The Dream • Adaptive • Flexible A Ba Bb C • Contracts • Robust D E F • Secure • Evolution G H I • Distributedvrijdag 25 november 11
    • The Dream • Adaptive • Flexible A Ba Bb C • Contracts • Robust D E F • Secure • Evolution G H I • Distributedvrijdag 25 november 11
    • The Dream • Adaptive • Flexible A Ba Bb C • Contracts • Robust D E F • Secure • Evolution G H I • Distributedvrijdag 25 november 11
    • The Dream • Adaptive • Flexible A Ba Bb C • Contracts • Robust D E F • Secure • Evolution G H I • Distributedvrijdag 25 november 11
    • The Dream • Adaptive • Flexible A Ba Bb C • Contracts • Robust D E F • Secure • Evolution G H • Distributedvrijdag 25 november 11
    • The Dream • Adaptive • Flexible A Ba Bb C • Contracts • Robust D E F • Secure • Evolution G H • Distributedvrijdag 25 november 11
    • The Dream • Adaptive • Flexible A Ba Bb C • Contracts • Robust D E F • Secure • Evolution G H • Distributedvrijdag 25 november 11
    • The Dream • Adaptive • Flexible A Ba Bb C • Contracts • Robust D E F • Secure • Evolution G H • Distributedvrijdag 25 november 11
    • The Dream • Adaptive • Flexible A Ba Bb C • Contracts • Robust D E F • Secure • Evolution G H I v2.0 • Distributedvrijdag 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 • Distributedvrijdag 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 • Distributedvrijdag 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 • Distributedvrijdag 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/q8EHFpvrijdag 25 november 11
    • Modularity Maturity Modelvrijdag 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 worksvrijdag 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 worksvrijdag 25 november 11
    • 2. Managed • Treat JARs as a module • JAR Identity • Naming • Versioning • Dependencies • Repositoriesvrijdag 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 ivrijdag 25 november 11
    • 3. Contracts • Interface based design, POJOs • Provide contracts for each connection between JARs • Implementation details inside the JAR • Versioning on contractsvrijdag 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 contractsvrijdag 25 november 11
    • 4. Fences • Explicitly Import/Export packages • Explicitly specify requirements and capabilities • Enforce the module boundaries • Semantic Versioning • Side-by-side versioning supportedvrijdag 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 supportedvrijdag 25 november 11
    • 5. Optimize • Exploit concepts for modules and contracts • Delegated Control • Optimize the code base to leverage new patterns: • Extender • Whiteboard • Repeatvrijdag 25 november 11
    • 5. Optimize • Exploit concepts for modules and contracts • Delegated Control • Optimize the code base to leverage new patterns: • Extender • Whiteboard • Repeatvrijdag 25 november 11
    • Today 1. Ad Hoc 2. 3. Managed Contracts 4. Fences 5. Optimizevrijdag 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. Optimizevrijdag 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. Optimizevrijdag 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. Optimizevrijdag 25 november 11
    • vrijdag 25 november 11
    • vrijdag 25 november 11
    • Class.forName(String)vrijdag 25 november 11
    • Class Space package classvrijdag 25 november 11
    • Class Space package classvrijdag 25 november 11
    • Class Space package classvrijdag 25 november 11
    • Class Space V1 V2vrijdag 25 november 11
    • Class Space V1 V2vrijdag 25 november 11
    • Class Space V1 V2 Class.forNamevrijdag 25 november 11
    • Class Space V1 V2 x x Class.forNamevrijdag 25 november 11
    • Class Space V1 V2 x x Class.forNamevrijdag 25 november 11
    • Why Class.forName?vrijdag 25 november 11
    • Why Class.forName? ! ! ! ! ! ! ! ! ! ! ! ! N G! P LI C OUvrijdag 25 november 11
    • vrijdag 25 november 11
    • 1. Type Couplingvrijdag 25 november 11
    • 1. Type Coupling 2. Instance Couplingvrijdag 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 implementsvrijdag 25 november 11
    • Type Coupling class Client {} class FooImpl{} interface Foo{} uses implements get instancevrijdag 25 november 11
    • Type Coupling class Client {} class FooImpl{} o r ?l o ut s n einterface Foo{} C s uses implements Is get instancevrijdag 25 november 11
    • Instance Coupling • New • Factory • Inversion of Control • Brokervrijdag 25 november 11
    • Instance Coupling client container impl • New • Factory • Inversion of Control • Brokervrijdag 25 november 11
    • Instance Coupling client container impl • New • Factory • Inversion of Control • Brokervrijdag 25 november 11
    • Instance Coupling client container impl • New • Factory • Inversion of Control • Brokervrijdag 25 november 11
    • Instance Coupling client container impl • New • Factory • Inversion of Control • Brokervrijdag 25 november 11
    • Instance Coupling client container impl • New • Factory • Inversion of Control • Brokervrijdag 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 Mvrijdag 25 november 11
    • µServices Primitive • Broker Pattern • Direction • Contract • Publish • Find • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
    • µServices Primitive • Broker Pattern • Direction • Contract • Publish A S B • Find • Bind • Who’s listening? • Cardinalityvrijdag 25 november 11
    • µServices Primitive • Broker Pattern • Direction • Contract • Publish S • Find • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
    • µServices Primitive • Broker Pattern • Direction • Contract • Publish S • Find • Bind dependency • Who’s Listening? • Cardinalityvrijdag 25 november 11
    • µServices Primitive • Broker Pattern • Direction • Contract • Publish S • Find • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
    • µServices Primitive • Broker Pattern • Direction • Contract • Publish S • Find • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
    • µServices Primitive • Broker Pattern public interface S { void foo(); • Direction } • Contract • Publish S • Find • Bind • Who’s Listening? • Cardinalityvrijdag 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? • Cardinalityvrijdag 25 november 11
    • µServices Primitive • Broker Pattern • Direction • Contract • Publish S • Find • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
    • µServices Primitive • Broker Pattern • Direction • Contract • Publish S • Find • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
    • µServices Primitive • Broker Pattern • Direction • Contract • Publish S register • Find • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
    • µServices Primitive • Broker Pattern • Direction • Contract • Publish S register • Find • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
    • µServices Primitive • Broker Pattern • Direction • Contract • Publish S register • Find • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
    • µServices Primitive • Broker Pattern • Direction • Contract • Publish S register • Find • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
    • µServices Primitive • Broker Pattern • Direction • Contract • Publish S register • Find listen • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
    • µServices Primitive • Broker Pattern • Direction • Contract • Publish S !! register • Find listen • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
    • µServices Primitive • Broker Pattern • Direction • Contract • Publish S register • Find listen • Bind !! • Who’s Listening? • Cardinalityvrijdag 25 november 11
    • µServices Primitive • Broker Pattern • Direction • Contract • Publish S register • Find listen • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
    • µServices Primitive • Broker Pattern • Direction • Contract • Publish get S register • Find listen • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
    • µServices Primitive • Broker Pattern • Direction • Contract • Publish get S register • Find listen • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
    • µServices Primitive • Broker Pattern • Direction • Contract • Publish get S register • Find listen • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
    • µServices Primitive • Broker Pattern • Direction • Contract • Publish get S register • Find listen • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
    • µServices Primitive • Broker Pattern • Direction hook • Contract • Publish get S register • Find listen • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
    • µServices Primitive • Broker Pattern • Direction hook • Contract ?? • Publish get S register • Find listen • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
    • µServices Primitive ?? • Broker Pattern • Direction hook • Contract • Publish get S register • Find listen • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
    • µServices Primitive • Broker Pattern • Direction hook • Contract • Publish get S register • Find listen • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
    • µServices Primitive • Broker Pattern • Direction hook • Contract • Publish get S register • Find listen • Bind • Who’s Listening? • Cardinalityvrijdag 25 november 11
    • Instance Coupling Patterns • Factory • Listener • Discovery • Distributionvrijdag 25 november 11
    • Back to the Brick Wallvrijdag 25 november 11
    • Migration A B C D E F G H Ivrijdag 25 november 11
    • Migration A B C D E F G H Ivrijdag 25 november 11
    • Migration A B C D E F G H Ivrijdag 25 november 11
    • Migration A B C D E F G H Ivrijdag 25 november 11
    • Migration A B C D E F G H Ivrijdag 25 november 11
    • POJOSR • Developed by Karl Pauls • JavaOne presentation 24811 • http://pojosr.googlecode.com • Based on Apache Felixvrijdag 25 november 11
    • Good Fences Make Good Neighborsvrijdag 25 november 11
    • Good Fences od ul es Make Good Neighbors mvrijdag 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.htmvrijdag 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 levelsvrijdag 25 november 11
    • Q&Avrijdag 25 november 11