A path to modularity with Eclipse Virgo

1,048 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,048
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
26
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • When best practices in different domains clash there’s no an easy solution: Build systems usually recommend a concrete version for the dependencies rather than range. JEE heavily use META-INF/services concepts which implies that this package is accessible. Optional packages are often declared as optional but no extra care is taken in the source to handle the case when the package is not available Split packages across third party jars are common case and usually refactoring is not an option so sometimes require-bundle is preferable. Guarantee start sequence without services could be tricky and start levels could help as workaround. Drawbacks of that approach (mostly on system update) could be found in every article on OSGi best practices. No silver bullet (yet) just list of open questions which to be considered from multiple perspectives
  • A modularized JavaEE stack exists. Clears the way for owners of standard monolithic JavaEE apps to start modularizing bit by bit. Experience and Virgo users tell us that once you modularize your app you don’t want to go back to a monolithic approach.
  • Because everything is so modular and the components we used are relatively loosely coupled we were able to assemble a minimal set of components that satisfy our goal of EE support.
  • Our goal is to have the Virgo Nano-EE distribution part of the Eclipse Juno release train. It is scheduled for release on June 27th.
  • A path to modularity with Eclipse Virgo

    1. 1. A path to modularity with Eclipse VirgoBorislav KapukaranovKatya TodorovaMarch, 2012 Flickr: AbiKhairulAizad^^
    2. 2. In the ideal world...A collection of modules complement each other; their sum is greater than each part. No waste, nothing to spare. Flickr: alicejack2002© 2011 SAP AG. All rights reserved. 2
    3. 3. Benefits on the long runEasy to maintainLoose couplingClear contractReuse© 2011 SAP AG. All rights reserved. 3
    4. 4. The path to modularity is paved with...No product incrementBackward compatibility issuesRisk© 2011 SAP AG. All rights reserved. 4
    5. 5. Common pitfallsVersioning Semantic versions vs reproducible build Uses clausesImport-package vs Require-BundleOptional packagesStart levels How do we model core functionality?© 2011 SAP AG. All rights reserved. 5
    6. 6. “Google chose jetty for App engine” Jetty is designed to be at Jetty pluggable and fe atures th extensible, so GoogleThe key osen for were was ch ility.” have been able to size and flexib customize it to a high degree. http://www.infoq.com/news/2009/08/google-chose-jetty
    7. 7. Virgo in the modularity worldStandard OSGiBundles All the Way DownDiagnostics ++ deadlock detection unsatisfied DS notifications extensible and independent web console extensible dump generation mechanism enhanced OSGi utilities sophisticated event logging and tracingVirgo White Paper© 2011 SAP AG. All rights reserved. 7
    8. 8. DEMOUnsatisfied DS notifications© 2011 SAP AG. All rights reserved. 8
    9. 9. Virgo FeaturesNano OSGi, Diagnostics ++, DS, p2Kernel Being good citizens in both EE and OSGi world support (Subsystems coming) side-state resolution Virgo repositories Blueprint in the user region Load-time weavingTomcat Server / Jetty Server Web container© 2011 SAP AG. All rights reserved. 9
    10. 10. Virgo supported artifactsNano jar (WAB); WARKernel jar; PAR; Plan, property filesTomcat Server / Jetty Server jar (WAB), PAR; Plan; WAR, property files© 2011 SAP AG. All rights reserved. 10
    11. 11. Virgo use casesNano Nano Base –Equinox + Diagnostics –Embedded –Good base for OSGi apps of any kind Nano Full –Nano Base + Web layer (+ p2) –Lightweight app server –Cloud environment© 2011 SAP AG. All rights reserved. 11
    12. 12. Virgo use casesKernel Multi-region environment Many deployment options Clustering via Cloning Isolated and more stable coreTomcat Server / Jetty Server Web App Servers Enterprise apps (Spring, Hibernate) Standard web apps run in OSGi© 2011 SAP AG. All rights reserved. 12
    13. 13. Let me chooseMany existing apps are not OSGi awareOften migration is not an optionBeing good citizens in both EE and OSGi world is worth the effort© 2011 SAP AG. All rights reserved. 13
    14. 14. Java EE 6 Web ProfileServlet/jspEJB 3.1 LitePersistence 2.0Transactions 1.1CDI 1.0© 2011 SAP AG. All rights reserved. 14
    15. 15. How to build a Web server from scratch?How do we know we’ve done it right?Does following the modularity path pays off?© 2011 SAP AG. All rights reserved. 15
    16. 16. It did pay off© 2011 SAP AG. All rights reserved. 16
    17. 17. Juno Flickr: tecnico73© 2011 SAP AG. All rights reserved. 17
    18. 18. Thank You!Contact information:Borislav Kapukaranovborislav.kapukaranov@sap.com @bkapukaranovKatya Todorovakatya.todorova@sap.com @katiatodorova
    19. 19. Startup size© 2011 SAP AG. All rights reserved. 19
    20. 20. Footprint© 2011 SAP AG. All rights reserved. 20

    ×