virgo 3.0, osgi middleware server from eclipsert – christopher frost
DESCRIPTION
A look at Virgo 3.0 (http://www.eclipse.org/virgo/), an open source application server from EclipseRT. Virgo is a completely modular OSGi based, standards compliant, Java enterprise application server. Learn about the new standards we are supporting and the new 'Region' based scoping mechanism from Equinox. A look at how to Snap up the front end of your web apps. Demos will show Virgo, our tooling support and all the new features in 3.0.TRANSCRIPT
COPYRIGHT © 2008-2011 OSGi Alliance. All Rights Reserved
Virgo 3.0What's New!
Christopher Frost
SpringSource, a division of VMware
21st September 2011
OSGi Alliance Marketing © 2008-2010 . All Rights Reserved
Page 1
OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved Page 2
Agenda
• Extra Modular with Regions• Virgo 3.0 – What New• Snaps
• Virgo & OSGi Tooling
• Coming Soon• Questions
OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved Page 3
Regions – Background
● Module granularity: Class, Bundle, ?● Need higher level scoping construct than a bundle● Simpler management of large applications● [see Subsystems RFC 152 for more background]
OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved Page 4
Regions – Scoping in Virgo
● Region scoping - Kernel Space vs User Space● Application scoping
● PARs and scoped Plans● Metadata rewriting for bundle/package scoping● Service registry hooks for service scoping
OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved Page 5
Regions – Composite Bundles & Nested Frameworks
• Idea to make a group of bundles like a single bundle
• Explored by OSGi• Prototyped in Equinox• Exploited in Virgo 2.1.x• Difficulty standardising in a framework neutral way
• Spec [RFC 138] replaced by framework hooks
• Equinox prototype deprecated
OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved Page 6
Regions – Framework Hooks
• Resolver hook, bundle find/event hooks [see R4.3 core spec for details]
• Similar to service registry find/event hooks which do the same for services
• Control the visibility of bundles, packages, generic capabilities
OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved Page 7
Regions – Hook Usability
• Service Find and Event hooks• Bundle Resolver, Find and Event hooks• Hard to ensure consistent behaviour across hooks
• Need higher level abstraction
• Region digraph
OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved Page 8
Regions – Region Digraph
• A directed graph of "regions"• A region is a group of bundles• Regions may be connected by directed arcs
• Each directed arc has a filter which controls visibility:• bundles• packages• services• generic capabilities
OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved Page 9
Regions – Region Digraph
OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved Page 10
Regions – Region Digraph
OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved Page 11
Regions – Region Digraph (cont.)
• Developed as part of Virgo• Formal model in Z• Seen to be useful outside Virgo
• Moved to Equinox
• Used by Virgo 3.0• Likely to be used by Apache Aries
OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved Page 12
Regions & Subsystems
• OSGi standard multi-bundle scoping mechanism
• Work in progress (Grahams Talk earlier), public draft soon
• Inspired by• Virgo regions & scopes• Apache Aries applications• Apache Felix Karaf features• Newton systems• Eclipse features• Deployment Admin deployment packages
• Virgo likely to implement subsystems in a future release
OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved Page 13
Virgo 3.0 – Regions
OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved Page 14
Virgo 3.0 – What's new
• Snaps gets its first release
• Servlet 3.0 with Tomcat 7.x
• Gemini.Web, strict compliance to OSGi web container spec
• Jetty version
• Regions have replaced Nested Frameworks
• New Shell based on Apache GoGo
• Updated sample application, Greenpages
• Spring 3.0.5.RELEASE & Equinox Indigo
• Declarative Service & Log Service support
• Lots of Bugfixes etc...
OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved Page 15
Virgo 3.0 – Demo
OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved Page 16
Snaps – Modular Web Apps
• Some features tidied up• Documentation written• Single sample app showing everything Snaps can do
• All available in a Zip from the Virgo website
OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved Page 17
Snaps – Basics
• Lots of Snaps (Web Application Bundles)• Snaps have the hosts ServletContext• Uses a filter to dispatch requests from the host
• Everything else is business as normal
OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved Page 18
Snaps – Nested Context Paths
/app/orders /app/billing
OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved Page 19
Snaps – A filter for Snaps
• Still just web.xml• Define the subpath for Snaps with a filter
OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved Page 20
Snaps – Manifest
• Attaching Snaps to hosts
OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved Page 21
Snaps – Taglibs
• JSP tag to look up slices & their properties
OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved Page 22
Snaps – Host Properties
• Looking up resources & properties from the host
OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved Page 23
Snaps – Demo
OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved Page 24
Virgo Tooling
• Donated to Eclipse Virgo and Libra
• Tooling - 1st milestone, lots still changing
• The Dependency on STS/Spring IDE is going
• Bundlor – Manifest generation tool• To have a play, see http://wiki.eclipse.org/Virgo/Tooling
OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved Page 25
Virgo Future
• New Web Admin Console• P2 integration• Subsystems
• Tooling
• Cloud• ???
OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved Page 26
Questions