<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: Why OSGi is cool, but not for most enterprise apps&#8230;</title>
	<atom:link href="http://blog.caucho.com/2009/06/15/why-osgi-is-cool-but-not-for-most-enterprise-apps/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.caucho.com/2009/06/15/why-osgi-is-cool-but-not-for-most-enterprise-apps/</link>
	<description>Inside info, thoughts, and opinions from Caucho engineers</description>
	<pubDate>Fri, 24 May 2013 10:45:54 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: rinswind</title>
		<link>http://blog.caucho.com/2009/06/15/why-osgi-is-cool-but-not-for-most-enterprise-apps/comment-page-1/#comment-355</link>
		<dc:creator>rinswind</dc:creator>
		<pubDate>Mon, 17 Aug 2009 12:44:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.caucho.com/?p=213#comment-355</guid>
		<description>Fine point.

Maven and OSGi do not contradict each other. In fact I build OSGi bundles primarily with Maven. I agree Import-Package is too low level for humans to cope. This is why I work at the coarser grained maven level and use a maven plugin to automatically build the low-level OSGi metadata for me. 
Also OSGi supports maven-style dependencies at runtime with Require-Bundle. This includes the possibility to have composite facade bundles like say "org.apache.wicket-1.4.0.jar". At *runtime* both Import-Package and Require-Bundle have their valid use cases. At *buildtime* however we should always use Maven/Require-Bundle level of granularity and tools to get the flexible low-level OSGi metadata.

Here is a blog explaining why this high-low separation is a good idea:

http://www.osgi.org/blog/2008/06/jsr-277-and-import-package.html

As for the service model: I agree it is not for every usecase. Real application are a mix between the service model and the extender model. I think extender is at least as important as the service model and more generic. Here again we are just starting to explore the full potential and to develop clear best practices and standards like OSGi RFC-66.

Anyway my point is that OSGi and the enterprise do not have fundamental contradictions. It is mostly that the raw OSGi is a thin modular layer on top of the JVM. Having runtime modularity is very compelling - but it must also be easy/cheap to use. That's why rather than reject the best current modularity runtime for Java we should push forward and built it up to a convenient general purpose programming environment. It is also tremendous fun trying to do so :)</description>
		<content:encoded><![CDATA[<p>Fine point.</p>
<p>Maven and OSGi do not contradict each other. In fact I build OSGi bundles primarily with Maven. I agree Import-Package is too low level for humans to cope. This is why I work at the coarser grained maven level and use a maven plugin to automatically build the low-level OSGi metadata for me.<br />
Also OSGi supports maven-style dependencies at runtime with Require-Bundle. This includes the possibility to have composite facade bundles like say &#8220;org.apache.wicket-1.4.0.jar&#8221;. At *runtime* both Import-Package and Require-Bundle have their valid use cases. At *buildtime* however we should always use Maven/Require-Bundle level of granularity and tools to get the flexible low-level OSGi metadata.</p>
<p>Here is a blog explaining why this high-low separation is a good idea:</p>
<p><a href="http://www.osgi.org/blog/2008/06/jsr-277-and-import-package.html" rel="nofollow">http://www.osgi.org/blog/2008/06/jsr-277-and-import-package.html</a></p>
<p>As for the service model: I agree it is not for every usecase. Real application are a mix between the service model and the extender model. I think extender is at least as important as the service model and more generic. Here again we are just starting to explore the full potential and to develop clear best practices and standards like OSGi RFC-66.</p>
<p>Anyway my point is that OSGi and the enterprise do not have fundamental contradictions. It is mostly that the raw OSGi is a thin modular layer on top of the JVM. Having runtime modularity is very compelling - but it must also be easy/cheap to use. That&#8217;s why rather than reject the best current modularity runtime for Java we should push forward and built it up to a convenient general purpose programming environment. It is also tremendous fun trying to do so <img src='http://blog.caucho.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ferg</title>
		<link>http://blog.caucho.com/2009/06/15/why-osgi-is-cool-but-not-for-most-enterprise-apps/comment-page-1/#comment-330</link>
		<dc:creator>ferg</dc:creator>
		<pubDate>Wed, 05 Aug 2009 16:28:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.caucho.com/?p=213#comment-330</guid>
		<description>Take a look at a basic wicket example: http://wicket.apache.org/exampleguestbook.html.  Wicket uses its packaging to organize its components in a logical and useful way, and the wicket library is used as a single conceptual unit, not a big collection of packages.

With Maven-style dependency, wicket is easily imported because "wicket" is a conceptual name encompassing the entire wicket library, not just the name of a package.  And it's trivial:

&lt;blockquote&gt;
&lt;dependency&gt; 
  &lt;groupId&gt;org.apache.wicket&lt;/groupId&gt; 
  &lt;artifactId&gt;wicket&lt;/artifactId&gt; 
  &lt;version&gt;1.4.0&lt;/version&gt; 
&lt;/dependency&gt; 
&lt;/blockquote&gt;

To convince anyone to switch to OSGi, you'd need to explain why redesigning Wicket in an OSGi style was better.  If OSGi had real value for the enterprise, either the dependency management would be easier than the Maven example above, or an OSGi-style reorganization of Wicket would be intrinsically superior to the current Wicket architecture.  Handwaving about service-oriented design isn't enough.  

Some applications which fit a strong service-oriented design may fit well with OSGi, but that does not imply that all enterprise applications should therefore be converted to use OSGi.</description>
		<content:encoded><![CDATA[<p>Take a look at a basic wicket example: <a href="http://wicket.apache.org/exampleguestbook.html" rel="nofollow">http://wicket.apache.org/exampleguestbook.html</a>.  Wicket uses its packaging to organize its components in a logical and useful way, and the wicket library is used as a single conceptual unit, not a big collection of packages.</p>
<p>With Maven-style dependency, wicket is easily imported because &#8220;wicket&#8221; is a conceptual name encompassing the entire wicket library, not just the name of a package.  And it&#8217;s trivial:</p>
<blockquote><p>
&lt;dependency><br />
  &lt;groupId>org.apache.wicket&lt;/groupId><br />
  &lt;artifactId>wicket&lt;/artifactId><br />
  &lt;version>1.4.0&lt;/version><br />
&lt;/dependency>
</p></blockquote>
<p>To convince anyone to switch to OSGi, you&#8217;d need to explain why redesigning Wicket in an OSGi style was better.  If OSGi had real value for the enterprise, either the dependency management would be easier than the Maven example above, or an OSGi-style reorganization of Wicket would be intrinsically superior to the current Wicket architecture.  Handwaving about service-oriented design isn&#8217;t enough.  </p>
<p>Some applications which fit a strong service-oriented design may fit well with OSGi, but that does not imply that all enterprise applications should therefore be converted to use OSGi.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rinswind</title>
		<link>http://blog.caucho.com/2009/06/15/why-osgi-is-cool-but-not-for-most-enterprise-apps/comment-page-1/#comment-325</link>
		<dc:creator>rinswind</dc:creator>
		<pubDate>Fri, 31 Jul 2009 18:47:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.caucho.com/?p=213#comment-325</guid>
		<description>freg,

I am not convinced there is a "natural" way enterprise applications are organized that clashes with either package level visibility or the service model. I would be grateful for any examples that both constitute a good practice and at the same time fundamentally clash with package-level visibility or services.

To me the greatest barrier to enter OSGi is the lack of support for the big infrastructural services every non-trivial application needs. With this in place the next barrier is the required switch in thinking from the usual app designs to a strong service oriented design. Many traditional isolation practices are hard to use with OSGi because they are no longer required! I think we have trouble grasping the extent to which we need to do *less* with OSGi. We almost don't need abstract factories, we almost don't need singletons, we almost don't need classes in our APIs, consequently we don't need to control access between the public and private halves of these classes with package-private members and any other tricks. Currently the main weakness of the package-level control is that I can't expose certain service APIs to collaborating bundles in my application while hiding them from bundles within other applications. However without OSGi any such access control is down to pure convention, so certainly OSGi improves the situation although it does not completely solve the problem. This last hole will be plugged with composite bundles. I.e. a multi-bundle app will look as a single bundle to other apps. In fact Eclipse already has a reference implementation of this.

As for the service model: I think it is not meant to be used directly by developers. I look at it as an extremely simple interoperation layer. It's job is to capture the absolute minimum of functionality required to share live objects between bundles - the simpler and more straightforward the better. Currently it does a good job at this but I think it needs to be refined and simplified a bit more. Because the service model is so simple it is quite easy to extend it to a full DI runtime. The beauty of this design is that we can have any number of 'oppinionated' component/DI runtimes running concurrently within the same OSGi container and interoperating with each other completely transparently. So everyone can use the runtime that suites their application best, drop down to the raw API, or even implement their own DI framework. I am almost certain it will be possible to implement JSR-299 on top of OSGi as well. Btw today there are no less than 5 component/DI runtimes for OSGi an they do interoperate transparently and are free to evolve independently.</description>
		<content:encoded><![CDATA[<p>freg,</p>
<p>I am not convinced there is a &#8220;natural&#8221; way enterprise applications are organized that clashes with either package level visibility or the service model. I would be grateful for any examples that both constitute a good practice and at the same time fundamentally clash with package-level visibility or services.</p>
<p>To me the greatest barrier to enter OSGi is the lack of support for the big infrastructural services every non-trivial application needs. With this in place the next barrier is the required switch in thinking from the usual app designs to a strong service oriented design. Many traditional isolation practices are hard to use with OSGi because they are no longer required! I think we have trouble grasping the extent to which we need to do *less* with OSGi. We almost don&#8217;t need abstract factories, we almost don&#8217;t need singletons, we almost don&#8217;t need classes in our APIs, consequently we don&#8217;t need to control access between the public and private halves of these classes with package-private members and any other tricks. Currently the main weakness of the package-level control is that I can&#8217;t expose certain service APIs to collaborating bundles in my application while hiding them from bundles within other applications. However without OSGi any such access control is down to pure convention, so certainly OSGi improves the situation although it does not completely solve the problem. This last hole will be plugged with composite bundles. I.e. a multi-bundle app will look as a single bundle to other apps. In fact Eclipse already has a reference implementation of this.</p>
<p>As for the service model: I think it is not meant to be used directly by developers. I look at it as an extremely simple interoperation layer. It&#8217;s job is to capture the absolute minimum of functionality required to share live objects between bundles - the simpler and more straightforward the better. Currently it does a good job at this but I think it needs to be refined and simplified a bit more. Because the service model is so simple it is quite easy to extend it to a full DI runtime. The beauty of this design is that we can have any number of &#8216;oppinionated&#8217; component/DI runtimes running concurrently within the same OSGi container and interoperating with each other completely transparently. So everyone can use the runtime that suites their application best, drop down to the raw API, or even implement their own DI framework. I am almost certain it will be possible to implement JSR-299 on top of OSGi as well. Btw today there are no less than 5 component/DI runtimes for OSGi an they do interoperate transparently and are free to evolve independently.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan.schmidt</title>
		<link>http://blog.caucho.com/2009/06/15/why-osgi-is-cool-but-not-for-most-enterprise-apps/comment-page-1/#comment-321</link>
		<dc:creator>stephan.schmidt</dc:creator>
		<pubDate>Thu, 30 Jul 2009 12:59:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.caucho.com/?p=213#comment-321</guid>
		<description>A thought long and deep if OSGi could help us earn more money, spend less money, be more flexibile and all that. My conclusion: For us redeploying whole servers is easier to manage, continous deployments are better suited for most web applications than OSGi.

Stephan Schmidt
Head of Development b4f
http://twitter.com/codemonkeyism</description>
		<content:encoded><![CDATA[<p>A thought long and deep if OSGi could help us earn more money, spend less money, be more flexibile and all that. My conclusion: For us redeploying whole servers is easier to manage, continous deployments are better suited for most web applications than OSGi.</p>
<p>Stephan Schmidt<br />
Head of Development b4f<br />
<a href="http://twitter.com/codemonkeyism" rel="nofollow">http://twitter.com/codemonkeyism</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ferg</title>
		<link>http://blog.caucho.com/2009/06/15/why-osgi-is-cool-but-not-for-most-enterprise-apps/comment-page-1/#comment-257</link>
		<dc:creator>ferg</dc:creator>
		<pubDate>Sun, 28 Jun 2009 03:30:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.caucho.com/?p=213#comment-257</guid>
		<description>rinswind,

The difficulty with OSGi is really when you get to engineering implementation details.  If you stick to the 10,000 foot level "modularity and services are good", then OSGi looks fine.  When you start putting it into real engineering practice for enterprise applications, the mismatch becomes apparent.

The two mismatches in OSGi are the package orientation and the entire service model.

OSGi strongly encourages a model where each module export a single package and has a collection or implementation packages.  For simple applications, like embedded application, this package structure can work well, but in an enterprise environment it warps the natural enterprise organization to a foreign strict-package model.  In other words, the enterprise application is no longer organized naturally to the application itself, but to the foreign OSGi model.

The service model is just a generation behind, basically a service-locator model.  There's nothing intrinsically wrong with the model, but new technologies like Java Injection (JSR-299) are more descriptive and powerful.</description>
		<content:encoded><![CDATA[<p>rinswind,</p>
<p>The difficulty with OSGi is really when you get to engineering implementation details.  If you stick to the 10,000 foot level &#8220;modularity and services are good&#8221;, then OSGi looks fine.  When you start putting it into real engineering practice for enterprise applications, the mismatch becomes apparent.</p>
<p>The two mismatches in OSGi are the package orientation and the entire service model.</p>
<p>OSGi strongly encourages a model where each module export a single package and has a collection or implementation packages.  For simple applications, like embedded application, this package structure can work well, but in an enterprise environment it warps the natural enterprise organization to a foreign strict-package model.  In other words, the enterprise application is no longer organized naturally to the application itself, but to the foreign OSGi model.</p>
<p>The service model is just a generation behind, basically a service-locator model.  There&#8217;s nothing intrinsically wrong with the model, but new technologies like Java Injection (JSR-299) are more descriptive and powerful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GreenEyed</title>
		<link>http://blog.caucho.com/2009/06/15/why-osgi-is-cool-but-not-for-most-enterprise-apps/comment-page-1/#comment-254</link>
		<dc:creator>GreenEyed</dc:creator>
		<pubDate>Thu, 25 Jun 2009 11:22:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.caucho.com/?p=213#comment-254</guid>
		<description>I've also been trying to "play" with OSGi and I also saw a bit "overwhelming" for my needs, so I decided to let it mature for a while. From a "simple" application developer perspective, it seems to me that is is a technology to be employed by infrastructure builders to provide transparent facilities for us, not something to be employed directly by "end developers".

And it must be so many years using Resin, or it might be that I use Resin because my mind is aligned with Caucho guys, but I agree that OSGi might still need a bit of time so something simpler, easier to use, even if not feature-complete, could be useful now, to start changing things and exploring best practices etc.

The only thing I would ask is for web apps to still be compatible with other containers. So, for example, you might allow .jar files to be included in WEB-INF/lib but if you include WEB-INF/pom.xml they are moved/renamed/not taken into account automatically. That means the application as-is can work in other containers but you get all the goodies if you do it inside Resin/Pomegranate.

I'm looking forward to using this and the new GIT/.war features of Resin 4.0 in production :).
S!
Daniel Lopez</description>
		<content:encoded><![CDATA[<p>I&#8217;ve also been trying to &#8220;play&#8221; with OSGi and I also saw a bit &#8220;overwhelming&#8221; for my needs, so I decided to let it mature for a while. From a &#8220;simple&#8221; application developer perspective, it seems to me that is is a technology to be employed by infrastructure builders to provide transparent facilities for us, not something to be employed directly by &#8220;end developers&#8221;.</p>
<p>And it must be so many years using Resin, or it might be that I use Resin because my mind is aligned with Caucho guys, but I agree that OSGi might still need a bit of time so something simpler, easier to use, even if not feature-complete, could be useful now, to start changing things and exploring best practices etc.</p>
<p>The only thing I would ask is for web apps to still be compatible with other containers. So, for example, you might allow .jar files to be included in WEB-INF/lib but if you include WEB-INF/pom.xml they are moved/renamed/not taken into account automatically. That means the application as-is can work in other containers but you get all the goodies if you do it inside Resin/Pomegranate.</p>
<p>I&#8217;m looking forward to using this and the new GIT/.war features of Resin 4.0 in production :).<br />
S!<br />
Daniel Lopez</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Emil</title>
		<link>http://blog.caucho.com/2009/06/15/why-osgi-is-cool-but-not-for-most-enterprise-apps/comment-page-1/#comment-250</link>
		<dc:creator>Emil</dc:creator>
		<pubDate>Sun, 21 Jun 2009 16:20:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.caucho.com/?p=213#comment-250</guid>
		<description>Thanks for the perspective, rinswind.  I certainly agree that if you're working in the OSGi space to determine best practices and architectures, it's exciting because there's a lot of room for innovation.  If your approach wins in the end, the payoff could be huge in terms of changing the way enterprise apps are written and perhaps financially as well.  On the other hand, if you're trying to write an enterprise app and deliver it anytime soon, that open field means creating a lot of your own infrastructure.  Our plan is to help developers in the latter position now and keep a watchful eye on the developments in the OSGi world to see signs of stability.  I think your blog post is helpful in showing the position of those working out the issues with OSGi, so thanks again for sharing it with us.</description>
		<content:encoded><![CDATA[<p>Thanks for the perspective, rinswind.  I certainly agree that if you&#8217;re working in the OSGi space to determine best practices and architectures, it&#8217;s exciting because there&#8217;s a lot of room for innovation.  If your approach wins in the end, the payoff could be huge in terms of changing the way enterprise apps are written and perhaps financially as well.  On the other hand, if you&#8217;re trying to write an enterprise app and deliver it anytime soon, that open field means creating a lot of your own infrastructure.  Our plan is to help developers in the latter position now and keep a watchful eye on the developments in the OSGi world to see signs of stability.  I think your blog post is helpful in showing the position of those working out the issues with OSGi, so thanks again for sharing it with us.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rinswind</title>
		<link>http://blog.caucho.com/2009/06/15/why-osgi-is-cool-but-not-for-most-enterprise-apps/comment-page-1/#comment-249</link>
		<dc:creator>rinswind</dc:creator>
		<pubDate>Sat, 20 Jun 2009 18:46:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.caucho.com/?p=213#comment-249</guid>
		<description>Hi
My comments on this entry grew to the point where I felt it best to put them up on my own blog:

http://rinswind.blogspot.com/2009/06/current-state-of-affairs.html</description>
		<content:encoded><![CDATA[<p>Hi<br />
My comments on this entry grew to the point where I felt it best to put them up on my own blog:</p>
<p><a href="http://rinswind.blogspot.com/2009/06/current-state-of-affairs.html" rel="nofollow">http://rinswind.blogspot.com/2009/06/current-state-of-affairs.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ferg</title>
		<link>http://blog.caucho.com/2009/06/15/why-osgi-is-cool-but-not-for-most-enterprise-apps/comment-page-1/#comment-242</link>
		<dc:creator>ferg</dc:creator>
		<pubDate>Tue, 16 Jun 2009 17:44:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.caucho.com/?p=213#comment-242</guid>
		<description>A key issue with OSGi is its focus on Java packages as the key focus, not jars themselves.

In a mobile context, it may make sense to create one package of API interfaces to export, and hide the rest in other packages, but enterprise applications need more flexibility to their package design.

In other words, while the OSGi model of package-use is fine, it's not the One True Package Architecture, and doesn't play nicely with enterprise applications.</description>
		<content:encoded><![CDATA[<p>A key issue with OSGi is its focus on Java packages as the key focus, not jars themselves.</p>
<p>In a mobile context, it may make sense to create one package of API interfaces to export, and hide the rest in other packages, but enterprise applications need more flexibility to their package design.</p>
<p>In other words, while the OSGi model of package-use is fine, it&#8217;s not the One True Package Architecture, and doesn&#8217;t play nicely with enterprise applications.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
