You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by user3152723 <un...@fifthelement.fi> on 2014/07/22 11:30:27 UTC

What would be the benefits of running Camle on osgi?

It is recommended to use blueprint with Camel if you run your routes on osgi. 

But what would you miss out if your choose to run Camel routes in / imbedded
in Spring (SpringBoot) in stead of Karaf? You anyway get the ease of testing
with Spring.

Using Fuse : Camel, Activemq, and starting with Fabric. Do we "need" to use
Karaf?





--
View this message in context: http://camel.465427.n5.nabble.com/What-would-be-the-benefits-of-running-Camle-on-osgi-tp5754201.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: What would be the benefits of running Camle on osgi?

Posted by Matt Sicker <bo...@gmail.com>.
Fabric only supports Karaf right now, but it's supposed to add support for
more servers over time (I think Tomcat or Jetty was one of them).


On 22 July 2014 10:47, Charlie Mordant <cm...@gmail.com> wrote:

> For testing, you have some frameworks with OSGI too:
>
> * You can use Spring for unit testing (it will replace blueprint as test
> context)
> * You can use pax-exam (maybe with karaf-pax-exam-container) for
> integration testing (all your stack, as you would do with spring/tomcat)
>
>
>
>
> 2014-07-22 13:59 GMT+02:00 Charlie Mordant <cm...@gmail.com>:
>
> > I think it is also a question of modularity/concern.
> >
> > The major subject of Camel is to make routes between services (EIPs).
> > So everytime you deploy a new service (and so modify your routes) you'll
> > have to stop and restart them.
> >
> > Now, if you have mutliple routes on the same Vm and use Spring, a major
> > part of your IS will be unavailable (and you'll maybe have some issues
> with
> > 'on process' exchanges).
> > If you use OSGI, the only bundles that must be refreshed is the one that
> > contains your modified routes, reducing the issues/outage due to hot
> swap,
> > conncurrent versions support, live configuration swap...
> >
> > Concerning fuse, I think it uses Karaf under the hood too..
> >
> > Regards,
> >
> >
> >
> >
> > 2014-07-22 12:02 GMT+02:00 akoufoudakis <ak...@gmail.com>:
> >
> > That is what official Red Hat Fuse ESB Enterprise documentations says:
> >> "When trying to decide between the blueprint and Spring dependency
> >> injection
> >> frameworks, bear in mind that blueprint offers one major advantage over
> >> Spring: when new dependencies are introduced in blueprint through XML
> >> schema
> >> namespaces, blueprint has the capability to resolve these dependencies
> >> automatically at run time. By contrast, when packaging your project as
> an
> >> OSGi bundle, Spring requires you to add new dependencies explicitly to
> the
> >> maven-bundle-plugin configuration."
> >> (
> >>
> https://access.redhat.com/documentation/en-US/Fuse_ESB_Enterprise/7.0/html/Getting_Started/ch01s04s02.html
> >> ).
> >>
> >> As for the fuse/karaf, I might be wrong. But looking at the examples, it
> >> seems that Fabric uses Karaf behind the scenes. I might be wrong about
> it.
> >> So, please, double check.
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://camel.465427.n5.nabble.com/What-would-be-the-benefits-of-running-Camle-on-osgi-tp5754201p5754202.html
> >> Sent from the Camel - Users mailing list archive at Nabble.com.
> >>
> >
> >
> >
> > --
> > Charlie Mordant
> >
> > Full OSGI/EE stack made with Karaf:
> > https://github.com/OsgiliathEnterprise/net.osgiliath.parent
> >
>
>
>
> --
> Charlie Mordant
>
> Full OSGI/EE stack made with Karaf:
> https://github.com/OsgiliathEnterprise/net.osgiliath.parent
>



-- 
Matt Sicker <bo...@gmail.com>

Re: What would be the benefits of running Camle on osgi?

Posted by Charlie Mordant <cm...@gmail.com>.
For testing, you have some frameworks with OSGI too:

* You can use Spring for unit testing (it will replace blueprint as test
context)
* You can use pax-exam (maybe with karaf-pax-exam-container) for
integration testing (all your stack, as you would do with spring/tomcat)




2014-07-22 13:59 GMT+02:00 Charlie Mordant <cm...@gmail.com>:

> I think it is also a question of modularity/concern.
>
> The major subject of Camel is to make routes between services (EIPs).
> So everytime you deploy a new service (and so modify your routes) you'll
> have to stop and restart them.
>
> Now, if you have mutliple routes on the same Vm and use Spring, a major
> part of your IS will be unavailable (and you'll maybe have some issues with
> 'on process' exchanges).
> If you use OSGI, the only bundles that must be refreshed is the one that
> contains your modified routes, reducing the issues/outage due to hot swap,
> conncurrent versions support, live configuration swap...
>
> Concerning fuse, I think it uses Karaf under the hood too..
>
> Regards,
>
>
>
>
> 2014-07-22 12:02 GMT+02:00 akoufoudakis <ak...@gmail.com>:
>
> That is what official Red Hat Fuse ESB Enterprise documentations says:
>> "When trying to decide between the blueprint and Spring dependency
>> injection
>> frameworks, bear in mind that blueprint offers one major advantage over
>> Spring: when new dependencies are introduced in blueprint through XML
>> schema
>> namespaces, blueprint has the capability to resolve these dependencies
>> automatically at run time. By contrast, when packaging your project as an
>> OSGi bundle, Spring requires you to add new dependencies explicitly to the
>> maven-bundle-plugin configuration."
>> (
>> https://access.redhat.com/documentation/en-US/Fuse_ESB_Enterprise/7.0/html/Getting_Started/ch01s04s02.html
>> ).
>>
>> As for the fuse/karaf, I might be wrong. But looking at the examples, it
>> seems that Fabric uses Karaf behind the scenes. I might be wrong about it.
>> So, please, double check.
>>
>>
>>
>> --
>> View this message in context:
>> http://camel.465427.n5.nabble.com/What-would-be-the-benefits-of-running-Camle-on-osgi-tp5754201p5754202.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>
>
>
> --
> Charlie Mordant
>
> Full OSGI/EE stack made with Karaf:
> https://github.com/OsgiliathEnterprise/net.osgiliath.parent
>



-- 
Charlie Mordant

Full OSGI/EE stack made with Karaf:
https://github.com/OsgiliathEnterprise/net.osgiliath.parent

Re: What would be the benefits of running Camle on osgi?

Posted by Charlie Mordant <cm...@gmail.com>.
I think it is also a question of modularity/concern.

The major subject of Camel is to make routes between services (EIPs).
So everytime you deploy a new service (and so modify your routes) you'll
have to stop and restart them.

Now, if you have mutliple routes on the same Vm and use Spring, a major
part of your IS will be unavailable (and you'll maybe have some issues with
'on process' exchanges).
If you use OSGI, the only bundles that must be refreshed is the one that
contains your modified routes, reducing the issues/outage due to hot swap,
conncurrent versions support, live configuration swap...

Concerning fuse, I think it uses Karaf under the hood too..

Regards,




2014-07-22 12:02 GMT+02:00 akoufoudakis <ak...@gmail.com>:

> That is what official Red Hat Fuse ESB Enterprise documentations says:
> "When trying to decide between the blueprint and Spring dependency
> injection
> frameworks, bear in mind that blueprint offers one major advantage over
> Spring: when new dependencies are introduced in blueprint through XML
> schema
> namespaces, blueprint has the capability to resolve these dependencies
> automatically at run time. By contrast, when packaging your project as an
> OSGi bundle, Spring requires you to add new dependencies explicitly to the
> maven-bundle-plugin configuration."
> (
> https://access.redhat.com/documentation/en-US/Fuse_ESB_Enterprise/7.0/html/Getting_Started/ch01s04s02.html
> ).
>
> As for the fuse/karaf, I might be wrong. But looking at the examples, it
> seems that Fabric uses Karaf behind the scenes. I might be wrong about it.
> So, please, double check.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/What-would-be-the-benefits-of-running-Camle-on-osgi-tp5754201p5754202.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Charlie Mordant

Full OSGI/EE stack made with Karaf:
https://github.com/OsgiliathEnterprise/net.osgiliath.parent

Re: What would be the benefits of running Camle on osgi?

Posted by akoufoudakis <ak...@gmail.com>.
That is what official Red Hat Fuse ESB Enterprise documentations says:
"When trying to decide between the blueprint and Spring dependency injection
frameworks, bear in mind that blueprint offers one major advantage over
Spring: when new dependencies are introduced in blueprint through XML schema
namespaces, blueprint has the capability to resolve these dependencies
automatically at run time. By contrast, when packaging your project as an
OSGi bundle, Spring requires you to add new dependencies explicitly to the
maven-bundle-plugin configuration."
(https://access.redhat.com/documentation/en-US/Fuse_ESB_Enterprise/7.0/html/Getting_Started/ch01s04s02.html).

As for the fuse/karaf, I might be wrong. But looking at the examples, it
seems that Fabric uses Karaf behind the scenes. I might be wrong about it.
So, please, double check.



--
View this message in context: http://camel.465427.n5.nabble.com/What-would-be-the-benefits-of-running-Camle-on-osgi-tp5754201p5754202.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: What would be the benefits of running Camle on osgi?

Posted by Claus Ibsen <cl...@gmail.com>.
Ups meant to add OSGi in there as well

> Well IMHO a big part of f the learning curve is IMHO and the fact that
Karaf is a new kind of application server, that most people have not
used before.

Should be

Well IMHO a big part of f the learning curve is OSGi and the fact that
Karaf is a new kind of application server, that most people have not
used before.

On Wed, Jul 23, 2014 at 10:03 AM, Claus Ibsen <cl...@gmail.com> wrote:
> On Wed, Jul 23, 2014 at 9:21 AM, user3152723
> <un...@fifthelement.fi> wrote:
>> Tank you for the answers!
>>
>> I can now see that I mixed up names and things and frameworks. Fuse is based
>> on Karaf; when you start (RedHat) Fuse you meet Karaf console.
>>
>> And about testing Camel "osgi-blueprint" routes: Check Camel in Action: in
>> the osgi example of the book, there is not even test-folder in the project.
>> All other examples in the book (as in Camel docs) are effectively spring
>> tests plain. (OK, example is about using osgi, not testing osgi. But then
>> the book is missing a chapter "testing with osgi".)
>>
>
> When the book was authored there was no easy way of doing unit testing
> with OSGi.
>
> The camel-test-blueprint module was introduced from Camel 2.10
> onwards. And the book was printed when Camel 2.5.0 was the latest.
>
> The newer book
> http://www.packtpub.com/apache-camel-developers-cookbook/book
>
> has also a testing chapter, and a section about testing blueprint routes.
>
>
>> So there seems to be quite a "learning curve" when starting to use Fuse. But
>> interesting challenge to meet :).
>>
>
> Well IMHO a big part of f the learning curve is IMHO and the fact that
> Karaf is a new kind of application server, that most people have not
> used before.
>
> That is all going to chance in fabric8 1.1 onwards, where you have a
> lot more freedom and choices. For example you can use well known
> containers such as Apache Tomcat, Wildfly, Jetty, Spring Boot, or
> whatever. And just do development without OSGi such as plain WAR /
> spring / CDI / or whatever.
>
> Here is a blog and video post showing fabric8 with Apache Tomcat
> http://www.christianposta.com/blog/?p=393
>
> JBoss Fuse 6.2 will include latest fabric8 release as well.
>
>
>
>
>
>
>
>
>>
>> rg,
>> full time Camel User
>>
>>
>>
>> --
>> View this message in context: http://camel.465427.n5.nabble.com/What-would-be-the-benefits-of-running-Camle-on-osgi-tp5754201p5754278.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: cibsen@redhat.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
> hawtio: http://hawt.io/
> fabric8: http://fabric8.io/



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Re: What would be the benefits of running Camle on osgi?

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Jul 23, 2014 at 9:21 AM, user3152723
<un...@fifthelement.fi> wrote:
> Tank you for the answers!
>
> I can now see that I mixed up names and things and frameworks. Fuse is based
> on Karaf; when you start (RedHat) Fuse you meet Karaf console.
>
> And about testing Camel "osgi-blueprint" routes: Check Camel in Action: in
> the osgi example of the book, there is not even test-folder in the project.
> All other examples in the book (as in Camel docs) are effectively spring
> tests plain. (OK, example is about using osgi, not testing osgi. But then
> the book is missing a chapter "testing with osgi".)
>

When the book was authored there was no easy way of doing unit testing
with OSGi.

The camel-test-blueprint module was introduced from Camel 2.10
onwards. And the book was printed when Camel 2.5.0 was the latest.

The newer book
http://www.packtpub.com/apache-camel-developers-cookbook/book

has also a testing chapter, and a section about testing blueprint routes.


> So there seems to be quite a "learning curve" when starting to use Fuse. But
> interesting challenge to meet :).
>

Well IMHO a big part of f the learning curve is IMHO and the fact that
Karaf is a new kind of application server, that most people have not
used before.

That is all going to chance in fabric8 1.1 onwards, where you have a
lot more freedom and choices. For example you can use well known
containers such as Apache Tomcat, Wildfly, Jetty, Spring Boot, or
whatever. And just do development without OSGi such as plain WAR /
spring / CDI / or whatever.

Here is a blog and video post showing fabric8 with Apache Tomcat
http://www.christianposta.com/blog/?p=393

JBoss Fuse 6.2 will include latest fabric8 release as well.








>
> rg,
> full time Camel User
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/What-would-be-the-benefits-of-running-Camle-on-osgi-tp5754201p5754278.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Re: What would be the benefits of running Camle on osgi?

Posted by user3152723 <un...@fifthelement.fi>.
Tank you for the answers!

I can now see that I mixed up names and things and frameworks. Fuse is based
on Karaf; when you start (RedHat) Fuse you meet Karaf console.

And about testing Camel "osgi-blueprint" routes: Check Camel in Action: in
the osgi example of the book, there is not even test-folder in the project.
All other examples in the book (as in Camel docs) are effectively spring
tests plain. (OK, example is about using osgi, not testing osgi. But then
the book is missing a chapter "testing with osgi".)

So there seems to be quite a "learning curve" when starting to use Fuse. But
interesting challenge to meet :). 


rg,
full time Camel User



--
View this message in context: http://camel.465427.n5.nabble.com/What-would-be-the-benefits-of-running-Camle-on-osgi-tp5754201p5754278.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: What would be the benefits of running Camle on osgi?

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Apache Camel is a library that is intended to be used in any kind of
environment. Whether you run Camel in OSGi / JEE / Standalone / micro
containers / or whatever.

All the Camel components / DSLs etc is designed to work the same.
So from Camel point of view you do not miss out running outside OSGi.



On Tue, Jul 22, 2014 at 11:30 AM, user3152723
<un...@fifthelement.fi> wrote:
> It is recommended to use blueprint with Camel if you run your routes on osgi.
>
> But what would you miss out if your choose to run Camel routes in / imbedded
> in Spring (SpringBoot) in stead of Karaf? You anyway get the ease of testing
> with Spring.
>
> Using Fuse : Camel, Activemq, and starting with Fabric. Do we "need" to use
> Karaf?
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/What-would-be-the-benefits-of-running-Camle-on-osgi-tp5754201.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/