felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david.a.jen...@gmail.com>
Subject Re: Enterprise business domain using DS - is it good idea?
Date Mon, 20 Jul 2015 15:41:50 GMT
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 <ooo_saturn7@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


Mime
View raw message