Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

OSGi at eBay


Published on

  • Be the first to comment

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 />