OSGi at a Large-Scale Enterprise<br />Lessons from eBay<br />Justin Early, Sangjin Lee, & DebashisSaha<br />eBay Inc.<br />
Agenda<br />Case for enterprise OSGi<br />Speaking of scale...<br />Migration challenges & observations<br />IDE & build<b...
Case for enterprise OSGi<br />For all its virtues, OSGi is still a hard sell in (large scale) enterprises<br />Why?<br />3...
Case for enterprise OSGi<br />Modularity: warm<br />Runtime dynamism: not so much<br />Operations needs predictability<br ...
Modularity<br />Modularity is perhaps the best driver for OSGi in the enterprise<br />Reduce surface areas<br />Reduce cou...
Cost-benefit analysis<br />Modularity benefits are long term, but the migration pain is immediate<br />The very SCALE whic...
It feels like...<br />7<br />
Speaking of scale...<br />eBay’s code base has<br />Thousands of jars<br />Tens of thousands of packages<br />Hundreds of ...
Migration observations<br />Everything needs to be in a bundle<br />We’re finding a lot of existing problems to clean up<b...
Migration challenges<br />What should be my module granularity?<br />Package control policy<br />Import-Package v. Require...
Migration challenges<br />Limiting use of OSGi services<br />Scale of development teams: training and support<br />11<br />
Eclipse and OSGi<br />Java Jars<br />
Evolution<br /><ul><li>Each tool adds required libraries as Bundle-Classpath entries
Convert Jars to Bundles using aQute's BND tool
Convert Library Projects into one plugin project using PDE tooling and use use it for build and compile time.</li></li></u...
Upcoming SlideShare
Loading in …5
×

OSGi at eBay

746
-1

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
746
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
12
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • Do we need to adopt Plugin Development Environment (PDE) or Java Development Envrionment? Do we change how we develop or can we just use POJO projects?We find that PDE in eclipse can build plugins if we handcraft manifest.mf and use the manifest editorWe have used BND to generate manifest.mf and export bundles from our existing POJO build processWhat (headless) build framework will scale?Module-aware builds – like the idea of javac wrapper to compile from a list of modules
  • Can OSGi help with managing a Java API other than basic Java access?Developer classpath construction is minimized: this is important with a very large number of librariesTools to help exploring the modulesPromising Workspace materialization leveraging OSGi metadataControl packages that are exportedControl packages that are shared between modules (friend)Control packages that are internal.API baseline management and tooling is being added to PDE tooling in EclipseCompiler will highlight packages that are discouraged from usage and not available for usage.Number of dependencies have increased the size of the classpath causing order issues and issues with cross packages which could be caught with a module system.Visual tools for seeing dependencies no development cost these tools use OSGI manifest data to create tree.Tools to author manifest files already available in EclipseClass path container simplifies view in Eclipse no more filtering out libraries from External.Find bundle / jar compile time dependencies that are unused is a tool within Eclipse.Find all classes used from this bundle is now possible.
  • OSGi at eBay

    1. 1. OSGi at a Large-Scale Enterprise<br />Lessons from eBay<br />Justin Early, Sangjin Lee, & DebashisSaha<br />eBay Inc.<br />
    2. 2. Agenda<br />Case for enterprise OSGi<br />Speaking of scale...<br />Migration challenges & observations<br />IDE & build<br />Tooling benefits<br />Closing<br />2<br />
    3. 3. Case for enterprise OSGi<br />For all its virtues, OSGi is still a hard sell in (large scale) enterprises<br />Why?<br />3<br />
    4. 4. Case for enterprise OSGi<br />Modularity: warm<br />Runtime dynamism: not so much<br />Operations needs predictability<br />JavaEE containers are becoming OSGi ready: warm<br />4<br />
    5. 5. Modularity<br />Modularity is perhaps the best driver for OSGi in the enterprise<br />Reduce surface areas<br />Reduce coupling and increase cohesion<br />However, modularity benefits are hard to quantify<br />What is a PRACTICAL metric that demonstrates the compelling value of a modular architecture?<br />Reduced coupling? Reduced build time?<br />5<br />
    6. 6. Cost-benefit analysis<br />Modularity benefits are long term, but the migration pain is immediate<br />The very SCALE which necessitates the modularity discussion also makes migration very expensive<br />6<br />
    7. 7. It feels like...<br />7<br />
    8. 8. Speaking of scale...<br />eBay’s code base has<br />Thousands of jars<br />Tens of thousands of packages<br />Hundreds of thousands of classes<br />Tens of millions of lines of code<br />Even the simplest refactoring can become very expensive<br />8<br />
    9. 9. Migration observations<br />Everything needs to be in a bundle<br />We’re finding a lot of existing problems to clean up<br />Starting from a “super” bundle<br />9<br />
    10. 10. Migration challenges<br />What should be my module granularity?<br />Package control policy<br />Import-Package v. Require-Bundle (ala split packages)<br />Dynamic classloading and resource loading<br />10<br />
    11. 11. Migration challenges<br />Limiting use of OSGi services<br />Scale of development teams: training and support<br />11<br />
    12. 12. Eclipse and OSGi<br />Java Jars<br />
    13. 13. Evolution<br /><ul><li>Each tool adds required libraries as Bundle-Classpath entries
    14. 14. Convert Jars to Bundles using aQute's BND tool
    15. 15. Convert Library Projects into one plugin project using PDE tooling and use use it for build and compile time.</li></li></ul><li>Closing<br />It’s important to articulate WHY we need/want OSGi in the enterprise<br />Less appetite for runtime dynamism than expected<br />Start simple without advanced OSGi features<br />Do not underestimate the refactoring/migration costs<br />Putting the best and scalable IDE/build in place is supremely important<br />14<br />
    16. 16. Thank you!<br />Questions?<br />15<br />

    ×