Date post: | 25-May-2015 |
Category: |
Technology |
Upload: | katyatodorova |
View: | 838 times |
Download: | 5 times |
A path to modularity with Eclipse Virgo
Borislav KapukaranovKatya TodorovaMarch, 2012
Flickr: AbiKhairulAizad^^
2© 2011 SAP AG. All rights reserved. 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
3© 2011 SAP AG. All rights reserved. 3
Benefits on the long run
Easy to maintain
Loose coupling
Clear contract
Reuse
4© 2011 SAP AG. All rights reserved. 4
The path to modularity is paved with...
No product increment
Backward compatibility issues
Risk
5© 2011 SAP AG. All rights reserved. 5
Common pitfalls
Versioning Semantic versions vs reproducible build Uses clauses
Import-package vs Require-Bundle
Optional packages
Start levels How do we model core functionality?
“Google chose jetty for App engine”
http://www.infoq.com/news/2009/08/google-chose-jetty
The key features
that Jetty was
chosen for were
size and
flexibility.”
Jetty is designed to be pluggable and
extensible, so Google have been able to
customize it to a high degree.
7© 2011 SAP AG. All rights reserved. 7
Virgo in the modularity world
Standard OSGi
Bundles All the Way Down
Diagnostics ++ deadlock detection unsatisfied DS notifications extensible and independent web console extensible dump generation mechanism enhanced OSGi utilities sophisticated event logging and tracing
Virgo White Paper
8© 2011 SAP AG. All rights reserved. 8
DEMO
Unsatisfied DS notifications
9© 2011 SAP AG. All rights reserved. 9
Virgo Features
Nano OSGi, Diagnostics ++, DS, p2
Kernel Being good citizens in both EE and OSGi world support
(Subsystems coming) side-state resolution Virgo repositories Blueprint in the user region Load-time weaving
Tomcat Server / Jetty Server Web container
10© 2011 SAP AG. All rights reserved.
Virgo supported artifacts
Nano jar (WAB); WAR
Kernel jar; PAR; Plan, property files
Tomcat Server / Jetty Server jar (WAB), PAR; Plan; WAR, property files
10
11© 2011 SAP AG. All rights reserved.
Virgo use cases
Nano 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
11
12© 2011 SAP AG. All rights reserved.
Virgo use cases
Kernel Multi-region environment Many deployment options Clustering via Cloning Isolated and more stable core
Tomcat Server / Jetty Server Web App Servers Enterprise apps (Spring, Hibernate) Standard web apps run in OSGi
12
13© 2011 SAP AG. All rights reserved.
Let me choose
Many existing apps are not OSGi aware
Often migration is not an option
Being good citizens in both EE and OSGi world is worth the effort
13
14© 2011 SAP AG. All rights reserved.
Java EE 6 Web Profile
Servlet/jsp
EJB 3.1 Lite
Persistence 2.0
Transactions 1.1
CDI 1.0
14
15© 2011 SAP AG. All rights reserved.
How to build a Web server from scratch?
How do we know we’ve done it right?
Does following the modularity path pays off?
15
16© 2011 SAP AG. All rights reserved.
It did pay off
16
17© 2011 SAP AG. All rights reserved.
Juno
17
Flickr: tecnico73
Thank You!Contact information:
Borislav Kapukaranov [email protected]
@bkapukaranov
Katya Todorova [email protected]
@katiatodorova
19© 2011 SAP AG. All rights reserved.
Startup size
19
20© 2011 SAP AG. All rights reserved.
Footprint
20