You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Alex Sviridov <oo...@mail.ru> on 2015/07/20 07:33:42 UTC

Re[2]: Enterprise business domain using DS - is it good idea?

 Thanks to everybody! All your comments really help very much!

I've studied the difference between Blueprint and DS  http://iocanel.blogspot.ru/2013/11/thoughts-on-blueprint-and-declarative.html

As I understand the main difference is that Blueprint allows to replace bundle with services when the application is running as Blueprint creates dynamic proxies
which are injected in consumer and waits until the service is available (or timeout) while DS will just throws exception. 

As we are developing enterprise application (client-server) then ability to replace the bundle without stopping the application is a good thing. So we want
to test and Blueprint and compare it with DS.

I have a few questions (I found some information but I'm afraid it is old):

1) Is blueprint part of apache felix or it is part of apache aries?
2) Does blueprint support generating xml files via annotations like DS. If yes, then what maven plugin should we use
3) What is the influence of using proxies for every service on performance in comparison with DS?
4) Could anyone provide a link to example of using blueprint of last version?



>Воскресенье, 19 июля 2015, 22:35 +02:00 от Jean-Baptiste Onofré <jb...@nanthrax.net>:
>
>Hi Neil,
>
>I agree about proxies, but on the other hand, it could be an interesting 
>feature as well.
>
>I don't launch any troll "blueprint vs DS" (I don't care ;)), I just 
>wanted to remember some features.
>
>We "migrated" Karaf from blueprint to DS/pure OSGi, and it works fine, 
>so, I second that DS will match Alex's needs.
>
>Maybe, for convenience, some namespace and extended annotations for 
>enterprise could be interesting, but definitely, not mandatory.
>
>My $0.02 ;)
>
>Regards
>JB
>
>On 07/19/2015 09:57 PM, Neil Bartlett wrote:
>> Blueprint’s use of dynamic proxies is indeed a powerful argument against using it! ;-)
>>
>> But this is surely a distraction? As Alex said in his email: “We have tested DS … and they do all we need.” So Alex, what exactly is your concern? If it is scalability then I think Carsten’s answer covers it quite nicely. Is there some specific feature you are looking for?
>>
>> If you’re just looking for assurance that other people are using DS in the way that you intend to use it, then I can give you that assurance. I have used DS, and helped many of my customers and trainees to use DS, in exactly the scenarios you are talking about. That is: implementing the vast bulk of business components in a large enterprise application.
>>
>> Neil
>>
>>
>>> On 19 Jul 2015, at 15:05, Jean-Baptiste Onofré < jb@nanthrax.net > wrote:
>>>
>>> Don't forget to mention the dynamic proxies, which can be very interesting for enterprise application IMHO.
>>> With DS, people has to remember to use the lifecycle/injection, but it requires all services available at component startup.
>>>
>>> The namespace extension is also a very interesting feature for enterprise.
>>>
>>> @Alex, I gave a talk about Karaf for the Enterprise, where I addressed all the enterprise specification supported by Karaf.
>>>
>>> Regards
>>> JB
>>>
>>> On 07/19/2015 02:10 PM, Christian Schneider wrote:
>>>> I think the question if DS is a good idea is less about the number of
>>>> OSGi services. I am pretty sure it can handle any reasonable number.
>>>> I would rather look into the rest of the stack you are planning to use.
>>>>
>>>> Think about the things you also need to do:
>>>> - UI
>>>> - Persistence
>>>> - External integration (Rest, SOAP, Messaging)
>>>> - Security
>>>>
>>>> You should setup a small prototype including these aspects and check how
>>>> well DS fits into these. Probably you will need to choose some
>>>> additional frameworks and need to find a way to integrate them with DS.
>>>>
>>>> In my current tutorial about DS I also compared some technical aspects
>>>> of blueprint and DS which might also help:
>>>>  http://liquid-reality.de/display/liquid/2015/06/30/Apache+Karaf+Tutorial+part+10+-+Declarative+services
>>>>
>>>>
>>>> Christian
>>>>
>>>> Am 19.07.2015 um 09:53 schrieb Alex Sviridov:
>>>>>   We are developing some enterprise application of middle level of
>>>>> difficulty. And all the business domain (the clients are web/gui) we
>>>>> want to implement via osgi services using DS.
>>>>>
>>>>> We have tested DS (again I would like to thank everyone who helped us
>>>>> with DS in this mailing list) and they do all we need.
>>>>>
>>>>> However, the number of services we will have to implement about
>>>>> 200-300. And every service can be consumer of other services.
>>>>>
>>>>> What we want to do - every service must be responsible for some field
>>>>> of domain, for example - employee, timetable, payment etc.
>>>>>
>>>>> So the question -  is such using of DS a good idea?
>>>>>
>>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail:  users-unsubscribe@felix.apache.org
>>>> For additional commands, e-mail:  users-help@felix.apache.org
>>>>
>>>
>>> --
>>> Jean-Baptiste Onofré
>>>  jbonofre@apache.org
>>>  http://blog.nanthrax.net
>>> Talend -  http://www.talend.com
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail:  users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail:  users-help@felix.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:  users-unsubscribe@felix.apache.org
>> For additional commands, e-mail:  users-help@felix.apache.org
>>
>
>-- 
>Jean-Baptiste Onofré
>jbonofre@apache.org
>http://blog.nanthrax.net
>Talend -  http://www.talend.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail:  users-unsubscribe@felix.apache.org
>For additional commands, e-mail:  users-help@felix.apache.org
>


-- 
Alex Sviridov

Re[2]: Enterprise business domain using DS - is it good idea?

Posted by Alex Sviridov <oo...@mail.ru>.
 Hi. Christian. We want to use DS like EJB. By other words what EJB do in JavaEE we do it using DS.

Christian, could you say. if blueprint supports something like scope=prototype of DS?


>Понедельник, 20 июля 2015, 22:28 +02:00 от Christian Schneider <ch...@die-schneider.net>:
>
>I also think that most aspects of enterprise applications can be done 
>using DS in some way.
>Unfortunately there are almost no examples out there. Maybe you can 
>share how you solved some of the
>enterprise aspects like transactions and security. I think both might be 
>solvable using the template style and closures I used
>in my DS example but I have no large scale experience with it.
>
>Christian
>
>On 20.07.2015 18:18, Raymond Auge wrote:
>> I have to agree with David,
>>
>> So, more feedback from someone doing a really huge enterprise product
>> migrating from Java EE to OSGi (4+ years in the making...)
>>
>> Service Damping is hell. You will not enjoy experiencing the complexity
>> that service damping will impose on your already complex environment,
>> particular if your goal has at least some designs on optionality.
>>
>> Since there is no (to my knowledge) alternative for dealing with service
>> references in blueprint other than service damping, this made it so painful
>> for us that after more than a couple years with BP in our lives we recently
>> undertook to remove it all.
>>
>> Had blueprint NOT been implemented with service damping, it could have been
>> tolerable and even likely that we would have used it more.
>>
>> Perhaps if BP-next provides an alternative more akin to DS (passive wait
>> via listeners) we may go back to it in some rare cases. However, even when
>> it comes to things like transactions and security, there are other models
>> that work just as well.
>>
>> Lastly, I think it's just a bad idea to try to shoehorn dynamics into
>> non-dynamic models like spring/CDI because they have fundamentally
>> different expectations.
>>
>> Sincerely,
>> - Ray
>>
>>
>
>-- 
>Christian Schneider
>http://www.liquid-reality.de
>
>Open Source Architect
>http://www.talend.com
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail:  users-unsubscribe@felix.apache.org
>For additional commands, e-mail:  users-help@felix.apache.org
>


-- 
Alex Sviridov

Re: Enterprise business domain using DS - is it good idea?

Posted by Christian Schneider <ch...@die-schneider.net>.
I also think that most aspects of enterprise applications can be done 
using DS in some way.
Unfortunately there are almost no examples out there. Maybe you can 
share how you solved some of the
enterprise aspects like transactions and security. I think both might be 
solvable using the template style and closures I used
in my DS example but I have no large scale experience with it.

Christian

On 20.07.2015 18:18, Raymond Auge wrote:
> I have to agree with David,
>
> So, more feedback from someone doing a really huge enterprise product
> migrating from Java EE to OSGi (4+ years in the making...)
>
> Service Damping is hell. You will not enjoy experiencing the complexity
> that service damping will impose on your already complex environment,
> particular if your goal has at least some designs on optionality.
>
> Since there is no (to my knowledge) alternative for dealing with service
> references in blueprint other than service damping, this made it so painful
> for us that after more than a couple years with BP in our lives we recently
> undertook to remove it all.
>
> Had blueprint NOT been implemented with service damping, it could have been
> tolerable and even likely that we would have used it more.
>
> Perhaps if BP-next provides an alternative more akin to DS (passive wait
> via listeners) we may go back to it in some rare cases. However, even when
> it comes to things like transactions and security, there are other models
> that work just as well.
>
> Lastly, I think it's just a bad idea to try to shoehorn dynamics into
> non-dynamic models like spring/CDI because they have fundamentally
> different expectations.
>
> Sincerely,
> - Ray
>
>

-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Enterprise business domain using DS - is it good idea?

Posted by Raymond Auge <ra...@liferay.com>.
I have to agree with David,

So, more feedback from someone doing a really huge enterprise product
migrating from Java EE to OSGi (4+ years in the making...)

Service Damping is hell. You will not enjoy experiencing the complexity
that service damping will impose on your already complex environment,
particular if your goal has at least some designs on optionality.

Since there is no (to my knowledge) alternative for dealing with service
references in blueprint other than service damping, this made it so painful
for us that after more than a couple years with BP in our lives we recently
undertook to remove it all.

Had blueprint NOT been implemented with service damping, it could have been
tolerable and even likely that we would have used it more.

Perhaps if BP-next provides an alternative more akin to DS (passive wait
via listeners) we may go back to it in some rare cases. However, even when
it comes to things like transactions and security, there are other models
that work just as well.

Lastly, I think it's just a bad idea to try to shoehorn dynamics into
non-dynamic models like spring/CDI because they have fundamentally
different expectations.

Sincerely,
- Ray

On Mon, Jul 20, 2015 at 11:41 AM, David Jencks <da...@gmail.com>
wrote:

> yes.  The R6 version of DS does too. (build it yourself from felix scr
> trunk at this point).
>
> My opinion on DS vs blueprint:
>
> The proxies are sort of irrelevant.  With DS, with a mandatory dynamic
> reference, your component will be present when at least one instance of the
> required service is available and not present otherwise.  If you change the
> target of the reference by starting the new service and then stopping the
> old one, then your component will just switch without any interruption.
>
> To me the biggest functional advantage of DS is the really good
> integration with config admin (even better in R6).  This makes the
> configuration of your service instances orthogonal to their specification.
> While Aries blueprint does have config admin integration, it’s sort of
> bolted on and no one has figured out a plausible way to get it into the
> blueprint spec (possibly due to lack of interest).
>
> While when it started I thought blueprint was ideal, as I’ve learned more
> about OSGI I’ve come to regard blueprint as a transition crutch for those
> addicted to Spring.  However, I have only used OSGI to develop app servers,
> I’ve never tried to write an enterprise app using OSGI, so there may be
> different considerations for your use.
>
> thanks
> david jencks
>
> > On Jul 20, 2015, at 9:17 AM, Alex Sviridov <oo...@mail.ru> wrote:
> >
> > Hello, Christian. Thank you very much for detailed answers and great
> tutorial!
> >
> > I have one question - Does blueprint support scopes - I need new
> instance of service for every consumer?
> >
> >
> >
> >> Понедельник, 20 июля 2015, 9:24 +02:00 от Christian Schneider <
> chris@die-schneider.net>:
> >>
> >>
> >>
> >> Am 20.07.2015 um 07:33 schrieb Alex Sviridov:
> >>>
> >>> I have a few questions (I found some information but I'm afraid it is
> old):
> >>>
> >>>
> >>> 2) Does blueprint support generating xml files via annotations like
> DS. If yes, then what maven plugin should we use
> >> There is a blueprint-maven-plugin from aries. It supports using JEE
> >> annotations for most of the functionality of blueprint.
> >> Basically the goal is to provide annotations for blueprint that are as
> >> compatible to JEE as possible so people who learned JEE feel at home.
> >> http://aries.apache.org/modules/blueprint-maven-plugin.html
> >> The example below shows a small application that uses just annotations.
> >> In practice you can also add hand written blueprint for things the
> >> plugin does not cover (like e.g. CXF integration).
> >>
> http://www.liquid-reality.de/display/liquid/2015/03/05/Apache+Karaf+Tutorial+Part+9+-+Annotation+based+blueprint+and+JPA
> >>
> >> The plugin works quite well and is already used in production at one of
> >> our customers. The scope of the plugin is limited a bit though.
> >> For example it already supports simple transaction and jpa injections
> >> but it is not yet compatible to Aries JPA 2.
> >> I will probably need to introduce some extension support for the plugin
> >> so people can extend it to support other blueprint namespaces.
> >>
> >> So I encourage you to try it out and see if it fits your current needs.
> >> As the code of the plugin is quite small you can also just fork it to
> >> adapt to your internal needs
> >> if something does not work like you want. In that case I would be happy
> >> about feedback or even pull requests so I can add such impovements to
> >> the aries version.
> >>
> >>> 3) What is the influence of using proxies for every service on
> performance in comparison with DS?
> >> There is not much performance overhead for proxies. As your service
> >> calls should not be extremely fine grained anyway I do not think you
> >> will notice a problem.
> >> The problem with proxies is more in some other regards. For example
> >> blueprint blocks a service call if a mandatory service goes away. So if
> >> your business code needs to guarantee short response times
> >> this may speak against blueprint.
> >> Proxies also make debugging harder as you often hit the proxy impl code
> >> while stepping thorugh your code.
> >>
> >>> 4) Could anyone provide a link to example of using blueprint of last
> version?
> >> You can have a look at my Karaf Tutorials. They cover many blueprint
> >> features as well as some of the integrations to other frameworks
> >> blueprint provides.
> >> Starting with my newest Tutorial I will also provide more examples of
> >> DS. My goal is to look into things like security, REST, SOAP.
> >> http://www.liquid-reality.de/display/liquid/Karaf+Tutorials
> >>
> >> Christian
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail:  users-unsubscribe@felix.apache.org
> >> For additional commands, e-mail:  users-help@felix.apache.org
> >>
> >
> >
> > --
> > Alex Sviridov
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>


-- 
*Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
 (@rotty3000)
Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
 (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org> (@OSGiAlliance)

Re: Enterprise business domain using DS - is it good idea?

Posted by David Jencks <da...@gmail.com>.
yes.  The R6 version of DS does too. (build it yourself from felix scr trunk at this point).

My opinion on DS vs blueprint:

The proxies are sort of irrelevant.  With DS, with a mandatory dynamic reference, your component will be present when at least one instance of the required service is available and not present otherwise.  If you change the target of the reference by starting the new service and then stopping the old one, then your component will just switch without any interruption.

To me the biggest functional advantage of DS is the really good integration with config admin (even better in R6).  This makes the configuration of your service instances orthogonal to their specification.  While Aries blueprint does have config admin integration, it’s sort of bolted on and no one has figured out a plausible way to get it into the blueprint spec (possibly due to lack of interest).

While when it started I thought blueprint was ideal, as I’ve learned more about OSGI I’ve come to regard blueprint as a transition crutch for those addicted to Spring.  However, I have only used OSGI to develop app servers, I’ve never tried to write an enterprise app using OSGI, so there may be different considerations for your use.

thanks
david jencks

> On Jul 20, 2015, at 9:17 AM, Alex Sviridov <oo...@mail.ru> wrote:
> 
> Hello, Christian. Thank you very much for detailed answers and great tutorial!
> 
> I have one question - Does blueprint support scopes - I need new instance of service for every consumer?
> 
> 
> 
>> Понедельник, 20 июля 2015, 9:24 +02:00 от Christian Schneider <ch...@die-schneider.net>:
>> 
>> 
>> 
>> Am 20.07.2015 um 07:33 schrieb Alex Sviridov:
>>> 
>>> I have a few questions (I found some information but I'm afraid it is old):
>>> 
>>> 
>>> 2) Does blueprint support generating xml files via annotations like DS. If yes, then what maven plugin should we use
>> There is a blueprint-maven-plugin from aries. It supports using JEE 
>> annotations for most of the functionality of blueprint.
>> Basically the goal is to provide annotations for blueprint that are as 
>> compatible to JEE as possible so people who learned JEE feel at home.
>> http://aries.apache.org/modules/blueprint-maven-plugin.html
>> The example below shows a small application that uses just annotations. 
>> In practice you can also add hand written blueprint for things the 
>> plugin does not cover (like e.g. CXF integration).
>> http://www.liquid-reality.de/display/liquid/2015/03/05/Apache+Karaf+Tutorial+Part+9+-+Annotation+based+blueprint+and+JPA
>> 
>> The plugin works quite well and is already used in production at one of 
>> our customers. The scope of the plugin is limited a bit though.
>> For example it already supports simple transaction and jpa injections 
>> but it is not yet compatible to Aries JPA 2.
>> I will probably need to introduce some extension support for the plugin 
>> so people can extend it to support other blueprint namespaces.
>> 
>> So I encourage you to try it out and see if it fits your current needs. 
>> As the code of the plugin is quite small you can also just fork it to 
>> adapt to your internal needs
>> if something does not work like you want. In that case I would be happy 
>> about feedback or even pull requests so I can add such impovements to 
>> the aries version.
>> 
>>> 3) What is the influence of using proxies for every service on performance in comparison with DS?
>> There is not much performance overhead for proxies. As your service 
>> calls should not be extremely fine grained anyway I do not think you 
>> will notice a problem.
>> The problem with proxies is more in some other regards. For example 
>> blueprint blocks a service call if a mandatory service goes away. So if 
>> your business code needs to guarantee short response times
>> this may speak against blueprint.
>> Proxies also make debugging harder as you often hit the proxy impl code 
>> while stepping thorugh your code.
>> 
>>> 4) Could anyone provide a link to example of using blueprint of last version?
>> You can have a look at my Karaf Tutorials. They cover many blueprint 
>> features as well as some of the integrations to other frameworks 
>> blueprint provides.
>> Starting with my newest Tutorial I will also provide more examples of 
>> DS. My goal is to look into things like security, REST, SOAP.
>> http://www.liquid-reality.de/display/liquid/Karaf+Tutorials
>> 
>> Christian
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:  users-unsubscribe@felix.apache.org
>> For additional commands, e-mail:  users-help@felix.apache.org
>> 
> 
> 
> -- 
> Alex Sviridov


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re[2]: Enterprise business domain using DS - is it good idea?

Posted by Alex Sviridov <oo...@mail.ru>.
 Hello, Christian. Thank you very much for detailed answers and great tutorial!

I have one question - Does blueprint support scopes - I need new instance of service for every consumer?



>Понедельник, 20 июля 2015, 9:24 +02:00 от Christian Schneider <ch...@die-schneider.net>:
>
>
>
>Am 20.07.2015 um 07:33 schrieb Alex Sviridov:
>>
>> I have a few questions (I found some information but I'm afraid it is old):
>>
>>
>> 2) Does blueprint support generating xml files via annotations like DS. If yes, then what maven plugin should we use
>There is a blueprint-maven-plugin from aries. It supports using JEE 
>annotations for most of the functionality of blueprint.
>Basically the goal is to provide annotations for blueprint that are as 
>compatible to JEE as possible so people who learned JEE feel at home.
>http://aries.apache.org/modules/blueprint-maven-plugin.html
>The example below shows a small application that uses just annotations. 
>In practice you can also add hand written blueprint for things the 
>plugin does not cover (like e.g. CXF integration).
>http://www.liquid-reality.de/display/liquid/2015/03/05/Apache+Karaf+Tutorial+Part+9+-+Annotation+based+blueprint+and+JPA
>
>The plugin works quite well and is already used in production at one of 
>our customers. The scope of the plugin is limited a bit though.
>For example it already supports simple transaction and jpa injections 
>but it is not yet compatible to Aries JPA 2.
>I will probably need to introduce some extension support for the plugin 
>so people can extend it to support other blueprint namespaces.
>
>So I encourage you to try it out and see if it fits your current needs. 
>As the code of the plugin is quite small you can also just fork it to 
>adapt to your internal needs
>if something does not work like you want. In that case I would be happy 
>about feedback or even pull requests so I can add such impovements to 
>the aries version.
>
>> 3) What is the influence of using proxies for every service on performance in comparison with DS?
>There is not much performance overhead for proxies. As your service 
>calls should not be extremely fine grained anyway I do not think you 
>will notice a problem.
>The problem with proxies is more in some other regards. For example 
>blueprint blocks a service call if a mandatory service goes away. So if 
>your business code needs to guarantee short response times
>this may speak against blueprint.
>Proxies also make debugging harder as you often hit the proxy impl code 
>while stepping thorugh your code.
>
>> 4) Could anyone provide a link to example of using blueprint of last version?
>You can have a look at my Karaf Tutorials. They cover many blueprint 
>features as well as some of the integrations to other frameworks 
>blueprint provides.
>Starting with my newest Tutorial I will also provide more examples of 
>DS. My goal is to look into things like security, REST, SOAP.
>http://www.liquid-reality.de/display/liquid/Karaf+Tutorials
>
>Christian
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail:  users-unsubscribe@felix.apache.org
>For additional commands, e-mail:  users-help@felix.apache.org
>


-- 
Alex Sviridov

Re: Enterprise business domain using DS - is it good idea?

Posted by Carsten Ziegeler <cz...@apache.org>.
And I think another important point is, it's not one *or* the other. You
can start with whatever you think is more suitable and if you find out
you need features from the other for something, just use it for that.
The great thing here is, you're developing services which interact with
each other through the service registry. It doesn't matter what you use
to implement them. They all work nicely together
Of course, usually dev teams try to focus on a single way to do things
(which is preferable of course), but you're not bound to this.

For example, we are usually developing everything with DS, but in some
cases we go directly with the framework API.

Carsten

Am 20.07.15 um 08:25 schrieb Achim Nierbeck:
> Hi Alex,
> 
> may I answer a couple of your questions.
> 
> 1) it's Apache Aries, not Felix :-)
> 2) I think Christian Schneider worked on something similar transforming JEE
> Annotations to a blueprint structure, but I'm not sure how
> "production-ready" it is, as I never used it. But I'm sure he'll give some
> feedback.
> 3) Haven't seen any yet
> 4) If you take a look at the samples around Apache Karaf you'll find lots
> of Blueprint related samples [1]
> 
> 
> Regarding Blueprint/DS discussion, as usual you'll always find something
> that fits your needs better.
> Sometimes DS is just enough sometimes you'll need to extend something and
> find that blueprint is suited better.
> Especially the namespace handling in Blueprint brings another positive
> "side-effect", you'll be able to extend the
> blueprint mechanism with something like a authentication mechanism on
> method level, with your own
> Namespace handler an a InstanceListener. Similar to the way the
> transactions are declared in blueprint beans.
> 
> regards, Achim
> 


-- 
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Re[2]: Enterprise business domain using DS - is it good idea?

Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi Alex,

may I answer a couple of your questions.

1) it's Apache Aries, not Felix :-)
2) I think Christian Schneider worked on something similar transforming JEE
Annotations to a blueprint structure, but I'm not sure how
"production-ready" it is, as I never used it. But I'm sure he'll give some
feedback.
3) Haven't seen any yet
4) If you take a look at the samples around Apache Karaf you'll find lots
of Blueprint related samples [1]


Regarding Blueprint/DS discussion, as usual you'll always find something
that fits your needs better.
Sometimes DS is just enough sometimes you'll need to extend something and
find that blueprint is suited better.
Especially the namespace handling in Blueprint brings another positive
"side-effect", you'll be able to extend the
blueprint mechanism with something like a authentication mechanism on
method level, with your own
Namespace handler an a InstanceListener. Similar to the way the
transactions are declared in blueprint beans.

regards, Achim



2015-07-20 7:33 GMT+02:00 Alex Sviridov <oo...@mail.ru>:

>  Thanks to everybody! All your comments really help very much!
>
> I've studied the difference between Blueprint and DS
> http://iocanel.blogspot.ru/2013/11/thoughts-on-blueprint-and-declarative.html
>
> As I understand the main difference is that Blueprint allows to replace
> bundle with services when the application is running as Blueprint creates
> dynamic proxies
> which are injected in consumer and waits until the service is available
> (or timeout) while DS will just throws exception.
>
> As we are developing enterprise application (client-server) then ability
> to replace the bundle without stopping the application is a good thing. So
> we want
> to test and Blueprint and compare it with DS.
>
> I have a few questions (I found some information but I'm afraid it is old):
>
> 1) Is blueprint part of apache felix or it is part of apache aries?
> 2) Does blueprint support generating xml files via annotations like DS. If
> yes, then what maven plugin should we use
> 3) What is the influence of using proxies for every service on performance
> in comparison with DS?
> 4) Could anyone provide a link to example of using blueprint of last
> version?
>
>
>
> >Воскресенье, 19 июля 2015, 22:35 +02:00 от Jean-Baptiste Onofré <
> jb@nanthrax.net>:
> >
> >Hi Neil,
> >
> >I agree about proxies, but on the other hand, it could be an interesting
> >feature as well.
> >
> >I don't launch any troll "blueprint vs DS" (I don't care ;)), I just
> >wanted to remember some features.
> >
> >We "migrated" Karaf from blueprint to DS/pure OSGi, and it works fine,
> >so, I second that DS will match Alex's needs.
> >
> >Maybe, for convenience, some namespace and extended annotations for
> >enterprise could be interesting, but definitely, not mandatory.
> >
> >My $0.02 ;)
> >
> >Regards
> >JB
> >
> >On 07/19/2015 09:57 PM, Neil Bartlett wrote:
> >> Blueprint’s use of dynamic proxies is indeed a powerful argument
> against using it! ;-)
> >>
> >> But this is surely a distraction? As Alex said in his email: “We have
> tested DS … and they do all we need.” So Alex, what exactly is your
> concern? If it is scalability then I think Carsten’s answer covers it quite
> nicely. Is there some specific feature you are looking for?
> >>
> >> If you’re just looking for assurance that other people are using DS in
> the way that you intend to use it, then I can give you that assurance. I
> have used DS, and helped many of my customers and trainees to use DS, in
> exactly the scenarios you are talking about. That is: implementing the vast
> bulk of business components in a large enterprise application.
> >>
> >> Neil
> >>
> >>
> >>> On 19 Jul 2015, at 15:05, Jean-Baptiste Onofré < jb@nanthrax.net >
> wrote:
> >>>
> >>> Don't forget to mention the dynamic proxies, which can be very
> interesting for enterprise application IMHO.
> >>> With DS, people has to remember to use the lifecycle/injection, but it
> requires all services available at component startup.
> >>>
> >>> The namespace extension is also a very interesting feature for
> enterprise.
> >>>
> >>> @Alex, I gave a talk about Karaf for the Enterprise, where I addressed
> all the enterprise specification supported by Karaf.
> >>>
> >>> Regards
> >>> JB
> >>>
> >>> On 07/19/2015 02:10 PM, Christian Schneider wrote:
> >>>> I think the question if DS is a good idea is less about the number of
> >>>> OSGi services. I am pretty sure it can handle any reasonable number.
> >>>> I would rather look into the rest of the stack you are planning to
> use.
> >>>>
> >>>> Think about the things you also need to do:
> >>>> - UI
> >>>> - Persistence
> >>>> - External integration (Rest, SOAP, Messaging)
> >>>> - Security
> >>>>
> >>>> You should setup a small prototype including these aspects and check
> how
> >>>> well DS fits into these. Probably you will need to choose some
> >>>> additional frameworks and need to find a way to integrate them with
> DS.
> >>>>
> >>>> In my current tutorial about DS I also compared some technical aspects
> >>>> of blueprint and DS which might also help:
> >>>>
> http://liquid-reality.de/display/liquid/2015/06/30/Apache+Karaf+Tutorial+part+10+-+Declarative+services
> >>>>
> >>>>
> >>>> Christian
> >>>>
> >>>> Am 19.07.2015 um 09:53 schrieb Alex Sviridov:
> >>>>>   We are developing some enterprise application of middle level of
> >>>>> difficulty. And all the business domain (the clients are web/gui) we
> >>>>> want to implement via osgi services using DS.
> >>>>>
> >>>>> We have tested DS (again I would like to thank everyone who helped us
> >>>>> with DS in this mailing list) and they do all we need.
> >>>>>
> >>>>> However, the number of services we will have to implement about
> >>>>> 200-300. And every service can be consumer of other services.
> >>>>>
> >>>>> What we want to do - every service must be responsible for some field
> >>>>> of domain, for example - employee, timetable, payment etc.
> >>>>>
> >>>>> So the question -  is such using of DS a good idea?
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail:  users-unsubscribe@felix.apache.org
> >>>> For additional commands, e-mail:  users-help@felix.apache.org
> >>>>
> >>>
> >>> --
> >>> Jean-Baptiste Onofré
> >>>  jbonofre@apache.org
> >>>  http://blog.nanthrax.net
> >>> Talend -  http://www.talend.com
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail:  users-unsubscribe@felix.apache.org
> >>> For additional commands, e-mail:  users-help@felix.apache.org
> >>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail:  users-unsubscribe@felix.apache.org
> >> For additional commands, e-mail:  users-help@felix.apache.org
> >>
> >
> >--
> >Jean-Baptiste Onofré
> >jbonofre@apache.org
> >http://blog.nanthrax.net
> >Talend -  http://www.talend.com
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail:  users-unsubscribe@felix.apache.org
> >For additional commands, e-mail:  users-help@felix.apache.org
> >
>
>
> --
> Alex Sviridov
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Re: Enterprise business domain using DS - is it good idea?

Posted by Christian Schneider <ch...@die-schneider.net>.

Am 20.07.2015 um 07:33 schrieb Alex Sviridov:
>
> I have a few questions (I found some information but I'm afraid it is old):
>
>
> 2) Does blueprint support generating xml files via annotations like DS. If yes, then what maven plugin should we use
There is a blueprint-maven-plugin from aries. It supports using JEE 
annotations for most of the functionality of blueprint.
Basically the goal is to provide annotations for blueprint that are as 
compatible to JEE as possible so people who learned JEE feel at home.
http://aries.apache.org/modules/blueprint-maven-plugin.html
The example below shows a small application that uses just annotations. 
In practice you can also add hand written blueprint for things the 
plugin does not cover (like e.g. CXF integration).
http://www.liquid-reality.de/display/liquid/2015/03/05/Apache+Karaf+Tutorial+Part+9+-+Annotation+based+blueprint+and+JPA

The plugin works quite well and is already used in production at one of 
our customers. The scope of the plugin is limited a bit though.
For example it already supports simple transaction and jpa injections 
but it is not yet compatible to Aries JPA 2.
I will probably need to introduce some extension support for the plugin 
so people can extend it to support other blueprint namespaces.

So I encourage you to try it out and see if it fits your current needs. 
As the code of the plugin is quite small you can also just fork it to 
adapt to your internal needs
if something does not work like you want. In that case I would be happy 
about feedback or even pull requests so I can add such impovements to 
the aries version.

> 3) What is the influence of using proxies for every service on performance in comparison with DS?
There is not much performance overhead for proxies. As your service 
calls should not be extremely fine grained anyway I do not think you 
will notice a problem.
The problem with proxies is more in some other regards. For example 
blueprint blocks a service call if a mandatory service goes away. So if 
your business code needs to guarantee short response times
this may speak against blueprint.
Proxies also make debugging harder as you often hit the proxy impl code 
while stepping thorugh your code.

> 4) Could anyone provide a link to example of using blueprint of last version?
You can have a look at my Karaf Tutorials. They cover many blueprint 
features as well as some of the integrations to other frameworks 
blueprint provides.
Starting with my newest Tutorial I will also provide more examples of 
DS. My goal is to look into things like security, REST, SOAP.
http://www.liquid-reality.de/display/liquid/Karaf+Tutorials

Christian


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org