You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by jimposervicemix <ja...@iki.fi> on 2013/06/03 13:26:07 UTC

Advice for ServiceMix bundle design?

cross-posted at
http://stackoverflow.com/questions/16895593/advice-for-servicemix-bundle-design

I am implementing an ESB solution using ServiceMix

- I have my own system with a bunch of web services
- And several external systems with different services (most with WS
interfaces, some with others)
- These are to be connected with ServiceMix / Camel. Some message routing,
transformation and other EIP is happening here. The solution is likely
utilizing JMS queues for between-bundles communication.

Any advice on a good bundle design structure for this solution? Should I
just put everything in one bundle, should I have routing in one bundle and
transformations for each external system in own bundle for each, or....what
kind of structure would give enough benefits of modularity while not being
overly complex to maintain? What should I take into account when making the
decision?

Any best practices or reference material for this kind of design problem?

I'm just looking for some general guidelines but I haven't found much yet.



--
View this message in context: http://servicemix.396122.n5.nabble.com/Advice-for-ServiceMix-bundle-design-tp5716937.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Advice for ServiceMix bundle design?

Posted by jmservicemix <ja...@iki.fi>.
Do some of those books handle the subject "best way to divide you ServiceMix
ESB integration implementation into OSGi bundles"? Or some of non-book
material? I haven't been able to find good material on this issue. 

I have ordered (not received yet) a couple of those linked books, but they
are general OSGi books, and I am hoping for more focus on
ServiceMix/ESB/integration use case.

This seems like a very fundamental issue when using ServiceMix. Everyone
using ServiceMix needs to take some kind of approach to it. What are people
usually doing? Someone must have written about it...any best practices or
experiences?



Filippo Balicchia wrote
> Please see
> http://karaf.apache.org/index/community/articles.html in book section
> 
> Regards
> 
> --Filippo
> 
> 
> 2013/6/4 jmservicemix &lt;

> jannesm@

> &gt;
> 
>> Do you have any book suggestions?
>>
>>
>> Johan Edstrom-2 wrote
>> > This is a huge question and if you really want to succeed, grab a
>> > few books and look at how systems are implemented.
>> >
>> > In general you want to promote small and modular systems
>> > when writing OSGi code. If you are used to WAR/EAR deployments, start
>> > re-thinking and re-using.
>> >
>> > /je
>> >
>> > On Jun 3, 2013, at 6:45 PM, Freeman Fang &lt;
>>
>> > freeman.fang@
>>
>> > &gt; wrote:
>> >
>> >> Hi,
>> >>
>> >> Though you always need trade-off, put all things in one bundle isn't
>> the
>> >> good practice in OSGi world anyway.
>> >>
>> >> I'd say put each webserivce|camel router in different bundles should
>> be
>> >> the better way to go.
>> >> -------------
>> >> Freeman(Yue) Fang
>> >>
>> >> Red Hat, Inc.
>> >> FuseSource is now part of Red Hat
>> >> Web: http://fusesource.com | http://www.redhat.com/
>> >> Twitter: freemanfang
>> >> Blog: http://freemanfang.blogspot.com
>> >> http://blog.sina.com.cn/u/1473905042
>> >> weibo: @Freeman小屋
>> >>
>> >> www.camelone.org : The open source integration conference:
>> >>
>> >> On 2013-6-3, at 下午7:26, jimposervicemix wrote:
>> >>
>> >>> cross-posted at
>> >>>
>> http://stackoverflow.com/questions/16895593/advice-for-servicemix-bundle-design
>> >>>
>> >>> I am implementing an ESB solution using ServiceMix
>> >>>
>> >>> - I have my own system with a bunch of web services
>> >>> - And several external systems with different services (most with WS
>> >>> interfaces, some with others)
>> >>> - These are to be connected with ServiceMix / Camel. Some message
>> >>> routing,
>> >>> transformation and other EIP is happening here. The solution is
>> likely
>> >>> utilizing JMS queues for between-bundles communication.
>> >>>
>> >>> Any advice on a good bundle design structure for this solution?
>> Should
>> I
>> >>> just put everything in one bundle, should I have routing in one
>> bundle
>> >>> and
>> >>> transformations for each external system in own bundle for each,
>> >>> or....what
>> >>> kind of structure would give enough benefits of modularity while not
>> >>> being
>> >>> overly complex to maintain? What should I take into account when
>> making
>> >>> the
>> >>> decision?
>> >>>
>> >>> Any best practices or reference material for this kind of design
>> >>> problem?
>> >>>
>> >>> I'm just looking for some general guidelines but I haven't found much
>> >>> yet.
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> View this message in context:
>> >>>
>> http://servicemix.396122.n5.nabble.com/Advice-for-ServiceMix-bundle-design-tp5716937.html
>> >>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>> >>
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://servicemix.396122.n5.nabble.com/Advice-for-ServiceMix-bundle-design-tp5716937p5716953.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>





--
View this message in context: http://servicemix.396122.n5.nabble.com/Advice-for-ServiceMix-bundle-design-tp5716937p5716974.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Advice for ServiceMix bundle design?

Posted by Filippo Balicchia <fb...@gmail.com>.
Please see
http://karaf.apache.org/index/community/articles.html in book section

Regards

--Filippo


2013/6/4 jmservicemix <ja...@iki.fi>

> Do you have any book suggestions?
>
>
> Johan Edstrom-2 wrote
> > This is a huge question and if you really want to succeed, grab a
> > few books and look at how systems are implemented.
> >
> > In general you want to promote small and modular systems
> > when writing OSGi code. If you are used to WAR/EAR deployments, start
> > re-thinking and re-using.
> >
> > /je
> >
> > On Jun 3, 2013, at 6:45 PM, Freeman Fang &lt;
>
> > freeman.fang@
>
> > &gt; wrote:
> >
> >> Hi,
> >>
> >> Though you always need trade-off, put all things in one bundle isn't the
> >> good practice in OSGi world anyway.
> >>
> >> I'd say put each webserivce|camel router in different bundles should be
> >> the better way to go.
> >> -------------
> >> Freeman(Yue) Fang
> >>
> >> Red Hat, Inc.
> >> FuseSource is now part of Red Hat
> >> Web: http://fusesource.com | http://www.redhat.com/
> >> Twitter: freemanfang
> >> Blog: http://freemanfang.blogspot.com
> >> http://blog.sina.com.cn/u/1473905042
> >> weibo: @Freeman小屋
> >>
> >> www.camelone.org : The open source integration conference:
> >>
> >> On 2013-6-3, at 下午7:26, jimposervicemix wrote:
> >>
> >>> cross-posted at
> >>>
> http://stackoverflow.com/questions/16895593/advice-for-servicemix-bundle-design
> >>>
> >>> I am implementing an ESB solution using ServiceMix
> >>>
> >>> - I have my own system with a bunch of web services
> >>> - And several external systems with different services (most with WS
> >>> interfaces, some with others)
> >>> - These are to be connected with ServiceMix / Camel. Some message
> >>> routing,
> >>> transformation and other EIP is happening here. The solution is likely
> >>> utilizing JMS queues for between-bundles communication.
> >>>
> >>> Any advice on a good bundle design structure for this solution? Should
> I
> >>> just put everything in one bundle, should I have routing in one bundle
> >>> and
> >>> transformations for each external system in own bundle for each,
> >>> or....what
> >>> kind of structure would give enough benefits of modularity while not
> >>> being
> >>> overly complex to maintain? What should I take into account when making
> >>> the
> >>> decision?
> >>>
> >>> Any best practices or reference material for this kind of design
> >>> problem?
> >>>
> >>> I'm just looking for some general guidelines but I haven't found much
> >>> yet.
> >>>
> >>>
> >>>
> >>> --
> >>> View this message in context:
> >>>
> http://servicemix.396122.n5.nabble.com/Advice-for-ServiceMix-bundle-design-tp5716937.html
> >>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> >>
>
>
>
>
>
> --
> View this message in context:
> http://servicemix.396122.n5.nabble.com/Advice-for-ServiceMix-bundle-design-tp5716937p5716953.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>

Re: Advice for ServiceMix bundle design?

Posted by jmservicemix <ja...@iki.fi>.
Do you have any book suggestions?


Johan Edstrom-2 wrote
> This is a huge question and if you really want to succeed, grab a 
> few books and look at how systems are implemented.
> 
> In general you want to promote small and modular systems
> when writing OSGi code. If you are used to WAR/EAR deployments, start
> re-thinking and re-using.
> 
> /je
> 
> On Jun 3, 2013, at 6:45 PM, Freeman Fang &lt;

> freeman.fang@

> &gt; wrote:
> 
>> Hi,
>> 
>> Though you always need trade-off, put all things in one bundle isn't the
>> good practice in OSGi world anyway.
>> 
>> I'd say put each webserivce|camel router in different bundles should be
>> the better way to go.
>> -------------
>> Freeman(Yue) Fang
>> 
>> Red Hat, Inc. 
>> FuseSource is now part of Red Hat
>> Web: http://fusesource.com | http://www.redhat.com/
>> Twitter: freemanfang
>> Blog: http://freemanfang.blogspot.com
>> http://blog.sina.com.cn/u/1473905042
>> weibo: @Freeman小屋
>> 
>> www.camelone.org : The open source integration conference: 
>> 
>> On 2013-6-3, at 下午7:26, jimposervicemix wrote:
>> 
>>> cross-posted at
>>> http://stackoverflow.com/questions/16895593/advice-for-servicemix-bundle-design
>>> 
>>> I am implementing an ESB solution using ServiceMix
>>> 
>>> - I have my own system with a bunch of web services
>>> - And several external systems with different services (most with WS
>>> interfaces, some with others)
>>> - These are to be connected with ServiceMix / Camel. Some message
>>> routing,
>>> transformation and other EIP is happening here. The solution is likely
>>> utilizing JMS queues for between-bundles communication.
>>> 
>>> Any advice on a good bundle design structure for this solution? Should I
>>> just put everything in one bundle, should I have routing in one bundle
>>> and
>>> transformations for each external system in own bundle for each,
>>> or....what
>>> kind of structure would give enough benefits of modularity while not
>>> being
>>> overly complex to maintain? What should I take into account when making
>>> the
>>> decision?
>>> 
>>> Any best practices or reference material for this kind of design
>>> problem?
>>> 
>>> I'm just looking for some general guidelines but I haven't found much
>>> yet.
>>> 
>>> 
>>> 
>>> --
>>> View this message in context:
>>> http://servicemix.396122.n5.nabble.com/Advice-for-ServiceMix-bundle-design-tp5716937.html
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>





--
View this message in context: http://servicemix.396122.n5.nabble.com/Advice-for-ServiceMix-bundle-design-tp5716937p5716953.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Advice for ServiceMix bundle design?

Posted by Johan Edstrom <se...@gmail.com>.
This is a huge question and if you really want to succeed, grab a 
few books and look at how systems are implemented.

In general you want to promote small and modular systems
when writing OSGi code. If you are used to WAR/EAR deployments, start
re-thinking and re-using.

/je

On Jun 3, 2013, at 6:45 PM, Freeman Fang <fr...@gmail.com> wrote:

> Hi,
> 
> Though you always need trade-off, put all things in one bundle isn't the good practice in OSGi world anyway.
> 
> I'd say put each webserivce|camel router in different bundles should be the better way to go.
> -------------
> Freeman(Yue) Fang
> 
> Red Hat, Inc. 
> FuseSource is now part of Red Hat
> Web: http://fusesource.com | http://www.redhat.com/
> Twitter: freemanfang
> Blog: http://freemanfang.blogspot.com
> http://blog.sina.com.cn/u/1473905042
> weibo: @Freeman小屋
> 
> www.camelone.org : The open source integration conference: 
> 
> On 2013-6-3, at 下午7:26, jimposervicemix wrote:
> 
>> cross-posted at
>> http://stackoverflow.com/questions/16895593/advice-for-servicemix-bundle-design
>> 
>> I am implementing an ESB solution using ServiceMix
>> 
>> - I have my own system with a bunch of web services
>> - And several external systems with different services (most with WS
>> interfaces, some with others)
>> - These are to be connected with ServiceMix / Camel. Some message routing,
>> transformation and other EIP is happening here. The solution is likely
>> utilizing JMS queues for between-bundles communication.
>> 
>> Any advice on a good bundle design structure for this solution? Should I
>> just put everything in one bundle, should I have routing in one bundle and
>> transformations for each external system in own bundle for each, or....what
>> kind of structure would give enough benefits of modularity while not being
>> overly complex to maintain? What should I take into account when making the
>> decision?
>> 
>> Any best practices or reference material for this kind of design problem?
>> 
>> I'm just looking for some general guidelines but I haven't found much yet.
>> 
>> 
>> 
>> --
>> View this message in context: http://servicemix.396122.n5.nabble.com/Advice-for-ServiceMix-bundle-design-tp5716937.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> 


Re: Advice for ServiceMix bundle design?

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

Though you always need trade-off, put all things in one bundle isn't the good practice in OSGi world anyway.

I'd say put each webserivce|camel router in different bundles should be the better way to go.
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: @Freeman小屋

www.camelone.org : The open source integration conference: 

On 2013-6-3, at 下午7:26, jimposervicemix wrote:

> cross-posted at
> http://stackoverflow.com/questions/16895593/advice-for-servicemix-bundle-design
> 
> I am implementing an ESB solution using ServiceMix
> 
> - I have my own system with a bunch of web services
> - And several external systems with different services (most with WS
> interfaces, some with others)
> - These are to be connected with ServiceMix / Camel. Some message routing,
> transformation and other EIP is happening here. The solution is likely
> utilizing JMS queues for between-bundles communication.
> 
> Any advice on a good bundle design structure for this solution? Should I
> just put everything in one bundle, should I have routing in one bundle and
> transformations for each external system in own bundle for each, or....what
> kind of structure would give enough benefits of modularity while not being
> overly complex to maintain? What should I take into account when making the
> decision?
> 
> Any best practices or reference material for this kind of design problem?
> 
> I'm just looking for some general guidelines but I haven't found much yet.
> 
> 
> 
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/Advice-for-ServiceMix-bundle-design-tp5716937.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Advice for ServiceMix bundle design?

Posted by jmservicemix <ja...@iki.fi>.
Thanks for your input! What are your experiences from this kind of design?
How well does it work in practice? Do you actually get enough practical
benefits to off-weight the extra cost (added complexity of creating OSGi
bundles) that you pay?

It surprises me how little content there exists for this question.


jchurch wrote
> I will be following this post with interest.  The pattern we have more or
> less adopted relies on Karaf features (Fabric profiles hopefully soon) to
> deploy a set of related bundles.  We OSGi-register a datasource for all
> bundles.  We separate bundles into Controller and Model to borrow
> terminology from MVC.  One kind of bundle receives Rest or ActiveMq
> messages, and using Camel and beans, they transform and validate, making
> calls on service interfaces which are Java or Scala.  The second kind of
> bundle defines the service interface, implements it, and implements data
> access.  This service bundle normally has no routing in it.  In one case
> we have a feature with sufficiently complex business rules so we have
> justified a third kind of bundle (with routing) that executes business
> logic.  The idea is that the consumer interfaces might change over time or
> additional consumer interfaces might be created, and the business logic is
> sufficiently complex that we don't want to replicate it or move it around
> more than necessary.  Ours is a home-grown pattern - if there's better
> ways of doing things, we want to know.





--
View this message in context: http://servicemix.396122.n5.nabble.com/Advice-for-ServiceMix-bundle-design-tp5716937p5716983.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Advice for ServiceMix bundle design?

Posted by jchurch <Ji...@segmint.com>.
I will be following this post with interest.  The pattern we have more or
less adopted relies on Karaf features (Fabric profiles hopefully soon) to
deploy a set of related bundles.  We OSGi-register a datasource for all
bundles.  We separate bundles into Controller and Model to borrow
terminology from MVC.  One kind of bundle receives Rest or ActiveMq
messages, and using Camel and beans, they transform and validate, making
calls on service interfaces which are Java or Scala.  The second kind of
bundle defines the service interface, implements it, and implements data
access.  This service bundle normally has no routing in it.  In one case we
have a feature with sufficiently complex business rules so we have justified
a third kind of bundle (with routing) that executes business logic.  The
idea is that the consumer interfaces might change over time or additional
consumer interfaces might be created, and the business logic is sufficiently
complex that we don't want to replicate it or move it around more than
necessary.  Ours is a home-grown pattern - if there's better ways of doing
things, we want to know. 



--
View this message in context: http://servicemix.396122.n5.nabble.com/Advice-for-ServiceMix-bundle-design-tp5716937p5716975.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.